diff --git a/.github/workflows/ci-all.yml b/.github/workflows/ci-all.yml index 6b4de180..c9458b6f 100644 --- a/.github/workflows/ci-all.yml +++ b/.github/workflows/ci-all.yml @@ -28,7 +28,6 @@ jobs: diffTextLen=${#diffText} [ $diffTextLen -eq 0 ] && echo 'No changes' || (echo 'ERROR: Code differs to published version. Please bump package version or revert changes'; echo $diffText; exit 1;) - ci-puya-ts: name: 'Build @algorandfoundation/puya-ts' uses: ./.github/workflows/node-ci.yml @@ -48,5 +47,5 @@ jobs: python-version: 3.12.6 pre-test-script: | pipx install algokit --python 3.12.6 - algokit localnet start + algokit localnet reset --update pipx install git+https://github.com/algorandfoundation/puya --python 3.12.6 diff --git a/examples/hello-world-abi/contract.algo.ts b/examples/hello-world-abi/contract.algo.ts index f27adf07..cd754ba0 100644 --- a/examples/hello-world-abi/contract.algo.ts +++ b/examples/hello-world-abi/contract.algo.ts @@ -1,18 +1,31 @@ -import { arc4, log } from '@algorandfoundation/algorand-typescript' +import { arc4 } from '@algorandfoundation/algorand-typescript' +/** + * An abstract base class for a simple example contract + */ abstract class Intermediate extends arc4.Contract { + /** + * sayBananas method + * @returns The string "Bananas" + */ @arc4.abimethod({ allowActions: ['NoOp'], readonly: true }) public sayBananas(): string { - const result = `Bananas` - log(result) - return result + return `Bananas` } } +/** + * A simple hello world example contract + */ export default class HelloWorldContract extends Intermediate { + /** + * sayHello method + * @param firstName The first name of the person to greet + * @param lastName THe last name of the person to greet + * @returns The string "Hello {firstName} {lastName"} + */ public sayHello(firstName: string, lastName: string): string { const result = `Hello ${firstName} ${lastName}` - log(result) return result } } diff --git a/package-lock.json b/package-lock.json index 1896e9c9..b57751e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "chalk": "^5.3.0", "change-case": "^5.4.4", "commander": "^12.1.0", - "cross-spawn": "^7.0.3", + "cross-spawn": "7.0.6", "glob": "^11.0.0", "polytype": "^0.17.0", "typescript": "^5.6.2", @@ -24,36 +24,36 @@ "zod": "^3.23.8" }, "devDependencies": { - "@algorandfoundation/algokit-utils": "^7.0.0-beta.7", + "@algorandfoundation/algokit-utils": "^8.0.0", "@algorandfoundation/algorand-typescript": "file:packages/algo-ts/dist", - "@commitlint/cli": "^19.5.0", - "@commitlint/config-conventional": "^19.5.0", + "@commitlint/cli": "^19.6.0", + "@commitlint/config-conventional": "^19.6.0", "@makerx/eslint-config": "4.0.0", "@makerx/prettier-config": "2.0.1", "@makerx/ts-toolkit": "^4.0.0-beta.21", - "@rollup/plugin-commonjs": "28.0.0", + "@rollup/plugin-commonjs": "28.0.1", "@rollup/plugin-json": "6.1.0", "@rollup/plugin-node-resolve": "15.3.0", - "@rollup/plugin-typescript": "^12.1.0", + "@rollup/plugin-typescript": "^12.1.1", "@tsconfig/node20": "20.1.4", "@types/cross-spawn": "^6.0.6", - "@types/node": "22.6.1", - "@typescript-eslint/eslint-plugin": "8.7.0", - "@typescript-eslint/parser": "8.7.0", - "@vitest/coverage-v8": "2.1.1", + "@types/node": "22.9.1", + "@typescript-eslint/eslint-plugin": "8.15.0", + "@typescript-eslint/parser": "8.15.0", + "@vitest/coverage-v8": "2.1.5", "better-npm-audit": "3.11.0", "conventional-changelog-conventionalcommits": "^8.0.0", "copyfiles": "2.4.1", - "eslint": "9.11.1", + "eslint": "9.15.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "npm-run-all": "4.1.5", "prettier": "3.3.3", "rimraf": "6.0.1", - "rollup": "^4.22.4", - "semantic-release": "^24.1.1", - "tsx": "4.19.1", - "vitest": "2.1.1" + "rollup": "^4.27.3", + "semantic-release": "^24.2.0", + "tsx": "4.19.2", + "vitest": "2.1.5" } }, "../algorand-typescript-testing/dist": { @@ -75,19 +75,19 @@ } }, "node_modules/@algorandfoundation/algokit-utils": { - "version": "7.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@algorandfoundation/algokit-utils/-/algokit-utils-7.0.0-beta.7.tgz", - "integrity": "sha512-xueS9bYnboF3x4Zp/7mCgkLZQR91b5NOuM6aZawv5ySZ+GrRqqZnThJYcGVSNG5GSlGp1ypkEi3oXeApmwdGCA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@algorandfoundation/algokit-utils/-/algokit-utils-8.0.0.tgz", + "integrity": "sha512-SIrQpWFJaAbqwN6dMvvEPYxggUjtq2OCpfRLvmBWksJ/Psi2CLdsS3R84vmilszRaLX5C1aRTv0c1rBxYEe3+w==", "dev": true, "license": "MIT", "dependencies": { "buffer": "^6.0.3" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "algosdk": "^2.7.0" + "algosdk": "^3.0.0" } }, "node_modules/@algorandfoundation/algorand-typescript": { @@ -123,9 +123,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "license": "MIT", "engines": { @@ -133,9 +133,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "license": "MIT", "engines": { @@ -237,11 +237,14 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.0" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -250,15 +253,14 @@ } }, "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -283,14 +285,14 @@ } }, "node_modules/@commitlint/cli": { - "version": "19.5.0", - "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-19.5.0.tgz", - "integrity": "sha512-gaGqSliGwB86MDmAAKAtV9SV1SHdmN8pnGq4EJU4+hLisQ7IFfx4jvU4s+pk6tl0+9bv6yT+CaZkufOinkSJIQ==", + "version": "19.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-19.6.0.tgz", + "integrity": "sha512-v17BgGD9w5KnthaKxXnEg6KLq6DYiAxyiN44TpiRtqyW8NSq+Kx99mkEG8Qo6uu6cI5eMzMojW2muJxjmPnF8w==", "dev": true, "license": "MIT", "dependencies": { "@commitlint/format": "^19.5.0", - "@commitlint/lint": "^19.5.0", + "@commitlint/lint": "^19.6.0", "@commitlint/load": "^19.5.0", "@commitlint/read": "^19.5.0", "@commitlint/types": "^19.5.0", @@ -389,9 +391,9 @@ } }, "node_modules/@commitlint/config-conventional": { - "version": "19.5.0", - "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-19.5.0.tgz", - "integrity": "sha512-OBhdtJyHNPryZKg0fFpZNOBM1ZDbntMvqMuSmpfyP86XSfwzGw4CaoYRG4RutUPg0BTK07VMRIkNJT6wi2zthg==", + "version": "19.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-19.6.0.tgz", + "integrity": "sha512-DJT40iMnTYtBtUfw9ApbsLZFke1zKh6llITVJ+x9mtpHD08gsNXaIRqHTmwTZL3dNX5+WoyK7pCN/5zswvkBCQ==", "dev": true, "license": "MIT", "dependencies": { @@ -496,9 +498,9 @@ } }, "node_modules/@commitlint/is-ignored": { - "version": "19.5.0", - "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-19.5.0.tgz", - "integrity": "sha512-0XQ7Llsf9iL/ANtwyZ6G0NGp5Y3EQ8eDQSxv/SRcfJ0awlBY4tHFAvwWbw66FVUaWICH7iE5en+FD9TQsokZ5w==", + "version": "19.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-19.6.0.tgz", + "integrity": "sha512-Ov6iBgxJQFR9koOupDPHvcHU9keFupDgtB3lObdEZDroiG4jj1rzky60fbQozFKVYRTUdrBGICHG0YVmRuAJmw==", "dev": true, "license": "MIT", "dependencies": { @@ -510,15 +512,15 @@ } }, "node_modules/@commitlint/lint": { - "version": "19.5.0", - "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-19.5.0.tgz", - "integrity": "sha512-cAAQwJcRtiBxQWO0eprrAbOurtJz8U6MgYqLz+p9kLElirzSCc0vGMcyCaA1O7AqBuxo11l1XsY3FhOFowLAAg==", + "version": "19.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-19.6.0.tgz", + "integrity": "sha512-LRo7zDkXtcIrpco9RnfhOKeg8PAnE3oDDoalnrVU/EVaKHYBWYL1DlRR7+3AWn0JiBqD8yKOfetVxJGdEtZ0tg==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/is-ignored": "^19.5.0", + "@commitlint/is-ignored": "^19.6.0", "@commitlint/parse": "^19.5.0", - "@commitlint/rules": "^19.5.0", + "@commitlint/rules": "^19.6.0", "@commitlint/types": "^19.5.0" }, "engines": { @@ -618,9 +620,9 @@ } }, "node_modules/@commitlint/rules": { - "version": "19.5.0", - "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-19.5.0.tgz", - "integrity": "sha512-hDW5TPyf/h1/EufSHEKSp6Hs+YVsDMHazfJ2azIk9tHPXS6UqSz1dIRs1gpqS3eMXgtkT7JH6TW4IShdqOwhAw==", + "version": "19.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-19.6.0.tgz", + "integrity": "sha512-1f2reW7lbrI0X0ozZMesS/WZxgPa4/wi56vFuJENBmed6mWq5KsheN/nxqnl/C23ioxpPO/PL6tXpiiFy5Bhjw==", "dev": true, "license": "MIT", "dependencies": { @@ -1184,9 +1186,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", - "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, "license": "MIT", "engines": { @@ -1194,9 +1196,9 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", - "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.0.tgz", + "integrity": "sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1209,9 +1211,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.6.0.tgz", - "integrity": "sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.0.tgz", + "integrity": "sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1219,9 +1221,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", - "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, "license": "MIT", "dependencies": { @@ -1243,9 +1245,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.11.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.11.1.tgz", - "integrity": "sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==", + "version": "9.15.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.15.0.tgz", + "integrity": "sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==", "dev": true, "license": "MIT", "engines": { @@ -1263,9 +1265,9 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz", - "integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz", + "integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1275,6 +1277,44 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -1290,9 +1330,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", - "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1565,13 +1605,13 @@ "license": "MIT" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "11.3.3", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.3.tgz", - "integrity": "sha512-o4WRoOJZlKqEEgj+i9CpcmnByvtzoUYC6I8PD2SA95M+BJ2x8h7oLcVOg9qcowWXBOdcTRsMZiwvM3EyLm9AfA==", + "version": "11.3.5", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.5.tgz", + "integrity": "sha512-cgwIRtKrpwhLoBi0CUNuY83DPGRMaWVjqVI/bGKsLJ4PzyWZNaEmhHroI2xlrVXkk6nFv0IsZpOp+ZWSWUS2AQ==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.5.0" + "@octokit/types": "^13.6.0" }, "engines": { "node": ">= 18" @@ -1599,9 +1639,9 @@ } }, "node_modules/@octokit/plugin-throttling": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-9.3.1.tgz", - "integrity": "sha512-Qd91H4liUBhwLB2h6jZ99bsxoQdhgPk6TdwnClPyTBSDAdviGPceViEgUwj+pcQDmB/rfAXAXK7MTochpHM3yQ==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-9.3.2.tgz", + "integrity": "sha512-FqpvcTpIWFpMMwIeSoypoJXysSAQ3R+ALJhXXSG1HTP3YZOIeLmcNcimKaXxTcws+Sh6yoRl13SJ5r8sXc1Fhw==", "dev": true, "license": "MIT", "dependencies": { @@ -1645,9 +1685,9 @@ } }, "node_modules/@octokit/types": { - "version": "13.5.1", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.5.1.tgz", - "integrity": "sha512-F41lGiWBKPIWPBgjSvaDXTTQptBujnozENAK3S//nj7xsFdYdirImKlBB/hTjr+Vii68SM+8jG3UJWRa6DMuDA==", + "version": "13.6.1", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.1.tgz", + "integrity": "sha512-PHZE9Z+kWXb23Ndik8MKPirBPziOc0D2/3KH1P+6jK5nGWe96kadZuE4jev2/Jq7FvIfTlT2Ltg8Fv2x1v0a5g==", "dev": true, "license": "MIT", "dependencies": { @@ -1723,19 +1763,19 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.0.tgz", - "integrity": "sha512-BJcu+a+Mpq476DMXG+hevgPSl56bkUoi88dKT8t3RyUp8kGuOh+2bU8Gs7zXDlu+fyZggnJ+iOBGrb/O1SorYg==", + "version": "28.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.1.tgz", + "integrity": "sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==", "dev": true, "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", "estree-walker": "^2.0.2", - "fdir": "^6.1.1", + "fdir": "^6.2.0", "is-reference": "1.2.1", "magic-string": "^0.30.3", - "picomatch": "^2.3.1" + "picomatch": "^4.0.2" }, "engines": { "node": ">=16.0.0 || 14 >= 14.17" @@ -1749,19 +1789,6 @@ } } }, - "node_modules/@rollup/plugin-commonjs/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/@rollup/plugin-json": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz", @@ -1809,9 +1836,9 @@ } }, "node_modules/@rollup/plugin-typescript": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.0.tgz", - "integrity": "sha512-Kzs8KGJofe7cfTRODsnG1jNGxSvU8gVoNNd7Z/QaY25AYwe2LSSUpx/kPxqF38NYkpR8de3m51r9uwJpDlz6dg==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.1.tgz", + "integrity": "sha512-t7O653DpfB5MbFrqPe/VcKFFkvRuFNp9qId3xq4Eth5xlyymzxNpye2z8Hrl0RIMuXTSr5GGcFpkdlMeacUiFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1872,208 +1899,252 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", - "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.3.tgz", + "integrity": "sha512-EzxVSkIvCFxUd4Mgm4xR9YXrcp976qVaHnqom/Tgm+vU79k4vV4eYTjmRvGfeoW8m9LVcsAy/lGjcgVegKEhLQ==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz", - "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.3.tgz", + "integrity": "sha512-LJc5pDf1wjlt9o/Giaw9Ofl+k/vLUaYsE2zeQGH85giX2F+wn/Cg8b3c5CDP3qmVmeO5NzwVUzQQxwZvC2eQKw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz", - "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.3.tgz", + "integrity": "sha512-OuRysZ1Mt7wpWJ+aYKblVbJWtVn3Cy52h8nLuNSzTqSesYw1EuN6wKp5NW/4eSre3mp12gqFRXOKTcN3AI3LqA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz", - "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.3.tgz", + "integrity": "sha512-xW//zjJMlJs2sOrCmXdB4d0uiilZsOdlGQIC/jjmMWT47lkLLoB1nsNhPUcnoqyi5YR6I4h+FjBpILxbEy8JRg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.3.tgz", + "integrity": "sha512-58E0tIcwZ+12nK1WiLzHOD8I0d0kdrY/+o7yFVPRHuVGY3twBwzwDdTIBGRxLmyjciMYl1B/U515GJy+yn46qw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.3.tgz", + "integrity": "sha512-78fohrpcVwTLxg1ZzBMlwEimoAJmY6B+5TsyAZ3Vok7YabRBUvjYTsRXPTjGEvv/mfgVBepbW28OlMEz4w8wGA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz", - "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.3.tgz", + "integrity": "sha512-h2Ay79YFXyQi+QZKo3ISZDyKaVD7uUvukEHTOft7kh00WF9mxAaxZsNs3o/eukbeKuH35jBvQqrT61fzKfAB/Q==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz", - "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.3.tgz", + "integrity": "sha512-Sv2GWmrJfRY57urktVLQ0VKZjNZGogVtASAgosDZ1aUB+ykPxSi3X1nWORL5Jk0sTIIwQiPH7iE3BMi9zGWfkg==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz", - "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.3.tgz", + "integrity": "sha512-FPoJBLsPW2bDNWjSrwNuTPUt30VnfM8GPGRoLCYKZpPx0xiIEdFip3dH6CqgoT0RnoGXptaNziM0WlKgBc+OWQ==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz", - "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.3.tgz", + "integrity": "sha512-TKxiOvBorYq4sUpA0JT+Fkh+l+G9DScnG5Dqx7wiiqVMiRSkzTclP35pE6eQQYjP4Gc8yEkJGea6rz4qyWhp3g==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz", - "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.3.tgz", + "integrity": "sha512-v2M/mPvVUKVOKITa0oCFksnQQ/TqGrT+yD0184/cWHIu0LoIuYHwox0Pm3ccXEz8cEQDLk6FPKd1CCm+PlsISw==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz", - "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.3.tgz", + "integrity": "sha512-LdrI4Yocb1a/tFVkzmOE5WyYRgEBOyEhWYJe4gsDWDiwnjYKjNs7PS6SGlTDB7maOHF4kxevsuNBl2iOcj3b4A==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz", - "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.3.tgz", + "integrity": "sha512-d4wVu6SXij/jyiwPvI6C4KxdGzuZOvJ6y9VfrcleHTwo68fl8vZC5ZYHsCVPUi4tndCfMlFniWgwonQ5CUpQcA==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz", - "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.3.tgz", + "integrity": "sha512-/6bn6pp1fsCGEY5n3yajmzZQAh+mW4QPItbiWxs69zskBzJuheb3tNynEjL+mKOsUSFK11X4LYF2BwwXnzWleA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz", - "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.3.tgz", + "integrity": "sha512-nBXOfJds8OzUT1qUreT/en3eyOXd2EH5b0wr2bVB5999qHdGKkzGzIyKYaKj02lXk6wpN71ltLIaQpu58YFBoQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz", - "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.3.tgz", + "integrity": "sha512-ogfbEVQgIZOz5WPWXF2HVb6En+kWzScuxJo/WdQTqEgeyGkaa2ui5sQav9Zkr7bnNCLK48uxmmK0TySm22eiuw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz", - "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.3.tgz", + "integrity": "sha512-ecE36ZBMLINqiTtSNQ1vzWc5pXLQHlf/oqGp/bSbi7iedcjcNb6QbCBNG73Euyy2C+l/fn8qKWEwxr+0SSfs3w==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz", - "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.3.tgz", + "integrity": "sha512-vliZLrDmYKyaUoMzEbMTg2JkerfBjn03KmAw9CykO0Zzkzoyd7o3iZNam/TpyWNjNT+Cz2iO3P9Smv2wgrR+Eg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -2162,9 +2233,9 @@ } }, "node_modules/@semantic-release/github": { - "version": "10.3.5", - "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-10.3.5.tgz", - "integrity": "sha512-svvRglGmvqvxjmDgkXhrjf0lC88oZowFhOfifTldbgX9Dzj0inEtMLaC+3/MkDEmxmaQjWmF5Q/0CMIvPNSVdQ==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-11.0.1.tgz", + "integrity": "sha512-Z9cr0LgU/zgucbT9cksH0/pX9zmVda9hkDPcgIE0uvjMQ8w/mElDivGjx1w1pEQ+MuQJ5CBq3VCF16S6G4VH3A==", "dev": true, "license": "MIT", "dependencies": { @@ -2189,7 +2260,7 @@ "node": ">=20.8.1" }, "peerDependencies": { - "semantic-release": ">=20.1.0" + "semantic-release": ">=24.1.0" } }, "node_modules/@semantic-release/npm": { @@ -2427,9 +2498,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true, "license": "MIT" }, @@ -2441,13 +2512,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.6.1.tgz", - "integrity": "sha512-V48tCfcKb/e6cVUigLAaJDAILdMP0fUW6BidkPK4GpGjXcfbnoHasCZDwz3N3yVt5we2RHm4XTQCpv0KJz9zqw==", + "version": "22.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.1.tgz", + "integrity": "sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.19.8" } }, "node_modules/@types/normalize-package-data": { @@ -2472,17 +2543,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz", - "integrity": "sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.15.0.tgz", + "integrity": "sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/type-utils": "8.7.0", - "@typescript-eslint/utils": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/type-utils": "8.15.0", + "@typescript-eslint/utils": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -2506,16 +2577,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.7.0.tgz", - "integrity": "sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.15.0.tgz", + "integrity": "sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/typescript-estree": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/typescript-estree": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "debug": "^4.3.4" }, "engines": { @@ -2535,14 +2606,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz", - "integrity": "sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.15.0.tgz", + "integrity": "sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0" + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2553,14 +2624,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz", - "integrity": "sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.15.0.tgz", + "integrity": "sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.7.0", - "@typescript-eslint/utils": "8.7.0", + "@typescript-eslint/typescript-estree": "8.15.0", + "@typescript-eslint/utils": "8.15.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -2571,6 +2642,9 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, "peerDependenciesMeta": { "typescript": { "optional": true @@ -2578,9 +2652,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.7.0.tgz", - "integrity": "sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.15.0.tgz", + "integrity": "sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==", "dev": true, "license": "MIT", "engines": { @@ -2592,14 +2666,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz", - "integrity": "sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.15.0.tgz", + "integrity": "sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2647,16 +2721,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.7.0.tgz", - "integrity": "sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.15.0.tgz", + "integrity": "sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/typescript-estree": "8.7.0" + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/typescript-estree": "8.15.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2667,17 +2741,22 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz", - "integrity": "sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.15.0.tgz", + "integrity": "sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.7.0", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.15.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2687,23 +2766,36 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@vitest/coverage-v8": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.1.tgz", - "integrity": "sha512-md/A7A3c42oTT8JUHSqjP5uKTWJejzUW4jalpvs+rZ27gsURsMU8DEb+8Jf8C6Kj2gwfSHJqobDNBuoqlm0cFw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.5.tgz", + "integrity": "sha512-/RoopB7XGW7UEkUndRXF87A9CwkoZAJW01pj8/3pgmDVsjMH2IKy6H1A38po9tmUlwhSyYs0az82rbKd9Yaynw==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.3.0", "@bcoe/v8-coverage": "^0.2.3", - "debug": "^4.3.6", + "debug": "^4.3.7", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-lib-source-maps": "^5.0.6", "istanbul-reports": "^3.1.7", - "magic-string": "^0.30.11", - "magicast": "^0.3.4", - "std-env": "^3.7.0", + "magic-string": "^0.30.12", + "magicast": "^0.3.5", + "std-env": "^3.8.0", "test-exclude": "^7.0.1", "tinyrainbow": "^1.2.0" }, @@ -2711,8 +2803,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "2.1.1", - "vitest": "2.1.1" + "@vitest/browser": "2.1.5", + "vitest": "2.1.5" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -2721,15 +2813,15 @@ } }, "node_modules/@vitest/expect": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.1.tgz", - "integrity": "sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.5.tgz", + "integrity": "sha512-nZSBTW1XIdpZvEJyoP/Sy8fUg0b8od7ZpGDkTUcfJ7wz/VoZAFzFfLyxVxGFhUjJzhYqSbIpfMtl/+k/dpWa3Q==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "2.1.1", - "@vitest/utils": "2.1.1", - "chai": "^5.1.1", + "@vitest/spy": "2.1.5", + "@vitest/utils": "2.1.5", + "chai": "^5.1.2", "tinyrainbow": "^1.2.0" }, "funding": { @@ -2737,22 +2829,21 @@ } }, "node_modules/@vitest/mocker": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.1.tgz", - "integrity": "sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.5.tgz", + "integrity": "sha512-XYW6l3UuBmitWqSUXTNXcVBUCRytDogBsWuNXQijc00dtnU/9OqpXWp4OJroVrad/gLIomAq9aW8yWDBtMthhQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "^2.1.0-beta.1", + "@vitest/spy": "2.1.5", "estree-walker": "^3.0.3", - "magic-string": "^0.30.11" + "magic-string": "^0.30.12" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/spy": "2.1.1", - "msw": "^2.3.5", + "msw": "^2.4.9", "vite": "^5.0.0" }, "peerDependenciesMeta": { @@ -2775,9 +2866,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.1.tgz", - "integrity": "sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.5.tgz", + "integrity": "sha512-4ZOwtk2bqG5Y6xRGHcveZVr+6txkH7M2e+nPFd6guSoN638v/1XQ0K06eOpi0ptVU/2tW/pIU4IoPotY/GZ9fw==", "dev": true, "license": "MIT", "dependencies": { @@ -2788,13 +2879,13 @@ } }, "node_modules/@vitest/runner": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.1.tgz", - "integrity": "sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.5.tgz", + "integrity": "sha512-pKHKy3uaUdh7X6p1pxOkgkVAFW7r2I818vHDthYLvUyjRfkKOU6P45PztOch4DZarWQne+VOaIMwA/erSSpB9g==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "2.1.1", + "@vitest/utils": "2.1.5", "pathe": "^1.1.2" }, "funding": { @@ -2802,14 +2893,14 @@ } }, "node_modules/@vitest/snapshot": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.1.tgz", - "integrity": "sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.5.tgz", + "integrity": "sha512-zmYw47mhfdfnYbuhkQvkkzYroXUumrwWDGlMjpdUr4jBd3HZiV2w7CQHj+z7AAS4VOtWxI4Zt4bWt4/sKcoIjg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.1.1", - "magic-string": "^0.30.11", + "@vitest/pretty-format": "2.1.5", + "magic-string": "^0.30.12", "pathe": "^1.1.2" }, "funding": { @@ -2817,27 +2908,27 @@ } }, "node_modules/@vitest/spy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.1.tgz", - "integrity": "sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.5.tgz", + "integrity": "sha512-aWZF3P0r3w6DiYTVskOYuhBc7EMc3jvn1TkBg8ttylFFRqNN2XGD7V5a4aQdk6QiUzZQ4klNBSpCLJgWNdIiNw==", "dev": true, "license": "MIT", "dependencies": { - "tinyspy": "^3.0.0" + "tinyspy": "^3.0.2" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/utils": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.1.tgz", - "integrity": "sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.5.tgz", + "integrity": "sha512-yfj6Yrp0Vesw2cwJbP+cl04OC+IHFsuQsrsJBL9pyGeQXE56v1UAOQco+SR55Vf1nQzfV0QJg1Qum7AaWUwwYg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.1.1", - "loupe": "^3.1.1", + "@vitest/pretty-format": "2.1.5", + "loupe": "^3.1.2", "tinyrainbow": "^1.2.0" }, "funding": { @@ -2845,9 +2936,9 @@ } }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "license": "MIT", "bin": { @@ -2914,27 +3005,26 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/algo-msgpack-with-bigint": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/algo-msgpack-with-bigint/-/algo-msgpack-with-bigint-2.1.1.tgz", - "integrity": "sha512-F1tGh056XczEaEAqu7s+hlZUDWwOBT70Eq0lfMpBP2YguSQVyxRbprLq5rELXKQOyOaixTWYhMeMQMzP0U5FoQ==", + "node_modules/algorand-msgpack": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/algorand-msgpack/-/algorand-msgpack-1.1.0.tgz", + "integrity": "sha512-08k7pBQnkaUB5p+jL7f1TRaUIlTSDE0cesFu1mD7llLao+1cAhtvvZmGE3OnisTd0xOn118QMw74SRqddqaYvw==", "dev": true, "license": "ISC", "peer": true, "engines": { - "node": ">= 10" + "node": ">= 14" } }, "node_modules/algosdk": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/algosdk/-/algosdk-2.9.0.tgz", - "integrity": "sha512-o0n0nLMbTX6SFQdMUk2/2sy50jmEmZk5OTPYSh2aAeP8DUPxrhjMPfwGsYNvaO+qk75MixC2eWpfA9vygCQ/Mg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/algosdk/-/algosdk-3.0.0.tgz", + "integrity": "sha512-PIKZ/YvbBpCudduug4KSH1CY/pTotI7/ccbUIbXKtcI9Onevl+57E+K5X4ow4gsCdysZ8zVvSLdxuCcXvsmPOw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "algo-msgpack-with-bigint": "^2.1.1", - "buffer": "^6.0.3", + "algorand-msgpack": "^1.1.0", "hi-base32": "^0.5.1", "js-sha256": "^0.9.0", "js-sha3": "^0.8.0", @@ -3263,9 +3353,9 @@ } }, "node_modules/chai": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz", - "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", + "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==", "dev": true, "license": "MIT", "dependencies": { @@ -3748,9 +3838,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -4276,6 +4366,13 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true, + "license": "MIT" + }, "node_modules/es-object-atoms": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", @@ -4386,32 +4483,32 @@ } }, "node_modules/eslint": { - "version": "9.11.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.11.1.tgz", - "integrity": "sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==", + "version": "9.15.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.15.0.tgz", + "integrity": "sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.11.0", - "@eslint/config-array": "^0.18.0", - "@eslint/core": "^0.6.0", - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.11.1", - "@eslint/plugin-kit": "^0.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.9.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.15.0", + "@eslint/plugin-kit": "^0.2.3", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.3.0", - "@nodelib/fs.walk": "^1.2.8", + "@humanwhocodes/retry": "^0.4.1", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.5", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.0.2", - "eslint-visitor-keys": "^4.0.0", - "espree": "^10.1.0", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -4421,14 +4518,11 @@ "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" @@ -4491,9 +4585,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", - "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -4520,13 +4614,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT" - }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -4545,9 +4632,9 @@ } }, "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -4558,15 +4645,15 @@ } }, "node_modules/espree": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", - "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.12.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.0.0" + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4576,9 +4663,9 @@ } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -4685,6 +4772,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/expect-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.1.0.tgz", + "integrity": "sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -5054,16 +5151,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, "node_modules/get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -5917,16 +6004,6 @@ "node": ">=8" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", @@ -6522,14 +6599,11 @@ "license": "MIT" }, "node_modules/loupe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", - "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.2.tgz", + "integrity": "sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==", "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.1" - } + "license": "MIT" }, "node_modules/lru-cache": { "version": "11.0.1", @@ -6541,9 +6615,9 @@ } }, "node_modules/magic-string": { - "version": "0.30.11", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", - "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "version": "0.30.13", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.13.tgz", + "integrity": "sha512-8rYBO+MsWkgjDSOvLomYnzhdwEG51olQ4zL5KXnNJWV5MNmrb4rTZdrtkhxjnD/QyZUqR/Z/XDsUs/4ej2nx0g==", "dev": true, "license": "MIT", "dependencies": { @@ -6551,14 +6625,14 @@ } }, "node_modules/magicast": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.4.tgz", - "integrity": "sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.24.4", - "@babel/types": "^7.24.0", + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", "source-map-js": "^1.2.0" } }, @@ -6811,13 +6885,6 @@ "dev": true, "license": "MIT" }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true, - "license": "MIT" - }, "node_modules/node-emoji": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-2.1.3.tgz", @@ -6882,9 +6949,9 @@ } }, "node_modules/npm": { - "version": "10.8.3", - "resolved": "https://registry.npmjs.org/npm/-/npm-10.8.3.tgz", - "integrity": "sha512-0IQlyAYvVtQ7uOhDFYZCGK8kkut2nh8cpAdA9E6FvRSJaTgtZRZgNjlC5ZCct//L73ygrpY93CxXpRJDtNqPVg==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/npm/-/npm-10.9.1.tgz", + "integrity": "sha512-yJUw03xLqjiv1D52oHeoS5qmOEC5hkJlhP1cWlSrCgshuxWVyFEEK3M3hLC0NwbTaklLTYrhoIanYsuNP5WUKg==", "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", @@ -6966,73 +7033,73 @@ ], "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^7.5.4", - "@npmcli/config": "^8.3.4", - "@npmcli/fs": "^3.1.1", - "@npmcli/map-workspaces": "^3.0.6", - "@npmcli/package-json": "^5.2.0", - "@npmcli/promise-spawn": "^7.0.2", - "@npmcli/redact": "^2.0.1", - "@npmcli/run-script": "^8.1.0", - "@sigstore/tuf": "^2.3.4", - "abbrev": "^2.0.0", + "@npmcli/arborist": "^8.0.0", + "@npmcli/config": "^9.0.0", + "@npmcli/fs": "^4.0.0", + "@npmcli/map-workspaces": "^4.0.1", + "@npmcli/package-json": "^6.0.1", + "@npmcli/promise-spawn": "^8.0.2", + "@npmcli/redact": "^3.0.0", + "@npmcli/run-script": "^9.0.1", + "@sigstore/tuf": "^3.0.0", + "abbrev": "^3.0.0", "archy": "~1.0.0", - "cacache": "^18.0.4", + "cacache": "^19.0.1", "chalk": "^5.3.0", - "ci-info": "^4.0.0", + "ci-info": "^4.1.0", "cli-columns": "^4.0.0", "fastest-levenshtein": "^1.0.16", "fs-minipass": "^3.0.3", "glob": "^10.4.5", "graceful-fs": "^4.2.11", - "hosted-git-info": "^7.0.2", - "ini": "^4.1.3", - "init-package-json": "^6.0.3", + "hosted-git-info": "^8.0.2", + "ini": "^5.0.0", + "init-package-json": "^7.0.1", "is-cidr": "^5.1.0", - "json-parse-even-better-errors": "^3.0.2", - "libnpmaccess": "^8.0.6", - "libnpmdiff": "^6.1.4", - "libnpmexec": "^8.1.4", - "libnpmfund": "^5.0.12", - "libnpmhook": "^10.0.5", - "libnpmorg": "^6.0.6", - "libnpmpack": "^7.0.4", - "libnpmpublish": "^9.0.9", - "libnpmsearch": "^7.0.6", - "libnpmteam": "^6.0.5", - "libnpmversion": "^6.0.3", - "make-fetch-happen": "^13.0.1", + "json-parse-even-better-errors": "^4.0.0", + "libnpmaccess": "^9.0.0", + "libnpmdiff": "^7.0.0", + "libnpmexec": "^9.0.0", + "libnpmfund": "^6.0.0", + "libnpmhook": "^11.0.0", + "libnpmorg": "^7.0.0", + "libnpmpack": "^8.0.0", + "libnpmpublish": "^10.0.1", + "libnpmsearch": "^8.0.0", + "libnpmteam": "^7.0.0", + "libnpmversion": "^7.0.0", + "make-fetch-happen": "^14.0.3", "minimatch": "^9.0.5", "minipass": "^7.1.1", "minipass-pipeline": "^1.2.4", "ms": "^2.1.2", "node-gyp": "^10.2.0", - "nopt": "^7.2.1", - "normalize-package-data": "^6.0.2", - "npm-audit-report": "^5.0.0", - "npm-install-checks": "^6.3.0", - "npm-package-arg": "^11.0.3", - "npm-pick-manifest": "^9.1.0", - "npm-profile": "^10.0.0", - "npm-registry-fetch": "^17.1.0", - "npm-user-validate": "^2.0.1", + "nopt": "^8.0.0", + "normalize-package-data": "^7.0.0", + "npm-audit-report": "^6.0.0", + "npm-install-checks": "^7.1.1", + "npm-package-arg": "^12.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-profile": "^11.0.1", + "npm-registry-fetch": "^18.0.2", + "npm-user-validate": "^3.0.0", "p-map": "^4.0.0", - "pacote": "^18.0.6", - "parse-conflict-json": "^3.0.1", - "proc-log": "^4.2.0", + "pacote": "^19.0.1", + "parse-conflict-json": "^4.0.0", + "proc-log": "^5.0.0", "qrcode-terminal": "^0.12.0", - "read": "^3.0.1", + "read": "^4.0.0", "semver": "^7.6.3", "spdx-expression-parse": "^4.0.0", - "ssri": "^10.0.6", + "ssri": "^12.0.0", "supports-color": "^9.4.0", "tar": "^6.2.1", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", "treeverse": "^3.0.0", - "validate-npm-package-name": "^5.0.1", - "which": "^4.0.0", - "write-file-atomic": "^5.0.1" + "validate-npm-package-name": "^6.0.0", + "which": "^5.0.0", + "write-file-atomic": "^6.0.0" }, "bin": { "npm": "bin/npm-cli.js", @@ -7113,23 +7180,6 @@ "dev": true, "license": "MIT" }, - "node_modules/npm-run-all/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, "node_modules/npm-run-all/node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -7150,49 +7200,6 @@ "node": ">=4" } }, - "node_modules/npm-run-all/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/npm-run-all/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-all/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/npm-run-all/node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -7206,19 +7213,6 @@ "node": ">=4" } }, - "node_modules/npm-run-all/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/npm-run-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz", @@ -7280,7 +7274,7 @@ } }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", + "version": "6.1.0", "dev": true, "inBundle": true, "license": "MIT", @@ -7329,14 +7323,26 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/npm/node_modules/@isaacs/string-locale-compare": { - "version": "1.1.0", - "dev": true, - "inBundle": true, - "license": "ISC" - }, - "node_modules/npm/node_modules/@npmcli/agent": { - "version": "2.2.2", + "node_modules/npm/node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/npm/node_modules/@isaacs/string-locale-compare": { + "version": "1.1.0", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/@npmcli/agent": { + "version": "3.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -7348,48 +7354,48 @@ "socks-proxy-agent": "^8.0.3" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/arborist": { - "version": "7.5.4", + "version": "8.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/fs": "^3.1.1", - "@npmcli/installed-package-contents": "^2.1.0", - "@npmcli/map-workspaces": "^3.0.2", - "@npmcli/metavuln-calculator": "^7.1.1", - "@npmcli/name-from-folder": "^2.0.0", - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/package-json": "^5.1.0", - "@npmcli/query": "^3.1.0", - "@npmcli/redact": "^2.0.0", - "@npmcli/run-script": "^8.1.0", - "bin-links": "^4.0.4", - "cacache": "^18.0.3", + "@npmcli/fs": "^4.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/map-workspaces": "^4.0.1", + "@npmcli/metavuln-calculator": "^8.0.0", + "@npmcli/name-from-folder": "^3.0.0", + "@npmcli/node-gyp": "^4.0.0", + "@npmcli/package-json": "^6.0.1", + "@npmcli/query": "^4.0.0", + "@npmcli/redact": "^3.0.0", + "@npmcli/run-script": "^9.0.1", + "bin-links": "^5.0.0", + "cacache": "^19.0.1", "common-ancestor-path": "^1.0.1", - "hosted-git-info": "^7.0.2", - "json-parse-even-better-errors": "^3.0.2", + "hosted-git-info": "^8.0.0", + "json-parse-even-better-errors": "^4.0.0", "json-stringify-nice": "^1.1.4", "lru-cache": "^10.2.2", "minimatch": "^9.0.4", - "nopt": "^7.2.1", - "npm-install-checks": "^6.2.0", - "npm-package-arg": "^11.0.2", - "npm-pick-manifest": "^9.0.1", - "npm-registry-fetch": "^17.0.1", - "pacote": "^18.0.6", - "parse-conflict-json": "^3.0.0", - "proc-log": "^4.2.0", - "proggy": "^2.0.0", + "nopt": "^8.0.0", + "npm-install-checks": "^7.1.0", + "npm-package-arg": "^12.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-registry-fetch": "^18.0.1", + "pacote": "^19.0.0", + "parse-conflict-json": "^4.0.0", + "proc-log": "^5.0.0", + "proggy": "^3.0.0", "promise-all-reject-late": "^1.0.0", "promise-call-limit": "^3.0.1", - "read-package-json-fast": "^3.0.2", + "read-package-json-fast": "^4.0.0", "semver": "^7.3.7", - "ssri": "^10.0.6", + "ssri": "^12.0.0", "treeverse": "^3.0.0", "walk-up-path": "^3.0.1" }, @@ -7397,30 +7403,30 @@ "arborist": "bin/index.js" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/config": { - "version": "8.3.4", + "version": "9.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/map-workspaces": "^3.0.2", - "@npmcli/package-json": "^5.1.1", + "@npmcli/map-workspaces": "^4.0.1", + "@npmcli/package-json": "^6.0.1", "ci-info": "^4.0.0", - "ini": "^4.1.2", - "nopt": "^7.2.1", - "proc-log": "^4.2.0", + "ini": "^5.0.0", + "nopt": "^8.0.0", + "proc-log": "^5.0.0", "semver": "^7.3.5", "walk-up-path": "^3.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/fs": { - "version": "3.1.1", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -7428,160 +7434,191 @@ "semver": "^7.3.5" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/git": { - "version": "5.0.8", + "version": "6.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/promise-spawn": "^7.0.0", - "ini": "^4.1.3", + "@npmcli/promise-spawn": "^8.0.0", + "ini": "^5.0.0", "lru-cache": "^10.0.1", - "npm-pick-manifest": "^9.0.0", - "proc-log": "^4.0.0", + "npm-pick-manifest": "^10.0.0", + "proc-log": "^5.0.0", "promise-inflight": "^1.0.1", "promise-retry": "^2.0.1", "semver": "^7.3.5", - "which": "^4.0.0" + "which": "^5.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/installed-package-contents": { - "version": "2.1.0", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "npm-bundled": "^3.0.0", - "npm-normalize-package-bin": "^3.0.0" + "npm-bundled": "^4.0.0", + "npm-normalize-package-bin": "^4.0.0" }, "bin": { "installed-package-contents": "bin/index.js" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/map-workspaces": { - "version": "3.0.6", + "version": "4.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/name-from-folder": "^2.0.0", + "@npmcli/name-from-folder": "^3.0.0", + "@npmcli/package-json": "^6.0.0", "glob": "^10.2.2", - "minimatch": "^9.0.0", - "read-package-json-fast": "^3.0.0" + "minimatch": "^9.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/metavuln-calculator": { - "version": "7.1.1", + "version": "8.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "cacache": "^18.0.0", - "json-parse-even-better-errors": "^3.0.0", - "pacote": "^18.0.0", - "proc-log": "^4.1.0", + "cacache": "^19.0.0", + "json-parse-even-better-errors": "^4.0.0", + "pacote": "^20.0.0", + "proc-log": "^5.0.0", "semver": "^7.3.5" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@npmcli/metavuln-calculator/node_modules/pacote": { + "version": "20.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^6.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/package-json": "^6.0.0", + "@npmcli/promise-spawn": "^8.0.0", + "@npmcli/run-script": "^9.0.0", + "cacache": "^19.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^7.0.2", + "npm-package-arg": "^12.0.0", + "npm-packlist": "^9.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-registry-fetch": "^18.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "sigstore": "^3.0.0", + "ssri": "^12.0.0", + "tar": "^6.1.11" + }, + "bin": { + "pacote": "bin/index.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/name-from-folder": { - "version": "2.0.0", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/node-gyp": { - "version": "3.0.0", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/package-json": { - "version": "5.2.0", + "version": "6.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/git": "^5.0.0", + "@npmcli/git": "^6.0.0", "glob": "^10.2.2", - "hosted-git-info": "^7.0.0", - "json-parse-even-better-errors": "^3.0.0", - "normalize-package-data": "^6.0.0", - "proc-log": "^4.0.0", + "hosted-git-info": "^8.0.0", + "json-parse-even-better-errors": "^4.0.0", + "normalize-package-data": "^7.0.0", + "proc-log": "^5.0.0", "semver": "^7.5.3" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/promise-spawn": { - "version": "7.0.2", + "version": "8.0.2", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "which": "^4.0.0" + "which": "^5.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/query": { - "version": "3.1.0", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "postcss-selector-parser": "^6.0.10" + "postcss-selector-parser": "^6.1.2" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/redact": { - "version": "2.0.1", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/run-script": { - "version": "8.1.0", + "version": "9.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/package-json": "^5.0.0", - "@npmcli/promise-spawn": "^7.0.0", + "@npmcli/node-gyp": "^4.0.0", + "@npmcli/package-json": "^6.0.0", + "@npmcli/promise-spawn": "^8.0.0", "node-gyp": "^10.0.0", - "proc-log": "^4.0.0", - "which": "^4.0.0" + "proc-log": "^5.0.0", + "which": "^5.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@pkgjs/parseargs": { @@ -7594,27 +7631,6 @@ "node": ">=14" } }, - "node_modules/npm/node_modules/@sigstore/bundle": { - "version": "2.3.2", - "dev": true, - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@sigstore/protobuf-specs": "^0.3.2" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@sigstore/core": { - "version": "1.1.0", - "dev": true, - "inBundle": true, - "license": "Apache-2.0", - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, "node_modules/npm/node_modules/@sigstore/protobuf-specs": { "version": "0.3.2", "dev": true, @@ -7624,48 +7640,17 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/npm/node_modules/@sigstore/sign": { - "version": "2.3.2", - "dev": true, - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@sigstore/bundle": "^2.3.2", - "@sigstore/core": "^1.0.0", - "@sigstore/protobuf-specs": "^0.3.2", - "make-fetch-happen": "^13.0.1", - "proc-log": "^4.2.0", - "promise-retry": "^2.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, "node_modules/npm/node_modules/@sigstore/tuf": { - "version": "2.3.4", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { "@sigstore/protobuf-specs": "^0.3.2", - "tuf-js": "^2.2.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@sigstore/verify": { - "version": "1.2.1", - "dev": true, - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@sigstore/bundle": "^2.3.2", - "@sigstore/core": "^1.1.0", - "@sigstore/protobuf-specs": "^0.3.2" + "tuf-js": "^3.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@tufjs/canonical-json": { @@ -7677,26 +7662,13 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/npm/node_modules/@tufjs/models": { - "version": "2.0.1", - "dev": true, - "inBundle": true, - "license": "MIT", - "dependencies": { - "@tufjs/canonical-json": "2.0.0", - "minimatch": "^9.0.4" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, "node_modules/npm/node_modules/abbrev": { - "version": "2.0.0", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/agent-base": { @@ -7764,18 +7736,19 @@ "license": "MIT" }, "node_modules/npm/node_modules/bin-links": { - "version": "4.0.4", + "version": "5.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "cmd-shim": "^6.0.0", - "npm-normalize-package-bin": "^3.0.0", - "read-cmd-shim": "^4.0.0", - "write-file-atomic": "^5.0.0" + "cmd-shim": "^7.0.0", + "npm-normalize-package-bin": "^4.0.0", + "proc-log": "^5.0.0", + "read-cmd-shim": "^5.0.0", + "write-file-atomic": "^6.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/binary-extensions": { @@ -7800,12 +7773,12 @@ } }, "node_modules/npm/node_modules/cacache": { - "version": "18.0.4", + "version": "19.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/fs": "^3.1.0", + "@npmcli/fs": "^4.0.0", "fs-minipass": "^3.0.0", "glob": "^10.2.2", "lru-cache": "^10.0.1", @@ -7813,13 +7786,88 @@ "minipass-collect": "^2.0.1", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "p-map": "^4.0.0", - "ssri": "^10.0.0", - "tar": "^6.1.11", - "unique-filename": "^3.0.0" + "p-map": "^7.0.2", + "ssri": "^12.0.0", + "tar": "^7.4.3", + "unique-filename": "^4.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/chownr": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/minizlib": { + "version": "3.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.4", + "rimraf": "^5.0.5" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/mkdirp": { + "version": "3.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/p-map": { + "version": "7.0.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/tar": { + "version": "7.4.3", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/yallist": { + "version": "5.0.0", + "dev": true, + "inBundle": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" } }, "node_modules/npm/node_modules/chalk": { @@ -7844,7 +7892,7 @@ } }, "node_modules/npm/node_modules/ci-info": { - "version": "4.0.0", + "version": "4.1.0", "dev": true, "funding": [ { @@ -7893,12 +7941,12 @@ } }, "node_modules/npm/node_modules/cmd-shim": { - "version": "6.0.3", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/color-convert": { @@ -7926,7 +7974,7 @@ "license": "ISC" }, "node_modules/npm/node_modules/cross-spawn": { - "version": "7.0.3", + "version": "7.0.6", "dev": true, "inBundle": true, "license": "MIT", @@ -7967,12 +8015,12 @@ } }, "node_modules/npm/node_modules/debug": { - "version": "4.3.6", + "version": "4.3.7", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -7983,12 +8031,6 @@ } } }, - "node_modules/npm/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "inBundle": true, - "license": "MIT" - }, "node_modules/npm/node_modules/diff": { "version": "5.2.0", "dev": true, @@ -8105,7 +8147,7 @@ "license": "ISC" }, "node_modules/npm/node_modules/hosted-git-info": { - "version": "7.0.2", + "version": "8.0.2", "dev": true, "inBundle": true, "license": "ISC", @@ -8113,7 +8155,7 @@ "lru-cache": "^10.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/http-cache-semantics": { @@ -8162,7 +8204,7 @@ } }, "node_modules/npm/node_modules/ignore-walk": { - "version": "6.0.5", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -8170,7 +8212,7 @@ "minimatch": "^9.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/imurmurhash": { @@ -8192,30 +8234,30 @@ } }, "node_modules/npm/node_modules/ini": { - "version": "4.1.3", + "version": "5.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/init-package-json": { - "version": "6.0.3", + "version": "7.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/package-json": "^5.0.0", - "npm-package-arg": "^11.0.0", - "promzard": "^1.0.0", - "read": "^3.0.1", + "@npmcli/package-json": "^6.0.0", + "npm-package-arg": "^12.0.0", + "promzard": "^2.0.0", + "read": "^4.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4", - "validate-npm-package-name": "^5.0.0" + "validate-npm-package-name": "^6.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/ip-address": { @@ -8298,12 +8340,12 @@ "license": "MIT" }, "node_modules/npm/node_modules/json-parse-even-better-errors": { - "version": "3.0.2", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "MIT", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/json-stringify-nice": { @@ -8337,169 +8379,169 @@ "license": "MIT" }, "node_modules/npm/node_modules/libnpmaccess": { - "version": "8.0.6", + "version": "9.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "npm-package-arg": "^11.0.2", - "npm-registry-fetch": "^17.0.1" + "npm-package-arg": "^12.0.0", + "npm-registry-fetch": "^18.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmdiff": { - "version": "6.1.4", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^7.5.4", - "@npmcli/installed-package-contents": "^2.1.0", + "@npmcli/arborist": "^8.0.0", + "@npmcli/installed-package-contents": "^3.0.0", "binary-extensions": "^2.3.0", "diff": "^5.1.0", "minimatch": "^9.0.4", - "npm-package-arg": "^11.0.2", - "pacote": "^18.0.6", + "npm-package-arg": "^12.0.0", + "pacote": "^19.0.0", "tar": "^6.2.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmexec": { - "version": "8.1.4", + "version": "9.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^7.5.4", - "@npmcli/run-script": "^8.1.0", + "@npmcli/arborist": "^8.0.0", + "@npmcli/run-script": "^9.0.1", "ci-info": "^4.0.0", - "npm-package-arg": "^11.0.2", - "pacote": "^18.0.6", - "proc-log": "^4.2.0", - "read": "^3.0.1", - "read-package-json-fast": "^3.0.2", + "npm-package-arg": "^12.0.0", + "pacote": "^19.0.0", + "proc-log": "^5.0.0", + "read": "^4.0.0", + "read-package-json-fast": "^4.0.0", "semver": "^7.3.7", "walk-up-path": "^3.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmfund": { - "version": "5.0.12", + "version": "6.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^7.5.4" + "@npmcli/arborist": "^8.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmhook": { - "version": "10.0.5", + "version": "11.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^17.0.1" + "npm-registry-fetch": "^18.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmorg": { - "version": "6.0.6", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^17.0.1" + "npm-registry-fetch": "^18.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmpack": { - "version": "7.0.4", + "version": "8.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^7.5.4", - "@npmcli/run-script": "^8.1.0", - "npm-package-arg": "^11.0.2", - "pacote": "^18.0.6" + "@npmcli/arborist": "^8.0.0", + "@npmcli/run-script": "^9.0.1", + "npm-package-arg": "^12.0.0", + "pacote": "^19.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmpublish": { - "version": "9.0.9", + "version": "10.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { "ci-info": "^4.0.0", - "normalize-package-data": "^6.0.1", - "npm-package-arg": "^11.0.2", - "npm-registry-fetch": "^17.0.1", - "proc-log": "^4.2.0", + "normalize-package-data": "^7.0.0", + "npm-package-arg": "^12.0.0", + "npm-registry-fetch": "^18.0.1", + "proc-log": "^5.0.0", "semver": "^7.3.7", - "sigstore": "^2.2.0", - "ssri": "^10.0.6" + "sigstore": "^3.0.0", + "ssri": "^12.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmsearch": { - "version": "7.0.6", + "version": "8.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "npm-registry-fetch": "^17.0.1" + "npm-registry-fetch": "^18.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmteam": { - "version": "6.0.5", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^17.0.1" + "npm-registry-fetch": "^18.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmversion": { - "version": "6.0.3", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/git": "^5.0.7", - "@npmcli/run-script": "^8.1.0", - "json-parse-even-better-errors": "^3.0.2", - "proc-log": "^4.2.0", + "@npmcli/git": "^6.0.1", + "@npmcli/run-script": "^9.0.1", + "json-parse-even-better-errors": "^4.0.0", + "proc-log": "^5.0.0", "semver": "^7.3.7" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/lru-cache": { @@ -8509,26 +8551,34 @@ "license": "ISC" }, "node_modules/npm/node_modules/make-fetch-happen": { - "version": "13.0.1", + "version": "14.0.3", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/agent": "^2.0.0", - "cacache": "^18.0.0", + "@npmcli/agent": "^3.0.0", + "cacache": "^19.0.1", "http-cache-semantics": "^4.1.1", - "is-lambda": "^1.0.1", "minipass": "^7.0.2", - "minipass-fetch": "^3.0.0", + "minipass-fetch": "^4.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "proc-log": "^4.2.0", + "negotiator": "^1.0.0", + "proc-log": "^5.0.0", "promise-retry": "^2.0.1", - "ssri": "^10.0.0" + "ssri": "^12.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/make-fetch-happen/node_modules/negotiator": { + "version": "1.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" } }, "node_modules/npm/node_modules/minimatch": { @@ -8568,22 +8618,35 @@ } }, "node_modules/npm/node_modules/minipass-fetch": { - "version": "3.0.5", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" + "minizlib": "^3.0.1" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" }, "optionalDependencies": { "encoding": "^0.1.13" } }, + "node_modules/npm/node_modules/minipass-fetch/node_modules/minizlib": { + "version": "3.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.4", + "rimraf": "^5.0.5" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/npm/node_modules/minipass-flush": { "version": "1.0.5", "dev": true, @@ -8700,16 +8763,16 @@ "license": "MIT" }, "node_modules/npm/node_modules/mute-stream": { - "version": "1.0.0", + "version": "2.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/negotiator": { - "version": "0.6.3", + "version": "0.6.4", "dev": true, "inBundle": true, "license": "MIT", @@ -8721,28 +8784,212 @@ "version": "10.2.0", "dev": true, "inBundle": true, - "license": "MIT", + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^10.3.10", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^13.0.0", + "nopt": "^7.0.0", + "proc-log": "^4.1.0", + "semver": "^7.3.5", + "tar": "^6.2.1", + "which": "^4.0.0" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/@npmcli/agent": { + "version": "2.2.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/@npmcli/fs": { + "version": "3.1.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/abbrev": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache": { + "version": "18.0.4", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/isexe": { + "version": "3.1.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/make-fetch-happen": { + "version": "13.0.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/agent": "^2.0.0", + "cacache": "^18.0.0", + "http-cache-semantics": "^4.1.1", + "is-lambda": "^1.0.1", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "proc-log": "^4.2.0", + "promise-retry": "^2.0.1", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/minipass-fetch": { + "version": "3.0.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/nopt": { + "version": "7.2.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/proc-log": { + "version": "4.2.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/ssri": { + "version": "10.0.6", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/unique-filename": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/unique-slug": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/which": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", "dependencies": { - "env-paths": "^2.2.0", - "exponential-backoff": "^3.1.1", - "glob": "^10.3.10", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^13.0.0", - "nopt": "^7.0.0", - "proc-log": "^4.1.0", - "semver": "^7.3.5", - "tar": "^6.2.1", - "which": "^4.0.0" + "isexe": "^3.1.1" }, "bin": { - "node-gyp": "bin/node-gyp.js" + "node-which": "bin/which.js" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^16.13.0 || >=18.0.0" } }, "node_modules/npm/node_modules/nopt": { - "version": "7.2.1", + "version": "8.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -8752,47 +8999,56 @@ "bin": { "nopt": "bin/nopt.js" }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/nopt/node_modules/abbrev": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/npm/node_modules/normalize-package-data": { - "version": "6.0.2", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { - "hosted-git-info": "^7.0.0", + "hosted-git-info": "^8.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-audit-report": { - "version": "5.0.0", + "version": "6.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-bundled": { - "version": "3.0.1", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "npm-normalize-package-bin": "^3.0.0" + "npm-normalize-package-bin": "^4.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-install-checks": { - "version": "6.3.0", + "version": "7.1.1", "dev": true, "inBundle": true, "license": "BSD-2-Clause", @@ -8800,99 +9056,112 @@ "semver": "^7.1.1" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-normalize-package-bin": { - "version": "3.0.1", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-package-arg": { - "version": "11.0.3", + "version": "12.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "hosted-git-info": "^7.0.0", - "proc-log": "^4.0.0", + "hosted-git-info": "^8.0.0", + "proc-log": "^5.0.0", "semver": "^7.3.5", - "validate-npm-package-name": "^5.0.0" + "validate-npm-package-name": "^6.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-packlist": { - "version": "8.0.2", + "version": "9.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "ignore-walk": "^6.0.4" + "ignore-walk": "^7.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-pick-manifest": { - "version": "9.1.0", + "version": "10.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "npm-install-checks": "^6.0.0", - "npm-normalize-package-bin": "^3.0.0", - "npm-package-arg": "^11.0.0", + "npm-install-checks": "^7.1.0", + "npm-normalize-package-bin": "^4.0.0", + "npm-package-arg": "^12.0.0", "semver": "^7.3.5" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-profile": { - "version": "10.0.0", + "version": "11.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "npm-registry-fetch": "^17.0.1", - "proc-log": "^4.0.0" + "npm-registry-fetch": "^18.0.0", + "proc-log": "^5.0.0" }, "engines": { - "node": ">=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-registry-fetch": { - "version": "17.1.0", + "version": "18.0.2", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/redact": "^2.0.0", + "@npmcli/redact": "^3.0.0", "jsonparse": "^1.3.1", - "make-fetch-happen": "^13.0.0", + "make-fetch-happen": "^14.0.0", "minipass": "^7.0.2", - "minipass-fetch": "^3.0.0", - "minizlib": "^2.1.2", - "npm-package-arg": "^11.0.0", - "proc-log": "^4.0.0" + "minipass-fetch": "^4.0.0", + "minizlib": "^3.0.1", + "npm-package-arg": "^12.0.0", + "proc-log": "^5.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/npm-registry-fetch/node_modules/minizlib": { + "version": "3.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.4", + "rimraf": "^5.0.5" + }, + "engines": { + "node": ">= 18" } }, "node_modules/npm/node_modules/npm-user-validate": { - "version": "2.0.1", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "BSD-2-Clause", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/p-map": { @@ -8911,54 +9180,54 @@ } }, "node_modules/npm/node_modules/package-json-from-dist": { - "version": "1.0.0", + "version": "1.0.1", "dev": true, "inBundle": true, "license": "BlueOak-1.0.0" }, "node_modules/npm/node_modules/pacote": { - "version": "18.0.6", + "version": "19.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/git": "^5.0.0", - "@npmcli/installed-package-contents": "^2.0.1", - "@npmcli/package-json": "^5.1.0", - "@npmcli/promise-spawn": "^7.0.0", - "@npmcli/run-script": "^8.0.0", - "cacache": "^18.0.0", + "@npmcli/git": "^6.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/package-json": "^6.0.0", + "@npmcli/promise-spawn": "^8.0.0", + "@npmcli/run-script": "^9.0.0", + "cacache": "^19.0.0", "fs-minipass": "^3.0.0", "minipass": "^7.0.2", - "npm-package-arg": "^11.0.0", - "npm-packlist": "^8.0.0", - "npm-pick-manifest": "^9.0.0", - "npm-registry-fetch": "^17.0.0", - "proc-log": "^4.0.0", + "npm-package-arg": "^12.0.0", + "npm-packlist": "^9.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-registry-fetch": "^18.0.0", + "proc-log": "^5.0.0", "promise-retry": "^2.0.1", - "sigstore": "^2.2.0", - "ssri": "^10.0.0", + "sigstore": "^3.0.0", + "ssri": "^12.0.0", "tar": "^6.1.11" }, "bin": { "pacote": "bin/index.js" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/parse-conflict-json": { - "version": "3.0.1", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "json-parse-even-better-errors": "^3.0.0", + "json-parse-even-better-errors": "^4.0.0", "just-diff": "^6.0.0", "just-diff-apply": "^5.2.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/path-key": { @@ -9000,21 +9269,21 @@ } }, "node_modules/npm/node_modules/proc-log": { - "version": "4.2.0", + "version": "5.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/proggy": { - "version": "2.0.0", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/promise-all-reject-late": { @@ -9027,7 +9296,7 @@ } }, "node_modules/npm/node_modules/promise-call-limit": { - "version": "3.0.1", + "version": "3.0.2", "dev": true, "inBundle": true, "license": "ISC", @@ -9055,15 +9324,15 @@ } }, "node_modules/npm/node_modules/promzard": { - "version": "1.0.2", + "version": "2.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "read": "^3.0.1" + "read": "^4.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/qrcode-terminal": { @@ -9075,37 +9344,37 @@ } }, "node_modules/npm/node_modules/read": { - "version": "3.0.1", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "mute-stream": "^1.0.0" + "mute-stream": "^2.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/read-cmd-shim": { - "version": "4.0.0", + "version": "5.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/read-package-json-fast": { - "version": "3.0.2", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "json-parse-even-better-errors": "^3.0.0", - "npm-normalize-package-bin": "^3.0.0" + "json-parse-even-better-errors": "^4.0.0", + "npm-normalize-package-bin": "^4.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/retry": { @@ -9117,6 +9386,21 @@ "node": ">= 4" } }, + "node_modules/npm/node_modules/rimraf": { + "version": "5.0.10", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/npm/node_modules/safer-buffer": { "version": "2.1.2", "dev": true, @@ -9170,20 +9454,72 @@ } }, "node_modules/npm/node_modules/sigstore": { - "version": "2.3.1", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@sigstore/bundle": "^2.3.2", - "@sigstore/core": "^1.0.0", + "@sigstore/bundle": "^3.0.0", + "@sigstore/core": "^2.0.0", "@sigstore/protobuf-specs": "^0.3.2", - "@sigstore/sign": "^2.3.2", - "@sigstore/tuf": "^2.3.4", - "@sigstore/verify": "^1.2.1" + "@sigstore/sign": "^3.0.0", + "@sigstore/tuf": "^3.0.0", + "@sigstore/verify": "^2.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/sigstore/node_modules/@sigstore/bundle": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.3.2" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/sigstore/node_modules/@sigstore/core": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/sigstore/node_modules/@sigstore/sign": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^3.0.0", + "@sigstore/core": "^2.0.0", + "@sigstore/protobuf-specs": "^0.3.2", + "make-fetch-happen": "^14.0.1", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/sigstore/node_modules/@sigstore/verify": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^3.0.0", + "@sigstore/core": "^2.0.0", + "@sigstore/protobuf-specs": "^0.3.2" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/smart-buffer": { @@ -9261,7 +9597,7 @@ } }, "node_modules/npm/node_modules/spdx-license-ids": { - "version": "3.0.18", + "version": "3.0.20", "dev": true, "inBundle": true, "license": "CC0-1.0" @@ -9273,7 +9609,7 @@ "license": "BSD-3-Clause" }, "node_modules/npm/node_modules/ssri": { - "version": "10.0.6", + "version": "12.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -9281,7 +9617,7 @@ "minipass": "^7.0.3" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/string-width": { @@ -9422,33 +9758,46 @@ } }, "node_modules/npm/node_modules/tuf-js": { - "version": "2.2.1", + "version": "3.0.1", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@tufjs/models": "2.0.1", - "debug": "^4.3.4", - "make-fetch-happen": "^13.0.1" + "@tufjs/models": "3.0.1", + "debug": "^4.3.6", + "make-fetch-happen": "^14.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/tuf-js/node_modules/@tufjs/models": { + "version": "3.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@tufjs/canonical-json": "2.0.0", + "minimatch": "^9.0.5" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/unique-filename": { - "version": "3.0.0", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "unique-slug": "^4.0.0" + "unique-slug": "^5.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/unique-slug": { - "version": "4.0.0", + "version": "5.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -9456,7 +9805,7 @@ "imurmurhash": "^0.1.4" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/util-deprecate": { @@ -9486,12 +9835,12 @@ } }, "node_modules/npm/node_modules/validate-npm-package-name": { - "version": "5.0.1", + "version": "6.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/walk-up-path": { @@ -9501,7 +9850,7 @@ "license": "ISC" }, "node_modules/npm/node_modules/which": { - "version": "4.0.0", + "version": "5.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -9512,7 +9861,7 @@ "node-which": "bin/which.js" }, "engines": { - "node": "^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/which/node_modules/isexe": { @@ -9575,7 +9924,7 @@ } }, "node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.0.1", + "version": "6.1.0", "dev": true, "inBundle": true, "license": "MIT", @@ -9625,7 +9974,7 @@ } }, "node_modules/npm/node_modules/write-file-atomic": { - "version": "5.0.1", + "version": "6.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -9634,7 +9983,7 @@ "signal-exit": "^4.0.1" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/yallist": { @@ -10001,10 +10350,11 @@ } }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" }, "node_modules/picomatch": { "version": "4.0.2", @@ -10012,8 +10362,6 @@ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "engines": { "node": ">=12" }, @@ -10141,9 +10489,9 @@ } }, "node_modules/postcss": { - "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", "dev": true, "funding": [ { @@ -10162,7 +10510,7 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.1.0", + "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, "engines": { @@ -10556,12 +10904,13 @@ } }, "node_modules/rollup": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.4.tgz", - "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.3.tgz", + "integrity": "sha512-SLsCOnlmGt9VoZ9Ek8yBK8tAdmPHeppkw+Xa7yDlCEhDTvwYei03JlWo1fdc7YTfLZ4tD8riJCUyAgTbszk1fQ==", "dev": true, + "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -10571,22 +10920,24 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.22.4", - "@rollup/rollup-android-arm64": "4.22.4", - "@rollup/rollup-darwin-arm64": "4.22.4", - "@rollup/rollup-darwin-x64": "4.22.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.22.4", - "@rollup/rollup-linux-arm-musleabihf": "4.22.4", - "@rollup/rollup-linux-arm64-gnu": "4.22.4", - "@rollup/rollup-linux-arm64-musl": "4.22.4", - "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4", - "@rollup/rollup-linux-riscv64-gnu": "4.22.4", - "@rollup/rollup-linux-s390x-gnu": "4.22.4", - "@rollup/rollup-linux-x64-gnu": "4.22.4", - "@rollup/rollup-linux-x64-musl": "4.22.4", - "@rollup/rollup-win32-arm64-msvc": "4.22.4", - "@rollup/rollup-win32-ia32-msvc": "4.22.4", - "@rollup/rollup-win32-x64-msvc": "4.22.4", + "@rollup/rollup-android-arm-eabi": "4.27.3", + "@rollup/rollup-android-arm64": "4.27.3", + "@rollup/rollup-darwin-arm64": "4.27.3", + "@rollup/rollup-darwin-x64": "4.27.3", + "@rollup/rollup-freebsd-arm64": "4.27.3", + "@rollup/rollup-freebsd-x64": "4.27.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.27.3", + "@rollup/rollup-linux-arm-musleabihf": "4.27.3", + "@rollup/rollup-linux-arm64-gnu": "4.27.3", + "@rollup/rollup-linux-arm64-musl": "4.27.3", + "@rollup/rollup-linux-powerpc64le-gnu": "4.27.3", + "@rollup/rollup-linux-riscv64-gnu": "4.27.3", + "@rollup/rollup-linux-s390x-gnu": "4.27.3", + "@rollup/rollup-linux-x64-gnu": "4.27.3", + "@rollup/rollup-linux-x64-musl": "4.27.3", + "@rollup/rollup-win32-arm64-msvc": "4.27.3", + "@rollup/rollup-win32-ia32-msvc": "4.27.3", + "@rollup/rollup-win32-x64-msvc": "4.27.3", "fsevents": "~2.3.2" } }, @@ -10666,15 +11017,15 @@ } }, "node_modules/semantic-release": { - "version": "24.1.1", - "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-24.1.1.tgz", - "integrity": "sha512-4Ax2GxD411jUe9IdhOjMLuN+6wAj+aKjvOGngByrpD/iKL+UKN/2puQglhyI4gxNyy9XzEBMzBwbqpnEwbXGEg==", + "version": "24.2.0", + "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-24.2.0.tgz", + "integrity": "sha512-fQfn6e/aYToRtVJYKqneFM1Rg3KP2gh3wSWtpYsLlz6uaPKlISrTzvYAFn+mYWo07F0X1Cz5ucU89AVE8X1mbg==", "dev": true, "license": "MIT", "dependencies": { "@semantic-release/commit-analyzer": "^13.0.0-beta.1", "@semantic-release/error": "^4.0.0", - "@semantic-release/github": "^10.0.0", + "@semantic-release/github": "^11.0.0", "@semantic-release/npm": "^12.0.0", "@semantic-release/release-notes-generator": "^14.0.0-beta.1", "aggregate-error": "^5.0.0", @@ -11133,6 +11484,7 @@ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -11198,9 +11550,9 @@ "license": "MIT" }, "node_modules/std-env": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", - "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", + "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==", "dev": true, "license": "MIT" }, @@ -11761,13 +12113,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -11866,16 +12211,16 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.0.tgz", - "integrity": "sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", + "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==", "dev": true, "license": "MIT" }, "node_modules/tinypool": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.1.tgz", - "integrity": "sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", + "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==", "dev": true, "license": "MIT", "engines": { @@ -11902,16 +12247,6 @@ "node": ">=14.0.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -11959,9 +12294,9 @@ "license": "0BSD" }, "node_modules/tsx": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", - "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", + "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", "dev": true, "license": "MIT", "dependencies": { @@ -12255,9 +12590,9 @@ } }, "node_modules/vite": { - "version": "5.4.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.7.tgz", - "integrity": "sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==", + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", "dev": true, "license": "MIT", "dependencies": { @@ -12315,14 +12650,15 @@ } }, "node_modules/vite-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.1.tgz", - "integrity": "sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.5.tgz", + "integrity": "sha512-rd0QIgx74q4S1Rd56XIiL2cYEdyWn13cunYBIuqh9mpmQr7gGS0IxXoP8R6OaZtNQQLyXSWbd4rXKYUbhFpK5w==", "dev": true, "license": "MIT", "dependencies": { "cac": "^6.7.14", - "debug": "^4.3.6", + "debug": "^4.3.7", + "es-module-lexer": "^1.5.4", "pathe": "^1.1.2", "vite": "^5.0.0" }, @@ -12767,30 +13103,31 @@ } }, "node_modules/vitest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.1.tgz", - "integrity": "sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/expect": "2.1.1", - "@vitest/mocker": "2.1.1", - "@vitest/pretty-format": "^2.1.1", - "@vitest/runner": "2.1.1", - "@vitest/snapshot": "2.1.1", - "@vitest/spy": "2.1.1", - "@vitest/utils": "2.1.1", - "chai": "^5.1.1", - "debug": "^4.3.6", - "magic-string": "^0.30.11", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.5.tgz", + "integrity": "sha512-P4ljsdpuzRTPI/kbND2sDZ4VmieerR2c9szEZpjc+98Z9ebvnXmM5+0tHEKqYZumXqlvnmfWsjeFOjXVriDG7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "2.1.5", + "@vitest/mocker": "2.1.5", + "@vitest/pretty-format": "^2.1.5", + "@vitest/runner": "2.1.5", + "@vitest/snapshot": "2.1.5", + "@vitest/spy": "2.1.5", + "@vitest/utils": "2.1.5", + "chai": "^5.1.2", + "debug": "^4.3.7", + "expect-type": "^1.1.0", + "magic-string": "^0.30.12", "pathe": "^1.1.2", - "std-env": "^3.7.0", + "std-env": "^3.8.0", "tinybench": "^2.9.0", - "tinyexec": "^0.3.0", - "tinypool": "^1.0.0", + "tinyexec": "^0.3.1", + "tinypool": "^1.0.1", "tinyrainbow": "^1.2.0", "vite": "^5.0.0", - "vite-node": "2.1.1", + "vite-node": "2.1.5", "why-is-node-running": "^2.3.0" }, "bin": { @@ -12805,8 +13142,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.1.1", - "@vitest/ui": "2.1.1", + "@vitest/browser": "2.1.5", + "@vitest/ui": "2.1.5", "happy-dom": "*", "jsdom": "*" }, @@ -13152,7 +13489,7 @@ }, "packages/algo-ts/dist": { "name": "@algorandfoundation/algorand-typescript", - "version": "0.0.1-alpha.16", + "version": "0.0.1-alpha.17", "dev": true, "peerDependencies": { "tslib": "^2.6.2" diff --git a/package.json b/package.json index 7ddfacb8..19d22cbf 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,9 @@ "scripts": { "postinstall": "npx patch-package", "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", - "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --output-awst --output-awst-json --no-output-teal --output-ssa-ir --out-dir out/[name]", + "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --dry-run", "dev:expected-output": "tsx src/cli.ts build tests/expected-output --dry-run", - "dev:testing": "tsx src/cli.ts build tests/approvals/pre-approved-sale.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", + "dev:testing": "tsx src/cli.ts build tests/approvals/arc28-events.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --out-dir out/[name] --optimization-level=0", "audit": "better-npm-audit audit", "format": "prettier --write .", "lint": "eslint \"src/**/*.ts\"", @@ -22,8 +22,8 @@ "build:4-copy-pkg-json": "tstk copy-package-json -c", "build:5-copy-readme": "copyfiles ./README.md ./dist", "test": "vitest run", - "test:approvals": "vitest run tests/approvals/_run.spec.ts", - "test:expected-output": "vitest run tests/expected-output/_run.spec.ts", + "test:approvals": "vitest run tests/approvals.spec.ts", + "test:expected-output": "vitest run tests/expected-output.spec.ts", "test:coverage": "vitest run --coverage", "test:ci": "vitest run --coverage --reporter junit --outputFile test-results.xml", "install-local-packages": "npm run algo-ts", @@ -40,48 +40,52 @@ "author": "Algorand foundation", "license": "MIT", "devDependencies": { - "@algorandfoundation/algokit-utils": "^7.0.0-beta.7", + "@algorandfoundation/algokit-utils": "^8.0.0", "@algorandfoundation/algorand-typescript": "file:packages/algo-ts/dist", - "@commitlint/cli": "^19.5.0", - "@commitlint/config-conventional": "^19.5.0", + "@commitlint/cli": "^19.6.0", + "@commitlint/config-conventional": "^19.6.0", "@makerx/eslint-config": "4.0.0", "@makerx/prettier-config": "2.0.1", "@makerx/ts-toolkit": "^4.0.0-beta.21", - "@rollup/plugin-commonjs": "28.0.0", + "@rollup/plugin-commonjs": "28.0.1", "@rollup/plugin-json": "6.1.0", "@rollup/plugin-node-resolve": "15.3.0", - "@rollup/plugin-typescript": "^12.1.0", + "@rollup/plugin-typescript": "^12.1.1", "@tsconfig/node20": "20.1.4", "@types/cross-spawn": "^6.0.6", - "@types/node": "22.6.1", - "@typescript-eslint/eslint-plugin": "8.7.0", - "@typescript-eslint/parser": "8.7.0", - "@vitest/coverage-v8": "2.1.1", + "@types/node": "22.9.1", + "@typescript-eslint/eslint-plugin": "8.15.0", + "@typescript-eslint/parser": "8.15.0", + "@vitest/coverage-v8": "2.1.5", "better-npm-audit": "3.11.0", "conventional-changelog-conventionalcommits": "^8.0.0", "copyfiles": "2.4.1", - "eslint": "9.11.1", + "eslint": "9.15.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "npm-run-all": "4.1.5", "prettier": "3.3.3", "rimraf": "6.0.1", - "rollup": "^4.22.4", - "semantic-release": "^24.1.1", - "tsx": "4.19.1", - "vitest": "2.1.1" + "rollup": "^4.27.3", + "semantic-release": "^24.2.0", + "tsx": "4.19.2", + "vitest": "2.1.5" }, "dependencies": { "chalk": "^5.3.0", "change-case": "^5.4.4", "commander": "^12.1.0", - "cross-spawn": "^7.0.3", + "cross-spawn": "7.0.6", "glob": "^11.0.0", "polytype": "^0.17.0", "typescript": "^5.6.2", "upath": "^2.0.1", "zod": "^3.23.8" }, + "overrides": { + "cross-spawn": "7.0.6", + "npm": "10.9.1" + }, "bundleDependencies": [ "typescript" ] diff --git a/packages/algo-ts/.nsprc b/packages/algo-ts/.nsprc index 2c63c085..0967ef42 100644 --- a/packages/algo-ts/.nsprc +++ b/packages/algo-ts/.nsprc @@ -1,2 +1 @@ -{ -} +{} diff --git a/packages/algo-ts/package-lock.json b/packages/algo-ts/package-lock.json index 2279f273..33ad2ad2 100644 --- a/packages/algo-ts/package-lock.json +++ b/packages/algo-ts/package-lock.json @@ -1,40 +1,40 @@ { "name": "@algorandfoundation/algorand-typescript", - "version": "0.0.1-alpha.16", + "version": "0.0.1-alpha.17", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@algorandfoundation/algorand-typescript", - "version": "0.0.1-alpha.16", + "version": "0.0.1-alpha.17", "devDependencies": { - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.11.1", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "^9.15.0", "@makerx/eslint-config": "4.0.0", "@makerx/prettier-config": "2.0.1", - "@makerx/ts-toolkit": "^4.0.0-beta.20", - "@rollup/plugin-commonjs": "28.0.0", + "@makerx/ts-toolkit": "^4.0.0-beta.21", + "@rollup/plugin-commonjs": "28.0.1", "@rollup/plugin-json": "6.1.0", "@rollup/plugin-node-resolve": "15.3.0", - "@rollup/plugin-typescript": "12.1.0", + "@rollup/plugin-typescript": "12.1.1", "@tsconfig/node20": "20.1.4", - "@types/node": "22.6.1", - "@typescript-eslint/eslint-plugin": "8.7.0", - "@typescript-eslint/parser": "8.7.0", - "@vitest/coverage-v8": "2.1.1", + "@types/node": "22.9.1", + "@typescript-eslint/eslint-plugin": "8.15.0", + "@typescript-eslint/parser": "8.15.0", + "@vitest/coverage-v8": "2.1.5", "better-npm-audit": "3.11.0", "copyfiles": "2.4.1", - "eslint": "9.11.1", + "eslint": "9.15.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", - "globals": "^15.9.0", + "globals": "^15.12.0", "npm-run-all": "4.1.5", "prettier": "3.3.3", "rimraf": "6.0.1", - "rollup": "4.22.4", - "tsx": "4.19.1", - "typescript": "^5.6.2", - "vitest": "2.1.1" + "rollup": "4.27.3", + "tsx": "4.19.2", + "typescript": "^5.6.3", + "vitest": "2.1.5" }, "peerDependencies": { "tslib": "^2.6.2" @@ -69,9 +69,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "license": "MIT", "engines": { @@ -79,9 +79,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "license": "MIT", "engines": { @@ -183,11 +183,14 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.0" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -196,15 +199,14 @@ } }, "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -642,9 +644,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", - "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, "license": "MIT", "engines": { @@ -652,9 +654,9 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", - "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.0.tgz", + "integrity": "sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -691,9 +693,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.6.0.tgz", - "integrity": "sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.0.tgz", + "integrity": "sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==", "dev": true, "license": "Apache-2.0", "engines": { @@ -701,9 +703,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", - "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, "license": "MIT", "dependencies": { @@ -762,9 +764,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.11.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.11.1.tgz", - "integrity": "sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==", + "version": "9.15.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.15.0.tgz", + "integrity": "sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==", "dev": true, "license": "MIT", "engines": { @@ -782,9 +784,9 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz", - "integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz", + "integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -794,6 +796,44 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -809,9 +849,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", - "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1003,9 +1043,9 @@ "license": "MIT" }, "node_modules/@makerx/ts-toolkit": { - "version": "4.0.0-beta.20", - "resolved": "https://registry.npmjs.org/@makerx/ts-toolkit/-/ts-toolkit-4.0.0-beta.20.tgz", - "integrity": "sha512-faZyycGxk7lKvhm0nwy5hirwD6tVAdLLbEYh9kd13OzHuWiHPySt3ixdB2BXHDzoE65BU43h8X/pqlUNDbH4NA==", + "version": "4.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@makerx/ts-toolkit/-/ts-toolkit-4.0.0-beta.21.tgz", + "integrity": "sha512-/2zTLS2cxGonnRNTHx9Q5byd+M0HJak8UxUJSbmoXUKRFpAPfLhsrXvQKtavyExtMf2a49D4QSVuIbBy5VY9Gw==", "dev": true, "license": "MIT", "dependencies": { @@ -1085,19 +1125,19 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.0.tgz", - "integrity": "sha512-BJcu+a+Mpq476DMXG+hevgPSl56bkUoi88dKT8t3RyUp8kGuOh+2bU8Gs7zXDlu+fyZggnJ+iOBGrb/O1SorYg==", + "version": "28.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.1.tgz", + "integrity": "sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==", "dev": true, "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", "estree-walker": "^2.0.2", - "fdir": "^6.1.1", + "fdir": "^6.2.0", "is-reference": "1.2.1", "magic-string": "^0.30.3", - "picomatch": "^2.3.1" + "picomatch": "^4.0.2" }, "engines": { "node": ">=16.0.0 || 14 >= 14.17" @@ -1111,19 +1151,6 @@ } } }, - "node_modules/@rollup/plugin-commonjs/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/@rollup/plugin-json": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz", @@ -1171,9 +1198,9 @@ } }, "node_modules/@rollup/plugin-typescript": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.0.tgz", - "integrity": "sha512-Kzs8KGJofe7cfTRODsnG1jNGxSvU8gVoNNd7Z/QaY25AYwe2LSSUpx/kPxqF38NYkpR8de3m51r9uwJpDlz6dg==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.1.tgz", + "integrity": "sha512-t7O653DpfB5MbFrqPe/VcKFFkvRuFNp9qId3xq4Eth5xlyymzxNpye2z8Hrl0RIMuXTSr5GGcFpkdlMeacUiFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1234,9 +1261,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", - "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.3.tgz", + "integrity": "sha512-EzxVSkIvCFxUd4Mgm4xR9YXrcp976qVaHnqom/Tgm+vU79k4vV4eYTjmRvGfeoW8m9LVcsAy/lGjcgVegKEhLQ==", "cpu": [ "arm" ], @@ -1248,9 +1275,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz", - "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.3.tgz", + "integrity": "sha512-LJc5pDf1wjlt9o/Giaw9Ofl+k/vLUaYsE2zeQGH85giX2F+wn/Cg8b3c5CDP3qmVmeO5NzwVUzQQxwZvC2eQKw==", "cpu": [ "arm64" ], @@ -1262,9 +1289,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz", - "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.3.tgz", + "integrity": "sha512-OuRysZ1Mt7wpWJ+aYKblVbJWtVn3Cy52h8nLuNSzTqSesYw1EuN6wKp5NW/4eSre3mp12gqFRXOKTcN3AI3LqA==", "cpu": [ "arm64" ], @@ -1276,9 +1303,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz", - "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.3.tgz", + "integrity": "sha512-xW//zjJMlJs2sOrCmXdB4d0uiilZsOdlGQIC/jjmMWT47lkLLoB1nsNhPUcnoqyi5YR6I4h+FjBpILxbEy8JRg==", "cpu": [ "x64" ], @@ -1289,10 +1316,38 @@ "darwin" ] }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.3.tgz", + "integrity": "sha512-58E0tIcwZ+12nK1WiLzHOD8I0d0kdrY/+o7yFVPRHuVGY3twBwzwDdTIBGRxLmyjciMYl1B/U515GJy+yn46qw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.3.tgz", + "integrity": "sha512-78fohrpcVwTLxg1ZzBMlwEimoAJmY6B+5TsyAZ3Vok7YabRBUvjYTsRXPTjGEvv/mfgVBepbW28OlMEz4w8wGA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz", - "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.3.tgz", + "integrity": "sha512-h2Ay79YFXyQi+QZKo3ISZDyKaVD7uUvukEHTOft7kh00WF9mxAaxZsNs3o/eukbeKuH35jBvQqrT61fzKfAB/Q==", "cpu": [ "arm" ], @@ -1304,9 +1359,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz", - "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.3.tgz", + "integrity": "sha512-Sv2GWmrJfRY57urktVLQ0VKZjNZGogVtASAgosDZ1aUB+ykPxSi3X1nWORL5Jk0sTIIwQiPH7iE3BMi9zGWfkg==", "cpu": [ "arm" ], @@ -1318,9 +1373,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz", - "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.3.tgz", + "integrity": "sha512-FPoJBLsPW2bDNWjSrwNuTPUt30VnfM8GPGRoLCYKZpPx0xiIEdFip3dH6CqgoT0RnoGXptaNziM0WlKgBc+OWQ==", "cpu": [ "arm64" ], @@ -1332,9 +1387,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz", - "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.3.tgz", + "integrity": "sha512-TKxiOvBorYq4sUpA0JT+Fkh+l+G9DScnG5Dqx7wiiqVMiRSkzTclP35pE6eQQYjP4Gc8yEkJGea6rz4qyWhp3g==", "cpu": [ "arm64" ], @@ -1346,9 +1401,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz", - "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.3.tgz", + "integrity": "sha512-v2M/mPvVUKVOKITa0oCFksnQQ/TqGrT+yD0184/cWHIu0LoIuYHwox0Pm3ccXEz8cEQDLk6FPKd1CCm+PlsISw==", "cpu": [ "ppc64" ], @@ -1360,9 +1415,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz", - "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.3.tgz", + "integrity": "sha512-LdrI4Yocb1a/tFVkzmOE5WyYRgEBOyEhWYJe4gsDWDiwnjYKjNs7PS6SGlTDB7maOHF4kxevsuNBl2iOcj3b4A==", "cpu": [ "riscv64" ], @@ -1374,9 +1429,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz", - "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.3.tgz", + "integrity": "sha512-d4wVu6SXij/jyiwPvI6C4KxdGzuZOvJ6y9VfrcleHTwo68fl8vZC5ZYHsCVPUi4tndCfMlFniWgwonQ5CUpQcA==", "cpu": [ "s390x" ], @@ -1388,9 +1443,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz", - "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.3.tgz", + "integrity": "sha512-/6bn6pp1fsCGEY5n3yajmzZQAh+mW4QPItbiWxs69zskBzJuheb3tNynEjL+mKOsUSFK11X4LYF2BwwXnzWleA==", "cpu": [ "x64" ], @@ -1402,9 +1457,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz", - "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.3.tgz", + "integrity": "sha512-nBXOfJds8OzUT1qUreT/en3eyOXd2EH5b0wr2bVB5999qHdGKkzGzIyKYaKj02lXk6wpN71ltLIaQpu58YFBoQ==", "cpu": [ "x64" ], @@ -1416,9 +1471,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz", - "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.3.tgz", + "integrity": "sha512-ogfbEVQgIZOz5WPWXF2HVb6En+kWzScuxJo/WdQTqEgeyGkaa2ui5sQav9Zkr7bnNCLK48uxmmK0TySm22eiuw==", "cpu": [ "arm64" ], @@ -1430,9 +1485,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz", - "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.3.tgz", + "integrity": "sha512-ecE36ZBMLINqiTtSNQ1vzWc5pXLQHlf/oqGp/bSbi7iedcjcNb6QbCBNG73Euyy2C+l/fn8qKWEwxr+0SSfs3w==", "cpu": [ "ia32" ], @@ -1444,9 +1499,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz", - "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.3.tgz", + "integrity": "sha512-vliZLrDmYKyaUoMzEbMTg2JkerfBjn03KmAw9CykO0Zzkzoyd7o3iZNam/TpyWNjNT+Cz2iO3P9Smv2wgrR+Eg==", "cpu": [ "x64" ], @@ -1465,9 +1520,9 @@ "license": "MIT" }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true, "license": "MIT" }, @@ -1479,13 +1534,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.6.1.tgz", - "integrity": "sha512-V48tCfcKb/e6cVUigLAaJDAILdMP0fUW6BidkPK4GpGjXcfbnoHasCZDwz3N3yVt5we2RHm4XTQCpv0KJz9zqw==", + "version": "22.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.1.tgz", + "integrity": "sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.19.8" } }, "node_modules/@types/resolve": { @@ -1496,17 +1551,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz", - "integrity": "sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.15.0.tgz", + "integrity": "sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/type-utils": "8.7.0", - "@typescript-eslint/utils": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/type-utils": "8.15.0", + "@typescript-eslint/utils": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -1530,16 +1585,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.7.0.tgz", - "integrity": "sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.15.0.tgz", + "integrity": "sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/typescript-estree": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/typescript-estree": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "debug": "^4.3.4" }, "engines": { @@ -1559,14 +1614,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz", - "integrity": "sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.15.0.tgz", + "integrity": "sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0" + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1577,14 +1632,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz", - "integrity": "sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.15.0.tgz", + "integrity": "sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.7.0", - "@typescript-eslint/utils": "8.7.0", + "@typescript-eslint/typescript-estree": "8.15.0", + "@typescript-eslint/utils": "8.15.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -1595,6 +1650,9 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, "peerDependenciesMeta": { "typescript": { "optional": true @@ -1602,9 +1660,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.7.0.tgz", - "integrity": "sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.15.0.tgz", + "integrity": "sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==", "dev": true, "license": "MIT", "engines": { @@ -1616,14 +1674,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz", - "integrity": "sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.15.0.tgz", + "integrity": "sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1645,16 +1703,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.7.0.tgz", - "integrity": "sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.15.0.tgz", + "integrity": "sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/typescript-estree": "8.7.0" + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/typescript-estree": "8.15.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1665,17 +1723,22 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz", - "integrity": "sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.15.0.tgz", + "integrity": "sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.7.0", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.15.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1685,23 +1748,36 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@vitest/coverage-v8": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.1.tgz", - "integrity": "sha512-md/A7A3c42oTT8JUHSqjP5uKTWJejzUW4jalpvs+rZ27gsURsMU8DEb+8Jf8C6Kj2gwfSHJqobDNBuoqlm0cFw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.5.tgz", + "integrity": "sha512-/RoopB7XGW7UEkUndRXF87A9CwkoZAJW01pj8/3pgmDVsjMH2IKy6H1A38po9tmUlwhSyYs0az82rbKd9Yaynw==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.3.0", "@bcoe/v8-coverage": "^0.2.3", - "debug": "^4.3.6", + "debug": "^4.3.7", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-lib-source-maps": "^5.0.6", "istanbul-reports": "^3.1.7", - "magic-string": "^0.30.11", - "magicast": "^0.3.4", - "std-env": "^3.7.0", + "magic-string": "^0.30.12", + "magicast": "^0.3.5", + "std-env": "^3.8.0", "test-exclude": "^7.0.1", "tinyrainbow": "^1.2.0" }, @@ -1709,8 +1785,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "2.1.1", - "vitest": "2.1.1" + "@vitest/browser": "2.1.5", + "vitest": "2.1.5" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -1719,15 +1795,15 @@ } }, "node_modules/@vitest/expect": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.1.tgz", - "integrity": "sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.5.tgz", + "integrity": "sha512-nZSBTW1XIdpZvEJyoP/Sy8fUg0b8od7ZpGDkTUcfJ7wz/VoZAFzFfLyxVxGFhUjJzhYqSbIpfMtl/+k/dpWa3Q==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "2.1.1", - "@vitest/utils": "2.1.1", - "chai": "^5.1.1", + "@vitest/spy": "2.1.5", + "@vitest/utils": "2.1.5", + "chai": "^5.1.2", "tinyrainbow": "^1.2.0" }, "funding": { @@ -1735,22 +1811,21 @@ } }, "node_modules/@vitest/mocker": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.1.tgz", - "integrity": "sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.5.tgz", + "integrity": "sha512-XYW6l3UuBmitWqSUXTNXcVBUCRytDogBsWuNXQijc00dtnU/9OqpXWp4OJroVrad/gLIomAq9aW8yWDBtMthhQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "^2.1.0-beta.1", + "@vitest/spy": "2.1.5", "estree-walker": "^3.0.3", - "magic-string": "^0.30.11" + "magic-string": "^0.30.12" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/spy": "2.1.1", - "msw": "^2.3.5", + "msw": "^2.4.9", "vite": "^5.0.0" }, "peerDependenciesMeta": { @@ -1773,9 +1848,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.1.tgz", - "integrity": "sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.5.tgz", + "integrity": "sha512-4ZOwtk2bqG5Y6xRGHcveZVr+6txkH7M2e+nPFd6guSoN638v/1XQ0K06eOpi0ptVU/2tW/pIU4IoPotY/GZ9fw==", "dev": true, "license": "MIT", "dependencies": { @@ -1786,13 +1861,13 @@ } }, "node_modules/@vitest/runner": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.1.tgz", - "integrity": "sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.5.tgz", + "integrity": "sha512-pKHKy3uaUdh7X6p1pxOkgkVAFW7r2I818vHDthYLvUyjRfkKOU6P45PztOch4DZarWQne+VOaIMwA/erSSpB9g==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "2.1.1", + "@vitest/utils": "2.1.5", "pathe": "^1.1.2" }, "funding": { @@ -1800,14 +1875,14 @@ } }, "node_modules/@vitest/snapshot": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.1.tgz", - "integrity": "sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.5.tgz", + "integrity": "sha512-zmYw47mhfdfnYbuhkQvkkzYroXUumrwWDGlMjpdUr4jBd3HZiV2w7CQHj+z7AAS4VOtWxI4Zt4bWt4/sKcoIjg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.1.1", - "magic-string": "^0.30.11", + "@vitest/pretty-format": "2.1.5", + "magic-string": "^0.30.12", "pathe": "^1.1.2" }, "funding": { @@ -1815,27 +1890,27 @@ } }, "node_modules/@vitest/spy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.1.tgz", - "integrity": "sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.5.tgz", + "integrity": "sha512-aWZF3P0r3w6DiYTVskOYuhBc7EMc3jvn1TkBg8ttylFFRqNN2XGD7V5a4aQdk6QiUzZQ4klNBSpCLJgWNdIiNw==", "dev": true, "license": "MIT", "dependencies": { - "tinyspy": "^3.0.0" + "tinyspy": "^3.0.2" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/utils": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.1.tgz", - "integrity": "sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.5.tgz", + "integrity": "sha512-yfj6Yrp0Vesw2cwJbP+cl04OC+IHFsuQsrsJBL9pyGeQXE56v1UAOQco+SR55Vf1nQzfV0QJg1Qum7AaWUwwYg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.1.1", - "loupe": "^3.1.1", + "@vitest/pretty-format": "2.1.5", + "loupe": "^3.1.2", "tinyrainbow": "^1.2.0" }, "funding": { @@ -1843,9 +1918,9 @@ } }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "license": "MIT", "bin": { @@ -2092,9 +2167,9 @@ } }, "node_modules/chai": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz", - "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", + "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==", "dev": true, "license": "MIT", "dependencies": { @@ -2298,21 +2373,6 @@ } } }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/data-view-buffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", @@ -2573,6 +2633,13 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true, + "license": "MIT" + }, "node_modules/es-object-atoms": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", @@ -2683,32 +2750,32 @@ } }, "node_modules/eslint": { - "version": "9.11.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.11.1.tgz", - "integrity": "sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==", + "version": "9.15.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.15.0.tgz", + "integrity": "sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.11.0", - "@eslint/config-array": "^0.18.0", - "@eslint/core": "^0.6.0", - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.11.1", - "@eslint/plugin-kit": "^0.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.9.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.15.0", + "@eslint/plugin-kit": "^0.2.3", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.3.0", - "@nodelib/fs.walk": "^1.2.8", + "@humanwhocodes/retry": "^0.4.1", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.5", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.0.2", - "eslint-visitor-keys": "^4.0.0", - "espree": "^10.1.0", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2718,14 +2785,11 @@ "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" @@ -2790,9 +2854,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", - "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -2819,13 +2883,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT" - }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2837,10 +2894,25 @@ "concat-map": "0.0.1" } }, + "node_modules/eslint/node_modules/cross-spawn": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2864,15 +2936,15 @@ } }, "node_modules/espree": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", - "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.12.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.0.0" + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2882,9 +2954,9 @@ } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2947,6 +3019,16 @@ "node": ">=0.10.0" } }, + "node_modules/expect-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.1.0.tgz", + "integrity": "sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3121,6 +3203,21 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/foreground-child/node_modules/cross-spawn": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3192,16 +3289,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, "node_modules/get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -3307,9 +3394,9 @@ } }, "node_modules/globals": { - "version": "15.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.9.0.tgz", - "integrity": "sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==", + "version": "15.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.12.0.tgz", + "integrity": "sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==", "dev": true, "license": "MIT", "engines": { @@ -3730,16 +3817,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-reference": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", @@ -4082,14 +4159,11 @@ "license": "MIT" }, "node_modules/loupe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", - "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.2.tgz", + "integrity": "sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==", "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.1" - } + "license": "MIT" }, "node_modules/lru-cache": { "version": "11.0.1", @@ -4102,9 +4176,9 @@ } }, "node_modules/magic-string": { - "version": "0.30.11", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", - "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "version": "0.30.13", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.13.tgz", + "integrity": "sha512-8rYBO+MsWkgjDSOvLomYnzhdwEG51olQ4zL5KXnNJWV5MNmrb4rTZdrtkhxjnD/QyZUqR/Z/XDsUs/4ej2nx0g==", "dev": true, "license": "MIT", "dependencies": { @@ -4112,14 +4186,14 @@ } }, "node_modules/magicast": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.4.tgz", - "integrity": "sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.24.4", - "@babel/types": "^7.24.0", + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", "source-map-js": "^1.2.0" } }, @@ -4257,13 +4331,6 @@ "dev": true, "license": "MIT" }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true, - "license": "MIT" - }, "node_modules/noms": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", @@ -4381,20 +4448,18 @@ "license": "MIT" }, "node_modules/npm-run-all/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", "dev": true, "license": "MIT", "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=4.8" + "node": ">= 8" } }, "node_modules/npm-run-all/node_modules/escape-string-regexp": { @@ -4430,49 +4495,6 @@ "node": "*" } }, - "node_modules/npm-run-all/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/npm-run-all/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-all/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/npm-run-all/node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -4486,19 +4508,6 @@ "node": ">=4" } }, - "node_modules/npm-run-all/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/object-inspect": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", @@ -4712,9 +4721,9 @@ } }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, "license": "ISC" }, @@ -4724,8 +4733,6 @@ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "engines": { "node": ">=12" }, @@ -4767,9 +4774,9 @@ } }, "node_modules/postcss": { - "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", "dev": true, "funding": [ { @@ -4788,7 +4795,7 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.1.0", + "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, "engines": { @@ -5022,13 +5029,13 @@ } }, "node_modules/rollup": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.4.tgz", - "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.3.tgz", + "integrity": "sha512-SLsCOnlmGt9VoZ9Ek8yBK8tAdmPHeppkw+Xa7yDlCEhDTvwYei03JlWo1fdc7YTfLZ4tD8riJCUyAgTbszk1fQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -5038,22 +5045,24 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.22.4", - "@rollup/rollup-android-arm64": "4.22.4", - "@rollup/rollup-darwin-arm64": "4.22.4", - "@rollup/rollup-darwin-x64": "4.22.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.22.4", - "@rollup/rollup-linux-arm-musleabihf": "4.22.4", - "@rollup/rollup-linux-arm64-gnu": "4.22.4", - "@rollup/rollup-linux-arm64-musl": "4.22.4", - "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4", - "@rollup/rollup-linux-riscv64-gnu": "4.22.4", - "@rollup/rollup-linux-s390x-gnu": "4.22.4", - "@rollup/rollup-linux-x64-gnu": "4.22.4", - "@rollup/rollup-linux-x64-musl": "4.22.4", - "@rollup/rollup-win32-arm64-msvc": "4.22.4", - "@rollup/rollup-win32-ia32-msvc": "4.22.4", - "@rollup/rollup-win32-x64-msvc": "4.22.4", + "@rollup/rollup-android-arm-eabi": "4.27.3", + "@rollup/rollup-android-arm64": "4.27.3", + "@rollup/rollup-darwin-arm64": "4.27.3", + "@rollup/rollup-darwin-x64": "4.27.3", + "@rollup/rollup-freebsd-arm64": "4.27.3", + "@rollup/rollup-freebsd-x64": "4.27.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.27.3", + "@rollup/rollup-linux-arm-musleabihf": "4.27.3", + "@rollup/rollup-linux-arm64-gnu": "4.27.3", + "@rollup/rollup-linux-arm64-musl": "4.27.3", + "@rollup/rollup-linux-powerpc64le-gnu": "4.27.3", + "@rollup/rollup-linux-riscv64-gnu": "4.27.3", + "@rollup/rollup-linux-s390x-gnu": "4.27.3", + "@rollup/rollup-linux-x64-gnu": "4.27.3", + "@rollup/rollup-linux-x64-musl": "4.27.3", + "@rollup/rollup-win32-arm64-msvc": "4.27.3", + "@rollup/rollup-win32-ia32-msvc": "4.27.3", + "@rollup/rollup-win32-x64-msvc": "4.27.3", "fsevents": "~2.3.2" } }, @@ -5323,9 +5332,9 @@ "license": "MIT" }, "node_modules/std-env": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", - "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", + "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==", "dev": true, "license": "MIT" }, @@ -5648,13 +5657,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, "node_modules/through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -5707,16 +5709,16 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.0.tgz", - "integrity": "sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", + "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==", "dev": true, "license": "MIT" }, "node_modules/tinypool": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.1.tgz", - "integrity": "sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", + "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==", "dev": true, "license": "MIT", "engines": { @@ -5743,16 +5745,6 @@ "node": ">=14.0.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5786,9 +5778,9 @@ "license": "0BSD" }, "node_modules/tsx": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", - "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", + "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", "dev": true, "license": "MIT", "dependencies": { @@ -5896,9 +5888,9 @@ } }, "node_modules/typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -5971,9 +5963,9 @@ } }, "node_modules/vite": { - "version": "5.4.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.7.tgz", - "integrity": "sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==", + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", "dev": true, "license": "MIT", "dependencies": { @@ -6031,14 +6023,15 @@ } }, "node_modules/vite-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.1.tgz", - "integrity": "sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.5.tgz", + "integrity": "sha512-rd0QIgx74q4S1Rd56XIiL2cYEdyWn13cunYBIuqh9mpmQr7gGS0IxXoP8R6OaZtNQQLyXSWbd4rXKYUbhFpK5w==", "dev": true, "license": "MIT", "dependencies": { "cac": "^6.7.14", - "debug": "^4.3.6", + "debug": "^4.3.7", + "es-module-lexer": "^1.5.4", "pathe": "^1.1.2", "vite": "^5.0.0" }, @@ -6483,30 +6476,31 @@ } }, "node_modules/vitest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.1.tgz", - "integrity": "sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/expect": "2.1.1", - "@vitest/mocker": "2.1.1", - "@vitest/pretty-format": "^2.1.1", - "@vitest/runner": "2.1.1", - "@vitest/snapshot": "2.1.1", - "@vitest/spy": "2.1.1", - "@vitest/utils": "2.1.1", - "chai": "^5.1.1", - "debug": "^4.3.6", - "magic-string": "^0.30.11", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.5.tgz", + "integrity": "sha512-P4ljsdpuzRTPI/kbND2sDZ4VmieerR2c9szEZpjc+98Z9ebvnXmM5+0tHEKqYZumXqlvnmfWsjeFOjXVriDG7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "2.1.5", + "@vitest/mocker": "2.1.5", + "@vitest/pretty-format": "^2.1.5", + "@vitest/runner": "2.1.5", + "@vitest/snapshot": "2.1.5", + "@vitest/spy": "2.1.5", + "@vitest/utils": "2.1.5", + "chai": "^5.1.2", + "debug": "^4.3.7", + "expect-type": "^1.1.0", + "magic-string": "^0.30.12", "pathe": "^1.1.2", - "std-env": "^3.7.0", + "std-env": "^3.8.0", "tinybench": "^2.9.0", - "tinyexec": "^0.3.0", - "tinypool": "^1.0.0", + "tinyexec": "^0.3.1", + "tinypool": "^1.0.1", "tinyrainbow": "^1.2.0", "vite": "^5.0.0", - "vite-node": "2.1.1", + "vite-node": "2.1.5", "why-is-node-running": "^2.3.0" }, "bin": { @@ -6521,8 +6515,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.1.1", - "@vitest/ui": "2.1.1", + "@vitest/browser": "2.1.5", + "@vitest/ui": "2.1.5", "happy-dom": "*", "jsdom": "*" }, diff --git a/packages/algo-ts/package.json b/packages/algo-ts/package.json index e6b099b8..2a68d357 100644 --- a/packages/algo-ts/package.json +++ b/packages/algo-ts/package.json @@ -1,6 +1,6 @@ { "name": "@algorandfoundation/algorand-typescript", - "version": "0.0.1-alpha.16", + "version": "0.0.1-alpha.17", "description": "This package contains definitions for the types which comprise Algorand TypeScript which can be compiled to run on the Algorand Virtual Machine using the Puya compiler.", "private": false, "main": "index.js", @@ -21,36 +21,37 @@ "test": "vitest run" }, "devDependencies": { - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.11.1", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "^9.15.0", "@makerx/eslint-config": "4.0.0", "@makerx/prettier-config": "2.0.1", - "@makerx/ts-toolkit": "^4.0.0-beta.20", - "@rollup/plugin-commonjs": "28.0.0", + "@makerx/ts-toolkit": "^4.0.0-beta.21", + "@rollup/plugin-commonjs": "28.0.1", "@rollup/plugin-json": "6.1.0", "@rollup/plugin-node-resolve": "15.3.0", - "@rollup/plugin-typescript": "12.1.0", + "@rollup/plugin-typescript": "12.1.1", "@tsconfig/node20": "20.1.4", - "@types/node": "22.6.1", - "@typescript-eslint/eslint-plugin": "8.7.0", - "@typescript-eslint/parser": "8.7.0", - "@vitest/coverage-v8": "2.1.1", + "@types/node": "22.9.1", + "@typescript-eslint/eslint-plugin": "8.15.0", + "@typescript-eslint/parser": "8.15.0", + "@vitest/coverage-v8": "2.1.5", "better-npm-audit": "3.11.0", "copyfiles": "2.4.1", - "eslint": "9.11.1", + "eslint": "9.15.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", - "globals": "^15.9.0", + "globals": "^15.12.0", "npm-run-all": "4.1.5", "prettier": "3.3.3", "rimraf": "6.0.1", - "rollup": "4.22.4", - "tsx": "4.19.1", - "typescript": "^5.6.2", - "vitest": "2.1.1" + "rollup": "4.27.3", + "tsx": "4.19.2", + "typescript": "^5.6.3", + "vitest": "2.1.5" }, "overrides": { - "micromatch": "4.0.8" + "cross-spawn": "7.0.5", + "npm": "10.9.1" }, "peerDependencies": { "tslib": "^2.6.2" diff --git a/packages/algo-ts/src/arc-28.ts b/packages/algo-ts/src/arc-28.ts new file mode 100644 index 00000000..62f5ce74 --- /dev/null +++ b/packages/algo-ts/src/arc-28.ts @@ -0,0 +1,39 @@ +import { NoImplementation } from './impl/errors' +import { DeliberateAny } from './typescript-helpers' + +/** + * Emit an arc28 event log using either an ARC4Struct type or a named object type. + * Object types must have an ARC4 equivalent type. + * + * Anonymous types cannot be used as the type name is used to determine the event prefix + * @param event An ARC4Struct instance, or a plain object with a named type + * + * @example + * class Demo extends Struct<{ a: UintN64 }> {} + * emit(new Demo({ a: new UintN64(123) })) + * + * @example + * type Demo = { a: uint64 } + * emit({a: 123}) + * // or + * const d: Demo = { a: 123 } + * emit(d) + */ +export function emit>(event: TEvent): void +/** + * Emit an arc28 event log using an explicit name and inferred property/field types. + * Property types must be ARC4 or have an ARC4 equivalent type. + * @param eventName The name of the event (must be a compile time constant) + * @param eventProps A set of event properties (order is significant) + * + * @example + * emit("Demo", new UintN64(123)) + * + * @example + * const a: uint64 = 123 + * emit("Demo", a) + */ +export function emit(eventName: string, ...eventProps: TProps): void +export function emit(event: T | string, ...eventProps: unknown[]): void { + throw new NoImplementation() +} diff --git a/packages/algo-ts/src/arc4/encoded-types.ts b/packages/algo-ts/src/arc4/encoded-types.ts index 3559af29..2701fe56 100644 --- a/packages/algo-ts/src/arc4/encoded-types.ts +++ b/packages/algo-ts/src/arc4/encoded-types.ts @@ -1,26 +1,80 @@ -import { avmError, avmInvariant } from '../impl/errors' -import { arrayUtil, BytesCls, getNumber, getUint8Array, isBytes, isUint64 } from '../impl/primitives' -import { biguint, BigUintCompat, Bytes, bytes, BytesBacked, StringCompat, Uint64, uint64, Uint64Compat } from '../primitives' +import { NoImplementation } from '../impl/errors' +import { biguint, BigUintCompat, bytes, BytesBacked, BytesCompat, StringCompat, uint64, Uint64Compat } from '../primitives' import { Account } from '../reference' -import { err } from '../util' -export type BitSize = 8 | 16 | 32 | 64 | 128 | 256 | 512 -type NativeForArc4Int = N extends 8 | 16 | 32 | 64 ? uint64 : biguint -type CompatForArc4Int = N extends 8 | 16 | 32 | 64 ? Uint64Compat : BigUintCompat - -abstract class ARC4Encoded implements BytesBacked { - abstract __type?: string +type UintBitSize = 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64 +type BigUintBitSize = + | 72 + | 80 + | 88 + | 96 + | 104 + | 112 + | 120 + | 128 + | 136 + | 144 + | 152 + | 160 + | 168 + | 176 + | 184 + | 192 + | 200 + | 208 + | 216 + | 224 + | 232 + | 240 + | 248 + | 256 + | 264 + | 272 + | 280 + | 288 + | 296 + | 304 + | 312 + | 320 + | 328 + | 336 + | 344 + | 352 + | 360 + | 368 + | 376 + | 384 + | 392 + | 400 + | 408 + | 416 + | 424 + | 432 + | 440 + | 448 + | 456 + | 464 + | 472 + | 480 + | 488 + | 496 + | 504 + | 512 +export type BitSize = UintBitSize | BigUintBitSize +type NativeForArc4Int = N extends UintBitSize ? uint64 : biguint +type CompatForArc4Int = N extends UintBitSize ? Uint64Compat : BigUintCompat + +const TypeProperty = Symbol('ARC4Type') + +export abstract class ARC4Encoded implements BytesBacked { + abstract [TypeProperty]?: string get bytes(): bytes { - throw new Error('todo') - } - - equals(other: this): boolean { - return this.bytes.equals(other.bytes) + throw new NoImplementation() } } export class Str extends ARC4Encoded { - __type?: 'arc4.Str' + [TypeProperty]?: 'arc4.Str' #value: string constructor(s?: StringCompat) { super() @@ -31,76 +85,54 @@ export class Str extends ARC4Encoded { } } export class UintN extends ARC4Encoded { - __type?: `arc4.UintN<${N}>` + [TypeProperty]?: `arc4.UintN<${N}>` constructor(v?: CompatForArc4Int) { super() } get native(): NativeForArc4Int { - throw new Error('TODO') + throw new NoImplementation() } } +export class Byte extends UintN<8> {} +export class UintN8 extends UintN<8> {} +export class UintN16 extends UintN<16> {} +export class UintN32 extends UintN<32> {} +export class UintN64 extends UintN<64> {} +export class UintN128 extends UintN<128> {} +export class UintN256 extends UintN<256> {} export class UFixedNxM extends ARC4Encoded { - __type?: `arc4.UFixedNxM<${N}x${M}>` - constructor(v: `${number}.${number}`, n?: N, m?: M) { + [TypeProperty]?: `arc4.UFixedNxM<${N}x${M}>` + constructor(v: `${number}.${number}`) { super() } get native(): NativeForArc4Int { - throw new Error('TODO') + throw new NoImplementation() } } +export class Bool extends ARC4Encoded { + [TypeProperty]?: `arc4.Bool` -export class Byte extends UintN<8> { - constructor(v?: Uint64Compat) { - super(v) - } -} -export class Bool { - __type?: `arc4.Bool` - #v: boolean constructor(v?: boolean) { - this.#v = v ?? false + super() } get native(): boolean { - return this.#v + throw new NoImplementation() } } abstract class Arc4ReadonlyArray extends ARC4Encoded { - protected items: TItem[] - protected constructor(items: TItem[]) { + protected constructor() { super() - this.items = items.slice() - return new Proxy(this, { - get(target, prop) { - if (isUint64(prop)) { - const idx = getNumber(prop) - if (idx < target.items.length) return target.items[idx] - avmError('Index out of bounds') - } - return Reflect.get(target, prop) - }, - set(target, prop, value) { - if (isUint64(prop)) { - const idx = getNumber(prop) - if (idx < target.items.length) { - target.items[idx] = value - return true - } - avmError('Index out of bounds') - } - avmError('Property is not writable') - }, - }) } /** * Returns the current length of this array */ get length(): uint64 { - return Uint64(this.items.length) + throw new NoImplementation() } /** @@ -109,7 +141,7 @@ abstract class Arc4ReadonlyArray extends ARC4Encoded * @param index The index of the item to retrieve */ at(index: Uint64Compat): TItem { - return arrayUtil.arrayAt(this.items, index) + throw new NoImplementation() } /** @internal @@ -130,32 +162,28 @@ abstract class Arc4ReadonlyArray extends ARC4Encoded */ slice(start: Uint64Compat, end: Uint64Compat): DynamicArray slice(start?: Uint64Compat, end?: Uint64Compat): DynamicArray { - return new DynamicArray(...arrayUtil.arraySlice(this.items, start, end)) + throw new NoImplementation() } /** * Returns an iterator for the items in this array */ [Symbol.iterator](): IterableIterator { - return this.items[Symbol.iterator]() + throw new NoImplementation() } /** * Returns an iterator for a tuple of the indexes and items in this array */ - *entries(): IterableIterator { - for (const [idx, item] of this.items.entries()) { - yield [Uint64(idx), item] - } + entries(): IterableIterator { + throw new NoImplementation() } /** * Returns an iterator for the indexes in this array */ - *keys(): IterableIterator { - for (const idx of this.items.keys()) { - yield Uint64(idx) - } + keys(): IterableIterator { + throw new NoImplementation() } /** @@ -166,23 +194,22 @@ abstract class Arc4ReadonlyArray extends ARC4Encoded } export class StaticArray extends Arc4ReadonlyArray { - __type?: `arc4.StaticArray<${TItem['__type']}, ${TLength}>` + [TypeProperty]?: `arc4.StaticArray<${TItem[typeof TypeProperty]}, ${TLength}>` constructor() constructor(...items: TItem[] & { length: TLength }) constructor(...items: TItem[]) constructor(...items: TItem[] & { length: TLength }) { - super(items) + super() } copy(): StaticArray { - return new StaticArray(...this.items) + throw new NoImplementation() } } - export class DynamicArray extends Arc4ReadonlyArray { - __type?: `arc4.DynamicArray<${TItem['__type']}>` + [TypeProperty]?: `arc4.DynamicArray<${TItem[typeof TypeProperty]}>` constructor(...items: TItem[]) { - super(items) + super() } /** @@ -190,76 +217,60 @@ export class DynamicArray extends Arc4ReadonlyArray { - return new DynamicArray(...this.items) + throw new NoImplementation() } } type ExpandTupleType = T extends [infer T1 extends ARC4Encoded, ...infer TRest extends ARC4Encoded[]] ? TRest extends [] - ? `${T1['__type']}` - : `${T1['__type']},${ExpandTupleType}` + ? `${T1[typeof TypeProperty]}` + : `${T1[typeof TypeProperty]},${ExpandTupleType}` : '' export class Tuple extends ARC4Encoded { - __type?: `arc4.Tuple<${ExpandTupleType}>` - #items: TTuple + [TypeProperty]?: `arc4.Tuple<${ExpandTupleType}>` constructor(...items: TTuple) { super() - this.#items = items } at(index: TIndex): TTuple[TIndex] { - return this.#items[index] ?? err('Index out of bounds') + throw new NoImplementation() } get length(): TTuple['length'] & uint64 { - return this.#items.length + throw new NoImplementation() } get native(): TTuple { - return this.#items + throw new NoImplementation() } } export class Address extends Arc4ReadonlyArray { - __type?: `arc4.Address` + [TypeProperty]?: `arc4.Address` constructor(value?: Account | string | bytes) { - let byteValues: Uint8Array - if (value === undefined) { - byteValues = new Uint8Array(32) - } else if (typeof value === 'string') { - // Interpret as base 32 - byteValues = BytesCls.fromBase32(value).asUint8Array() - } else if (isBytes(value)) { - byteValues = getUint8Array(value) - } else { - byteValues = getUint8Array(value.bytes) - } - avmInvariant(byteValues.length === 32, 'Addresses should be 32 bytes') - super(Array.from(byteValues).map((b) => new Byte(b))) + super() } get native(): Account { - return Account(Bytes(this.items.map((i) => i.native))) + throw new NoImplementation() } } type StructConstraint = Record class StructBase extends ARC4Encoded { - __type = 'arc4.Struct' + [TypeProperty] = 'arc4.Struct' } class StructImpl extends StructBase { constructor(initial: T) { @@ -277,3 +288,53 @@ class StructImpl extends StructBase { type StructConstructor = new (initial: T) => StructBase & T export const Struct = StructImpl as StructConstructor + +export class DynamicBytes extends Arc4ReadonlyArray { + [TypeProperty]?: `arc4.DynamicBytes` + + constructor(value?: bytes | string) { + super() + } + + get native(): bytes { + throw new NoImplementation() + } +} + +export class StaticBytes extends Arc4ReadonlyArray { + [TypeProperty]?: `arc4.StaticBytes<${TLength}>` + + constructor(value?: bytes | string) { + super() + } + + get native(): bytes { + throw new NoImplementation() + } +} + +/** + * Interpret the provided bytes as an ARC4 encoded type with no validation + * @param bytes An arc4 encoded bytes value + * @param prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed + */ +export function interpretAsArc4(bytes: BytesCompat, prefix: 'none' | 'log' = 'none'): T { + throw new NoImplementation() +} + +/** + * Decode the provided bytes to a native Algorand TypeScript value + * @param bytes An arc4 encoded bytes value + * @param prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed + */ +export function decodeArc4(bytes: BytesCompat, prefix: 'none' | 'log' = 'none'): T { + throw new NoImplementation() +} + +/** + * Encode the provided Algorand TypeScript value as ARC4 bytes + * @param value Any native Algorand TypeScript value with a supported ARC4 encoding + */ +export function encodeArc4(value: T): bytes { + throw new NoImplementation() +} diff --git a/packages/algo-ts/src/arc4/index.ts b/packages/algo-ts/src/arc4/index.ts index 13a30b85..ca63b31f 100644 --- a/packages/algo-ts/src/arc4/index.ts +++ b/packages/algo-ts/src/arc4/index.ts @@ -1,6 +1,7 @@ import { BaseContract } from '../base-contract' import { ctxMgr } from '../execution-context' -import { Uint64 } from '../primitives' +import { NoImplementation } from '../impl/errors' +import { bytes, Uint64 } from '../primitives' import { DeliberateAny } from '../typescript-helpers' export * from './encoded-types' @@ -82,3 +83,13 @@ export function baremethod(config?: BareMethodConfig return target } } + +/** + * Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first + * 4 bytes of the SHA512/256 hash of the method signature. + * @param methodSignature An ARC4 method signature. Eg. `hello(string)string`. Must be a compile time constant. + * @returns The ARC4 method selector. Eg. `02BECE11` + */ +export function methodSelector(methodSignature: string): bytes { + throw new NoImplementation() +} diff --git a/packages/algo-ts/src/compiled.ts b/packages/algo-ts/src/compiled.ts new file mode 100644 index 00000000..8d711cbf --- /dev/null +++ b/packages/algo-ts/src/compiled.ts @@ -0,0 +1,116 @@ +import { BaseContract } from './base-contract' +import { NoImplementation } from './impl/errors' +import { LogicSig } from './logic-sig' +import { bytes, uint64 } from './primitives' +import { Account } from './reference' +import { ConstructorFor, DeliberateAny } from './typescript-helpers' + +/** + * Provides compiled programs and state allocation values for a Contract. Created by calling `compile(ExampleContractType)` + */ +export type CompiledContract = { + /** + * Approval program pages for a contract, after template variables have been replaced and compiled to AVM bytecode + */ + approvalProgram: [bytes, bytes] + /** + * Clear state program pages for a contract, after template variables have been replaced and compiled to AVM bytecode + */ + clearStateProgram: [bytes, bytes] + /** + * By default, provides extra program pages required based on approval and clear state program size, can be overridden when calling `compile(ExampleContractType, { extraProgramPages: ... })` + */ + extraProgramPages: uint64 + /** + * By default, provides global num uints based on contract state totals, can be overridden when calling `compile(ExampleContractType, { globalUints: ... })` + */ + globalUints: uint64 + /** + * By default, provides global num bytes based on contract state totals, can be overridden when calling `compile(ExampleContractType, { globalBytes: ... })` + */ + globalBytes: uint64 + /** + * By default, provides local num uints based on contract state totals, can be overridden when calling `compile(ExampleContractType, { localUints: ... })` + */ + localUints: uint64 + /** + * By default, provides local num bytes based on contract state totals, can be overridden when calling `compile(ExampleContractType, { localBytes: ... })` + */ + localBytes: uint64 +} + +/** + * Provides account for a Logic Signature. Created by calling `compile(LogicSigType)` + */ +export type CompiledLogicSig = { + /** + * Address of a logic sig program, after template variables have been replaced and compiled to AVM bytecode + */ + account: Account +} + +/** + * Options for compiling a contract + */ +type CompileContractOptions = { + /** + * Number of extra program pages, defaults to minimum required for contract + */ + extraProgramPages?: uint64 + /** + * Number of global uint64s, defaults to value defined for contract + */ + globalUints?: uint64 + /** + * Number of global bytes, defaults to value defined for contract + */ + globalBytes?: uint64 + /** + * Number of local uint64s, defaults to value defined for contract + */ + localUints?: uint64 + /** + * Number of local bytes, defaults to value defined for contract + */ + localBytes?: uint64 + /** + * Template variables to substitute into the contract, key should be without the prefix, must evaluate to a compile time constant + * and match the type of the template var declaration + */ + templateVars?: Record + /** + * Prefix to add to provided template vars, defaults to the prefix supplied on command line (which defaults to TMPL_) + */ + templateVarsPrefix?: string +} + +/** + * Options for compiling a logic signature + */ +type CompileLogicSigOptions = { + /** + * Template variables to substitute into the contract, key should be without the prefix, must evaluate to a compile time constant + * and match the type of the template var declaration + */ + templateVars?: Record + /** + * Prefix to add to provided template vars, defaults to the prefix supplied on command line (which defaults to TMPL_) + */ + templateVarsPrefix?: string +} + +/** + * Compile a contract and return the resulting byte code for approval and clear state programs. + * @param contract The contract class to compile + * @param options Options for compiling the contract + */ +export function compile(contract: ConstructorFor, options?: CompileContractOptions): CompiledContract +/** + * Compile a logic signature and return an account ready for signing transactions. + * @param logicSig The logic sig class to compile + * @param options Options for compiling the logic sig + */ +export function compile(logicSig: ConstructorFor, options?: CompileLogicSigOptions): CompiledLogicSig +export function compile(artefact: ConstructorFor | ConstructorFor): CompiledLogicSig | CompiledContract { + throw new NoImplementation() +} diff --git a/packages/algo-ts/src/impl/errors.ts b/packages/algo-ts/src/impl/errors.ts index fb85a565..32fb9ea6 100644 --- a/packages/algo-ts/src/impl/errors.ts +++ b/packages/algo-ts/src/impl/errors.ts @@ -50,3 +50,13 @@ export class CodeError extends Error { export function codeError(message: string): never { throw new CodeError(message) } + +/** + * This error can be used in stub implementations that are expected to be overridden + * by the testing framework + */ +export class NoImplementation extends Error { + constructor() { + super('This method is intentionally not implemented') + } +} diff --git a/packages/algo-ts/src/impl/primitives.ts b/packages/algo-ts/src/impl/primitives.ts index 687b9ba6..15b3502f 100644 --- a/packages/algo-ts/src/impl/primitives.ts +++ b/packages/algo-ts/src/impl/primitives.ts @@ -243,7 +243,7 @@ export class BytesCls extends AlgoTsPrimitiveCls { return new BytesCls(arrayUtil.arrayAt(this.#v, i)) } - slice(start: undefined | StubUint64Compat, end: undefined | StubUint64Compat): BytesCls { + slice(start?: StubUint64Compat, end?: StubUint64Compat): BytesCls { const sliced = arrayUtil.arraySlice(this.#v, start, end) return new BytesCls(sliced) } diff --git a/packages/algo-ts/src/index.ts b/packages/algo-ts/src/index.ts index ae64dcab..5d78b7d4 100644 --- a/packages/algo-ts/src/index.ts +++ b/packages/algo-ts/src/index.ts @@ -15,3 +15,6 @@ export { TransactionType } from './transactions' export { LogicSig } from './logic-sig' export { TemplateVar } from './template-var' export { Base64, Ec, Ecdsa, VrfVerify } from './op-types' +export { compile, CompiledContract, CompiledLogicSig } from './compiled' +export { MutableArray } from './mutable-array' +export { emit } from './arc-28' diff --git a/packages/algo-ts/src/mutable-array.ts b/packages/algo-ts/src/mutable-array.ts new file mode 100644 index 00000000..e51dff30 --- /dev/null +++ b/packages/algo-ts/src/mutable-array.ts @@ -0,0 +1,89 @@ +import { NoImplementation } from './impl/errors' +import { uint64, Uint64Compat } from './primitives' + +export class MutableArray { + constructor(...items: TItem[]) {} + + /** + * Returns the current length of this array + */ + get length(): uint64 { + throw new NoImplementation() + } + + /** + * Returns the item at the given index. + * Negative indexes are taken from the end. + * @param index The index of the item to retrieve + */ + at(index: Uint64Compat): TItem { + throw new NoImplementation() + } + + /** + * Create a new Dynamic array with all items from this array + */ + slice(): MutableArray + /** + * Create a new MutableArray with all items up till `end`. + * Negative indexes are taken from the end. + * @param end An index in which to stop copying items. + */ + slice(end: Uint64Compat): MutableArray + /** + * Create a new MutableArray with items from `start`, up until `end` + * Negative indexes are taken from the end. + * @param start An index in which to start copying items. + * @param end An index in which to stop copying items + */ + slice(start: Uint64Compat, end: Uint64Compat): MutableArray + slice(start?: Uint64Compat, end?: Uint64Compat): MutableArray { + throw new NoImplementation() + } + + /** + * Returns an iterator for the items in this array + */ + [Symbol.iterator](): IterableIterator { + throw new NoImplementation() + } + + /** + * Returns an iterator for a tuple of the indexes and items in this array + */ + entries(): IterableIterator { + throw new NoImplementation() + } + + /** + * Returns an iterator for the indexes in this array + */ + keys(): IterableIterator { + throw new NoImplementation() + } + + /** + * Get or set the item at the specified index. + * Negative indexes are not supported + */ + [index: uint64]: TItem + + /** + * Push a number of items into this array + * @param items The items to be added to this array + */ + push(...items: TItem[]): void { + throw new NoImplementation() + } + + /** + * Pop a single item from this array + */ + pop(): TItem { + throw new NoImplementation() + } + + copy(): MutableArray { + throw new NoImplementation() + } +} diff --git a/packages/algo-ts/src/primitives.ts b/packages/algo-ts/src/primitives.ts index 56feee0f..c667ea19 100644 --- a/packages/algo-ts/src/primitives.ts +++ b/packages/algo-ts/src/primitives.ts @@ -13,6 +13,14 @@ export type uint64 = { __type?: 'uint64' } & number +/** + * Create a uint64 with the default value of 0 + */ +export function Uint64(): uint64 +/** + * Create a uint64 from a string literal + */ +export function Uint64(v: string): uint64 /** * Create a uint64 from a bigint literal */ @@ -25,8 +33,11 @@ export function Uint64(v: number): uint64 * Create a uint64 from a boolean value. True is 1, False is 0 */ export function Uint64(v: boolean): uint64 -export function Uint64(v: Uint64Compat): uint64 { - return Uint64Cls.fromCompat(v).asAlgoTs() +export function Uint64(v?: Uint64Compat | string): uint64 { + if (typeof v === 'string') { + v = BigInt(v) + } + return Uint64Cls.fromCompat(v ?? 0).asAlgoTs() } /** diff --git a/packages/algo-ts/src/template-var.ts b/packages/algo-ts/src/template-var.ts index 76b4eb30..71726469 100644 --- a/packages/algo-ts/src/template-var.ts +++ b/packages/algo-ts/src/template-var.ts @@ -1,3 +1,5 @@ +import { NoImplementation } from './impl/errors' + export function TemplateVar(variableName: string, prefix = 'TMPL_'): T { - throw new Error('TODO') + throw NoImplementation } diff --git a/packages/algo-ts/src/typescript-helpers.ts b/packages/algo-ts/src/typescript-helpers.ts index d0788aab..fbdb748d 100644 --- a/packages/algo-ts/src/typescript-helpers.ts +++ b/packages/algo-ts/src/typescript-helpers.ts @@ -2,3 +2,4 @@ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ export type DeliberateAny = any export type AnyFunction = (...args: DeliberateAny[]) => DeliberateAny +export type ConstructorFor = new (...args: TArgs) => T diff --git a/src/awst/intrinsic-factory.ts b/src/awst/intrinsic-factory.ts index 7eb6bc80..18bd0388 100644 --- a/src/awst/intrinsic-factory.ts +++ b/src/awst/intrinsic-factory.ts @@ -27,23 +27,19 @@ export const intrinsicFactory = { }) }, err({ sourceLocation, comment }: { sourceLocation: SourceLocation; comment: string | null }) { - return nodeFactory.intrinsicCall({ - opCode: 'err', + return nodeFactory.assertExpression({ + condition: null, sourceLocation, - stackArgs: [], - immediates: [], wtype: wtypes.voidWType, - comment, + errorMessage: comment, }) }, assert({ sourceLocation, comment, condition }: { sourceLocation: SourceLocation; comment: string | null; condition: Expression }) { - return nodeFactory.intrinsicCall({ - opCode: 'assert', + return nodeFactory.assertExpression({ sourceLocation, - stackArgs: [condition], - immediates: [], + condition, wtype: wtypes.voidWType, - comment, + errorMessage: comment, }) }, bytesLen({ value, sourceLocation }: { value: awst.Expression; sourceLocation: SourceLocation }) { @@ -68,7 +64,7 @@ export const intrinsicFactory = { if (value instanceof awst.IntegerConstant) { return nodeFactory.bytesConstant({ sourceLocation, - value: bigIntToUint8Array(value.value), + value: bigIntToUint8Array(value.value, value.wtype.equals(wtypes.uint64WType) ? 8 : 'dynamic'), encoding: BytesEncoding.base16, }) } diff --git a/src/awst/json-serialize-awst.ts b/src/awst/json-serialize-awst.ts index 9978af51..c945746c 100644 --- a/src/awst/json-serialize-awst.ts +++ b/src/awst/json-serialize-awst.ts @@ -7,8 +7,9 @@ import { invariant } from '../util' import { buildBase85Encoder } from '../util/base-85' import { ARC4ABIMethodConfig, ContractReference, LogicSigReference } from './models' import type { RootNode } from './nodes' -import { IntrinsicCall } from './nodes' +import { IntrinsicCall, SingleEvaluation } from './nodes' import { SourceLocation } from './source-location' +import { SymbolToNumber } from './util' export class SnakeCaseSerializer { constructor(private readonly spaces = 2) {} @@ -35,6 +36,7 @@ export class AwstSerializer extends SnakeCaseSerializer { ) { super() } + #singleEvals = new SymbolToNumber() private b85 = buildBase85Encoder() protected serializerFunction(key: string, value: unknown): unknown { @@ -97,6 +99,13 @@ export class AwstSerializer extends SnakeCaseSerializer { file: filePath, } } + if (value instanceof SingleEvaluation) { + return { + _type: SingleEvaluation.name, + ...(super.serializerFunction(key, value) as object), + id: String(this.#singleEvals.forSymbol(value.id)[0]), + } + } if (value instanceof ARC4ABIMethodConfig) { // TODO: This can be removed once puya has been updated to support a more advanced default args schema return { diff --git a/src/awst/node-factory.ts b/src/awst/node-factory.ts index e134185c..046676e1 100644 --- a/src/awst/node-factory.ts +++ b/src/awst/node-factory.ts @@ -17,7 +17,6 @@ import { Copy, ExpressionStatement, IntegerConstant, - IntrinsicCall, MethodDocumentation, Not, NumericComparisonExpression, @@ -34,7 +33,6 @@ import { wtypes } from './wtypes' type ConcreteNodes = typeof concreteNodes -let singleEval = 0n const explicitNodeFactory = { voidConstant(props: { sourceLocation: SourceLocation }): VoidConstant { return new VoidConstant({ @@ -125,15 +123,15 @@ const explicitNodeFactory = { wtype: wtypes.boolWType, }) }, - boolConstant(props: { value: boolean; sourceLocation: SourceLocation }): BoolConstant { + boolConstant(props: { value: boolean; sourceLocation: SourceLocation; wtype?: wtypes.WType }): BoolConstant { return new BoolConstant({ ...props, - wtype: wtypes.boolWType, + wtype: props.wtype ?? wtypes.boolWType, }) }, singleEvaluation({ source }: { source: Expression }) { return new SingleEvaluation({ - id: singleEval++, + id: Symbol(), sourceLocation: source.sourceLocation, wtype: source.wtype, source, @@ -214,12 +212,6 @@ const explicitNodeFactory = { returns: props?.returns ?? null, }) }, - intrinsicCall(props: Omit, 'comment'> & { comment?: string | null }) { - return new IntrinsicCall({ - ...props, - comment: props.comment ?? null, - }) - }, copy({ value, sourceLocation }: { value: Expression; sourceLocation: SourceLocation }) { return new Copy({ value, diff --git a/src/awst/nodes.ts b/src/awst/nodes.ts index 08c02cca..f3e1648b 100644 --- a/src/awst/nodes.ts +++ b/src/awst/nodes.ts @@ -134,6 +134,19 @@ export class ReturnStatement extends Statement { return visitor.visitReturnStatement(this) } } +export class AssertExpression extends Expression { + constructor(props: Props) { + super(props) + this.condition = props.condition + this.errorMessage = props.errorMessage + this.wtype = props.wtype + } + condition: Expression | null + errorMessage: string | null + accept(visitor: ExpressionVisitor): T { + return visitor.visitAssertExpression(this) + } +} export class IntegerConstant extends Expression { constructor(props: Props) { super(props) @@ -162,8 +175,8 @@ export class DecimalConstant extends Expression { export class BoolConstant extends Expression { constructor(props: Props) { super(props) - this.wtype = props.wtype this.value = props.value + this.wtype = props.wtype } value: boolean accept(visitor: ExpressionVisitor): T { @@ -193,8 +206,8 @@ export class BytesConstant extends Expression { export class StringConstant extends Expression { constructor(props: Props) { super(props) - this.wtype = props.wtype this.value = props.value + this.wtype = props.wtype } value: string accept(visitor: ExpressionVisitor): T { @@ -316,12 +329,10 @@ export class IntrinsicCall extends Expression { this.opCode = props.opCode this.immediates = props.immediates this.stackArgs = props.stackArgs - this.comment = props.comment } opCode: string immediates: Array stackArgs: Array - comment: string | null accept(visitor: ExpressionVisitor): T { return visitor.visitIntrinsicCall(this) } @@ -538,7 +549,7 @@ export class SingleEvaluation extends Expression { this.sourceLocation = props.sourceLocation } source: Expression - id: bigint + id: symbol sourceLocation: SourceLocation accept(visitor: ExpressionVisitor): T { return visitor.visitSingleEvaluation(this) @@ -969,6 +980,19 @@ export class BytesAugmentedAssignment extends Statement { return visitor.visitBytesAugmentedAssignment(this) } } +export class Emit extends Expression { + constructor(props: Props) { + super(props) + this.signature = props.signature + this.value = props.value + this.wtype = props.wtype + } + signature: string + value: Expression + accept(visitor: ExpressionVisitor): T { + return visitor.visitEmit(this) + } +} export class Range extends Expression { constructor(props: Props) { super(props) @@ -1296,6 +1320,7 @@ export const concreteNodes = { loopExit: LoopExit, loopContinue: LoopContinue, returnStatement: ReturnStatement, + assertExpression: AssertExpression, integerConstant: IntegerConstant, decimalConstant: DecimalConstant, boolConstant: BoolConstant, @@ -1355,6 +1380,7 @@ export const concreteNodes = { uInt64AugmentedAssignment: UInt64AugmentedAssignment, bigUIntAugmentedAssignment: BigUIntAugmentedAssignment, bytesAugmentedAssignment: BytesAugmentedAssignment, + emit: Emit, range: Range, enumeration: Enumeration, reversed: Reversed, @@ -1379,6 +1405,7 @@ export const concreteNodes = { bigUIntConstant: IntegerConstant, } as const export interface ExpressionVisitor { + visitAssertExpression(expression: AssertExpression): T visitIntegerConstant(expression: IntegerConstant): T visitDecimalConstant(expression: DecimalConstant): T visitBoolConstant(expression: BoolConstant): T @@ -1429,6 +1456,7 @@ export interface ExpressionVisitor { visitBytesBinaryOperation(expression: BytesBinaryOperation): T visitBooleanBinaryOperation(expression: BooleanBinaryOperation): T visitNot(expression: Not): T + visitEmit(expression: Emit): T visitRange(expression: Range): T visitEnumeration(expression: Enumeration): T visitReversed(expression: Reversed): T diff --git a/src/awst/to-code-visitor.ts b/src/awst/to-code-visitor.ts index d26a6115..c882e557 100644 --- a/src/awst/to-code-visitor.ts +++ b/src/awst/to-code-visitor.ts @@ -3,9 +3,18 @@ import { TodoError } from '../errors' import { logger } from '../logger' import { uint8ArrayToBase32, uint8ArrayToUtf8 } from '../util' import type { ContractReference } from './models' -import type { AppStorageDefinition, ContractMemberNodeVisitor, ExpressionVisitor, RootNodeVisitor, StatementVisitor } from './nodes' +import type { + AppStorageDefinition, + AssertExpression, + ContractMemberNodeVisitor, + Emit, + ExpressionVisitor, + RootNodeVisitor, + StatementVisitor, +} from './nodes' import * as nodes from './nodes' import { AppStorageKind, BytesEncoding, ContractMethodTarget, InstanceMethodTarget, InstanceSuperMethodTarget, SubroutineID } from './nodes' +import { SymbolToNumber } from './util' import { wtypes } from './wtypes' function printBytes(value: Uint8Array, encoding: BytesEncoding) { @@ -41,7 +50,7 @@ export class ToCodeVisitor visitAppStorageDefinition(contractMemberNode: AppStorageDefinition): string[] { throw new Error('Method not implemented.') } - #singleEval = new Set() + #singleEval = new SymbolToNumber() visitUInt64PostfixUnaryOperation(expression: nodes.UInt64PostfixUnaryOperation): string { return `${expression.target.accept(this)}${expression.op}` } @@ -49,10 +58,35 @@ export class ToCodeVisitor return `${expression.target.accept(this)}${expression.op}` } visitCompiledContract(expression: nodes.CompiledContract): string { - throw new TodoError('Method not implemented.', { sourceLocation: expression.sourceLocation }) + let overrides = Array.from(expression.allocationOverrides.entries()) + .map(([f, v]) => `${f}=${v.accept(this)}`) + .join(', ') + if (overrides) { + overrides = `, ${overrides}` + } + + let templateVars = Array.from(expression.templateVariables.entries()) + .map(([n, v]) => `${n}=${v.accept(this)}`) + .join(', ') + if (templateVars) { + templateVars = `, ${templateVars}` + } + + const prefix = expression.prefix ? `, prefix=${expression.prefix}` : '' + + return `compile(${expression.contract.id}${overrides}${prefix}${templateVars}` } visitCompiledLogicSig(expression: nodes.CompiledLogicSig): string { - throw new TodoError('Method not implemented.', { sourceLocation: expression.sourceLocation }) + let templateVars = Array.from(expression.templateVariables.entries()) + .map(([n, v]) => `${n}=${v.accept(this)}`) + .join(', ') + if (templateVars) { + templateVars = `, ${templateVars}` + } + + const prefix = expression.prefix ? `, prefix=${expression.prefix}` : '' + + return `compile(${expression.logicSig.id}${prefix}${templateVars}` } visitLoopExit(statement: nodes.LoopExit): string[] { throw new TodoError('Method not implemented.', { sourceLocation: statement.sourceLocation }) @@ -175,11 +209,11 @@ export class ToCodeVisitor return `LocalState[${expression.account.accept(this)}][${expression.key.accept(this)}]` } visitSingleEvaluation(expression: nodes.SingleEvaluation): string { - if (this.#singleEval.has(expression.id)) { - return `#${expression.id}` + const [id, isNew] = this.#singleEval.forSymbol(expression.id) + if (!isNew) { + return `#${id}` } - this.#singleEval.add(expression.id) - return `(#${expression.id} = ${expression.source.accept(this)})` + return `(#${id} = ${expression.source.accept(this)})` } visitReinterpretCast(expression: nodes.ReinterpretCast): string { const target = expression.expr.accept(this) @@ -319,6 +353,10 @@ export class ToCodeVisitor '}', ] } + visitEmit(expression: Emit): string { + return `emit("${expression.signature}", ${expression.value.accept(this)})` + } + visitContractMethod(statement: nodes.ContractMethod): string[] { const prefix = statement.cref.id === this.currentContract.at(-1)?.id ? '' : `${statement.cref.className}::` return [`${prefix}${statement.memberName}(): ${statement.returnType}`, '{', ...indent(statement.body.accept(this)), '}', ''] @@ -326,6 +364,14 @@ export class ToCodeVisitor visitLogicSignature(moduleStatement: nodes.LogicSignature): string[] { return ['', `logicsig ${moduleStatement.id} {`, ...indent(moduleStatement.program.body.accept(this)), '}'] } + visitAssertExpression(expression: AssertExpression): string { + return [ + expression.condition ? 'assert(' : 'err(', + expression.condition?.accept(this) ?? '', + expression.errorMessage ? `, comment=${expression.errorMessage}` : '', + ')', + ].join('') + } private currentContract: ContractReference[] = [] visitContract(c: nodes.Contract): string[] { diff --git a/src/awst/txn-fields.ts b/src/awst/txn-fields.ts index 06ca6890..cb6f9da8 100644 --- a/src/awst/txn-fields.ts +++ b/src/awst/txn-fields.ts @@ -5,11 +5,16 @@ export class TxnFieldData { readonly wtype: wtypes.WType readonly numValues: number readonly isInnerParam: boolean - constructor(data: { field: TxnField; wtype: wtypes.WType; numValues?: number; isInnerParam?: boolean }) { + /** + * If field is an array, accept individual arguments and convert to an array + */ + readonly arrayPromote: boolean + constructor(data: { field: TxnField; wtype: wtypes.WType; numValues?: number; isInnerParam?: boolean; arrayPromote?: boolean }) { this.immediate = data.field this.wtype = data.wtype this.numValues = data.numValues ?? 1 this.isInnerParam = data.isInnerParam ?? true + this.arrayPromote = data.arrayPromote ?? false } } @@ -167,6 +172,16 @@ export const TxnFields: Record = { // v5 Logs: new TxnFieldData({ field: TxnField.Logs, wtype: wtypes.bytesWType, numValues: 32, isInnerParam: false }), // v7 - ApprovalProgramPages: new TxnFieldData({ field: TxnField.ApprovalProgramPages, wtype: wtypes.bytesWType, numValues: 4 }), - ClearStateProgramPages: new TxnFieldData({ field: TxnField.ClearStateProgramPages, wtype: wtypes.bytesWType, numValues: 4 }), + ApprovalProgramPages: new TxnFieldData({ + field: TxnField.ApprovalProgramPages, + wtype: wtypes.bytesWType, + numValues: 4, + arrayPromote: true, + }), + ClearStateProgramPages: new TxnFieldData({ + field: TxnField.ClearStateProgramPages, + wtype: wtypes.bytesWType, + numValues: 4, + arrayPromote: true, + }), } diff --git a/src/awst/util.ts b/src/awst/util.ts index 40c754b9..c7feee0c 100644 --- a/src/awst/util.ts +++ b/src/awst/util.ts @@ -4,3 +4,17 @@ import { BoolConstant, BytesConstant, IntegerConstant, StringConstant } from './ export function isConstant(expr: Expression): expr is Constant { return expr instanceof StringConstant || expr instanceof BytesConstant || expr instanceof IntegerConstant || expr instanceof BoolConstant } + +export class SymbolToNumber { + #symbols = new Map() + + forSymbol(sym: symbol): [number, boolean] { + let val = this.#symbols.get(sym) + if (val !== undefined) { + return [val, false] + } + val = this.#symbols.size + this.#symbols.set(sym, val) + return [val, true] + } +} diff --git a/src/awst/wtypes.ts b/src/awst/wtypes.ts index 86dad2ea..025820a6 100644 --- a/src/awst/wtypes.ts +++ b/src/awst/wtypes.ts @@ -158,10 +158,11 @@ export namespace wtypes { } toString(): string { + const displayName = this.name.split('::').at(-1) ?? this.name if (this.names) { - return `${this.name ?? ''}{ ${this.names.map((n, i) => `${n}: ${this.types[i]}`).join(', ')} }` + return `${displayName}{ ${this.names.map((n, i) => `${n}: ${this.types[i]}`).join(', ')} }` } - return `${this.immutable ? 'readonly' : ''}${this.name ?? ''}[${this.types.join(', ')}]` + return `${this.immutable ? 'readonly' : ''}${displayName}[${this.types.join(', ')}]` } } export class WArray extends WType { @@ -250,28 +251,37 @@ export namespace wtypes { fields: Record sourceLocation: SourceLocation | null frozen: boolean + desc: string | null constructor({ fields, sourceLocation, name, + desc, frozen, }: { frozen: boolean name: string + desc: string | null fields: Record sourceLocation?: SourceLocation }) { super({ - arc4Name: Object.values(fields) + arc4Name: `(${Object.values(fields) .map((f) => f.arc4Name) - .join(','), + .join(',')})`, name, nativeType: null, }) this.sourceLocation = sourceLocation ?? null this.fields = fields this.frozen = frozen + this.desc = desc + } + + toString(): string { + if (!this.name) return this.arc4Name + return super.toString() } } export class ARC4Tuple extends ARC4Type { diff --git a/src/awst_build/arc4-util.ts b/src/awst_build/arc4-util.ts index 19bc04cd..ac65f967 100644 --- a/src/awst_build/arc4-util.ts +++ b/src/awst_build/arc4-util.ts @@ -7,9 +7,12 @@ import { accountPType, applicationPType, assetPType, + biguintPType, boolPType, bytesPType, GroupTransactionPType, + NativeNumericType, + numberPType, ObjectPType, stringPType, TuplePType, @@ -18,12 +21,11 @@ import { } from './ptypes' import { ARC4BooleanType, - arc4ByteAlias, ARC4EncodedType, ARC4StringType, ARC4StructType, ARC4TupleType, - DynamicArrayType, + DynamicBytesType, UintNType, } from './ptypes/arc4-types' @@ -43,6 +45,7 @@ export function isArc4EncodableType(ptype: PType): boolean { if (ptype instanceof ARC4EncodedType) return true if (ptype.equals(boolPType)) return true if (ptype.equals(uint64PType)) return true + if (ptype.equals(biguintPType)) return true if (ptype.equals(bytesPType)) return true if (ptype.equals(stringPType)) return true if (ptype instanceof TuplePType) return ptype.items.every((i) => isArc4EncodableType(i)) @@ -50,17 +53,25 @@ export function isArc4EncodableType(ptype: PType): boolean { return false } +export function ptypeToArc4EncodedType(ptype: TuplePType, sourceLocation: SourceLocation): ARC4TupleType +export function ptypeToArc4EncodedType(ptype: ObjectPType, sourceLocation: SourceLocation): ARC4StructType +export function ptypeToArc4EncodedType(ptype: PType, sourceLocation: SourceLocation): ARC4EncodedType export function ptypeToArc4EncodedType(ptype: PType, sourceLocation: SourceLocation): ARC4EncodedType { if (ptype instanceof ARC4EncodedType) return ptype if (ptype.equals(boolPType)) return ARC4BooleanType if (ptype.equals(uint64PType)) return new UintNType({ n: 64n }) - if (ptype.equals(bytesPType)) return new DynamicArrayType({ elementType: arc4ByteAlias }) + if (ptype.equals(biguintPType)) return new UintNType({ n: 512n }) + if (ptype.equals(bytesPType)) return DynamicBytesType if (ptype.equals(stringPType)) return ARC4StringType + if (ptype instanceof NativeNumericType) { + throw new CodeError(numberPType.expressionMessage, { sourceLocation }) + } if (ptype instanceof TuplePType) return new ARC4TupleType({ types: ptype.items.map((i) => ptypeToArc4EncodedType(i, sourceLocation)) }) if (ptype instanceof ObjectPType) return new ARC4StructType({ name: ptype.name, module: ptype.module, + description: ptype.description, fields: Object.fromEntries(ptype.orderedProperties().map(([p, pt]) => [p, ptypeToArc4EncodedType(pt, sourceLocation)])), }) @@ -75,7 +86,9 @@ export function getFunctionTypes(ptype: FunctionPType, sourceLocation: SourceLoc if ('output' in result) { logger.error(sourceLocation, 'for compatibility with ARC-32, ARC-4 methods cannot have an argument named output') } + result['output'] = ptype.returnType + return result } diff --git a/src/awst_build/ast-visitors/base-visitor.ts b/src/awst_build/ast-visitors/base-visitor.ts index 52250bc2..0c62458b 100644 --- a/src/awst_build/ast-visitors/base-visitor.ts +++ b/src/awst_build/ast-visitors/base-visitor.ts @@ -1,6 +1,6 @@ import ts from 'typescript' import { nodeFactory } from '../../awst/node-factory' -import type { Expression, LValue, Statement } from '../../awst/nodes' +import type { Expression, LValue, MethodDocumentation, Statement } from '../../awst/nodes' import type { SourceLocation } from '../../awst/source-location' import { CodeError, NotSupported, TodoError } from '../../errors' import { logger } from '../../logger' @@ -28,6 +28,7 @@ import { BigIntLiteralExpressionBuilder } from '../eb/literal/big-int-literal-ex import { ConditionalExpressionBuilder } from '../eb/literal/conditional-expression-builder' import type { ObjectLiteralParts } from '../eb/literal/object-literal-expression-builder' import { ObjectLiteralExpressionBuilder } from '../eb/literal/object-literal-expression-builder' +import { NamespaceBuilder } from '../eb/namespace-builder' import { OmittedExpressionBuilder } from '../eb/omitted-expression-builder' import { StringExpressionBuilder, StringFunctionBuilder } from '../eb/string-expression-builder' import { requireExpressionOfType, requireInstanceBuilder } from '../eb/util' @@ -99,11 +100,19 @@ export abstract class BaseVisitor implements Visitor { } visitNumericLiteral(node: ts.NumericLiteral): InstanceBuilder { + const sourceLocation = this.sourceLocation(node) codeInvariant( !node.text.includes('.'), 'Literals with decimal points are not supported. Use a string literal to capture decimal values', + sourceLocation, ) const literalValue = BigInt(node.text) + if (literalValue > Number.MAX_SAFE_INTEGER || literalValue < Number.MIN_SAFE_INTEGER) { + logger.error( + sourceLocation, + `This number will lose precision at runtime. Use the Uint64 constructor with a bigint or string literal for very large integers.`, + ) + } const ptype = this.context.getPTypeForNode(node) invariant(ptype instanceof TransientType, 'Literals should resolve to transient PTypes') return new BigIntLiteralExpressionBuilder(literalValue, ptype, this.sourceLocation(node)) @@ -192,8 +201,12 @@ export abstract class BaseVisitor implements Visitor { visitPropertyAccessExpression(node: ts.PropertyAccessExpression): NodeBuilder { this.logNotSupported(node.questionDotToken, 'The optional chaining (?.) operator is not supported') const target = this.baseAccept(node.expression) + if (target instanceof NamespaceBuilder) { + codeInvariant(!ts.isPrivateIdentifier(node.name), 'Private identifiers are not supported here', this.sourceLocation(node.name)) + return this.context.getBuilderForNode(node.name) + } const property = this.textVisitor.accept(node.name) - return target.memberAccess(property, this.sourceLocation(node)) + return target.memberAccess(property, this.sourceLocation(node.name)) } visitElementAccessExpression(node: ts.ElementAccessExpression): NodeBuilder { @@ -541,6 +554,7 @@ export abstract class BaseVisitor implements Visitor { return new ObjectPType({ name: targetType.name, module: targetType.module, + description: targetType.description, properties: Object.fromEntries( sourceType .orderedProperties() @@ -657,4 +671,39 @@ export abstract class BaseVisitor implements Visitor { isPublic, } } + + protected getNodeDescription(node: ts.Node): string | null { + const docs = ts.getJSDocCommentsAndTags(node) + for (const doc of docs) { + if (ts.isJSDoc(doc)) { + return ts.getTextOfJSDocComment(doc.comment) ?? null + } + } + return null + } + + protected getMethodDocumentation(node: ts.FunctionDeclaration | ts.MethodDeclaration | ts.ConstructorDeclaration): MethodDocumentation { + const docs = Array.from(ts.getJSDocCommentsAndTags(node)) + let description: string | null = null + const args = new Map() + let returns: string | null = null + for (const doc of docs) { + if (ts.isJSDoc(doc)) { + description = ts.getTextOfJSDocComment(doc.comment) ?? null + if (doc.tags) docs.push(...doc.tags) + } else if (ts.isJSDocParameterTag(doc)) { + const paramName = this.textVisitor.accept(doc.name) + const paramComment = ts.getTextOfJSDocComment(doc.comment) + + args.set(paramName, paramComment ?? '') + } else if (ts.isJSDocReturnTag(doc)) { + returns = ts.getTextOfJSDocComment(doc.comment) ?? null + } + } + return nodeFactory.methodDocumentation({ + description, + args, + returns, + }) + } } diff --git a/src/awst_build/ast-visitors/contract-method-visitor.ts b/src/awst_build/ast-visitors/contract-method-visitor.ts index 01840bbc..40f0a45d 100644 --- a/src/awst_build/ast-visitors/contract-method-visitor.ts +++ b/src/awst_build/ast-visitors/contract-method-visitor.ts @@ -167,7 +167,6 @@ export class ContractMethodVisitor extends ContractMethodBaseVisitor { return new ARC4ABIMethodConfig({ sourceLocation: methodLocation, allowedCompletionTypes: [OnCompletionAction.NoOp], - create: ARC4CreateOption.Disallow, name: functionType.name, readonly: false, diff --git a/src/awst_build/ast-visitors/contract-visitor.ts b/src/awst_build/ast-visitors/contract-visitor.ts index 8ef2911e..687a88a9 100644 --- a/src/awst_build/ast-visitors/contract-visitor.ts +++ b/src/awst_build/ast-visitors/contract-visitor.ts @@ -65,7 +65,7 @@ export class ContractVisitor extends BaseVisitor implements Visitor ContractReference.fromPType(bt)), - description: null, + description: this.getNodeDescription(classDec), approvalProgram: this._contractPType.isARC4 ? null : this._approvalProgram, clearProgram: this._clearStateProgram, reservedScratchSpace: new Set(), @@ -165,7 +165,12 @@ export class ContractVisitor extends BaseVisitor implements Visitor, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + args: [nameOrObj, ...props], + ptypes: [genericArg], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 1, + callLocation: sourceLocation, + funcName: this.typeDescription, + argSpec: (a) => [a.required(), ...args.slice(1).map(() => a.required())], + }) + + if (nameOrObj.ptype.equals(stringPType)) { + const name = requireStringConstant(nameOrObj).value + const thisModule = nameOrObj.sourceLocation.file ?? '' + + const fields: Record = {} + const values = new Map() + + for (const [index, prop] of Object.entries(props)) { + const arc4Type = ptypeToArc4EncodedType(prop.ptype, prop.sourceLocation) + fields[index] = arc4Type + values.set( + index, + prop.ptype instanceof ARC4EncodedType + ? prop.resolve() + : nodeFactory.aRC4Encode({ + value: prop.resolve(), + wtype: arc4Type.wtype, + sourceLocation: prop.sourceLocation, + }), + ) + } + + const structType = new ARC4StructType({ + name, + module: thisModule, + fields, + description: undefined, + sourceLocation, + }) + const structExpression = nodeFactory.newStruct({ + wtype: structType.wtype, + values, + sourceLocation, + }) + + return emitStruct(structType, structExpression, sourceLocation) + } + codeInvariant(props.length === 0, 'Unexpected args', props[0]?.sourceLocation) + + const eventBuilder = nameOrObj.resolveToPType(genericArg) + + const eventType = eventBuilder.ptype + if (eventType instanceof ARC4StructType) { + return emitStruct(eventType, nameOrObj.resolve(), sourceLocation) + } else if (eventType instanceof ObjectPType) { + if (eventType.isAnonymous) { + logger.error( + eventBuilder.sourceLocation, + 'Event cannot be an anonymous type. If a named type exists, try specifying it explicitly via the generic parameter. Eg. `emit({...})`', + ) + } + const arc4Equivalent = ptypeToArc4EncodedType(eventType, sourceLocation) + return emitStruct( + arc4Equivalent, + nodeFactory.aRC4Encode({ + wtype: arc4Equivalent.wtype, + sourceLocation: nameOrObj.sourceLocation, + value: nameOrObj.resolve(), + }), + sourceLocation, + ) + } + throw new InternalError('Unexpected type for arg 0 of emit', { sourceLocation }) + } +} + +function emitStruct(ptype: ARC4StructType, expression: Expression, sourceLocation: SourceLocation) { + return instanceEb( + nodeFactory.emit({ + signature: ptype.signature, + value: expression, + wtype: voidPType.wtype, + sourceLocation, + }), + voidPType, + ) +} diff --git a/src/awst_build/eb/arc4/arrays.ts b/src/awst_build/eb/arc4/arrays.ts index cd64c923..e075cba2 100644 --- a/src/awst_build/eb/arc4/arrays.ts +++ b/src/awst_build/eb/arc4/arrays.ts @@ -1,13 +1,13 @@ import { nodeFactory } from '../../../awst/node-factory' import type { Expression } from '../../../awst/nodes' -import { IntegerConstant, StringConstant } from '../../../awst/nodes' +import { BytesConstant, IntegerConstant, StringConstant } from '../../../awst/nodes' import type { SourceLocation } from '../../../awst/source-location' import { wtypes } from '../../../awst/wtypes' import { Constants } from '../../../constants' import { wrapInCodeError } from '../../../errors' import { logger } from '../../../logger' -import { base32ToUint8Array, codeInvariant, invariant } from '../../../util' +import { base32ToUint8Array, bigIntToUint8Array, codeInvariant, invariant } from '../../../util' import type { PType } from '../../ptypes' import { accountPType, bytesPType, IterableIteratorGeneric, NumericLiteralPType, stringPType, TuplePType, uint64PType } from '../../ptypes' import { @@ -16,8 +16,12 @@ import { ARC4EncodedType, DynamicArrayConstructor, DynamicArrayType, + DynamicBytesConstructor, + DynamicBytesType, StaticArrayConstructor, StaticArrayType, + StaticBytesConstructor, + StaticBytesGeneric, } from '../../ptypes/arc4-types' import { instanceEb } from '../../type-registry' import type { InstanceBuilder, NodeBuilder } from '../index' @@ -163,6 +167,106 @@ export class AddressClassBuilder extends ClassBuilder { ) } } +export class StaticBytesClassBuilder extends ClassBuilder { + readonly ptype = StaticBytesConstructor + + newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + const { + ptypes: [length], + args: [initialValue], + } = parseFunctionArgs({ + args, + typeArgs, + callLocation: sourceLocation, + funcName: `${this.ptype.name} constructor`, + genericTypeArgs: 1, + argSpec: (a) => [a.optional(bytesPType)], + }) + const resultPType = StaticBytesGeneric.parameterise([length]) + + codeInvariant(length instanceof NumericLiteralPType, 'length must be numeric literal', sourceLocation) + const byteLength = Number(length.literalValue) + if (!initialValue) { + return instanceEb( + nodeFactory.bytesConstant({ + value: new Uint8Array(byteLength), + sourceLocation, + wtype: resultPType.wtype, + }), + resultPType, + ) + } + const value = initialValue.resolve() + if (value instanceof BytesConstant) { + codeInvariant(value.value.length === byteLength, `Value should have byte length of ${byteLength}`, sourceLocation) + return instanceEb( + nodeFactory.bytesConstant({ + value: value.value, + wtype: resultPType.wtype, + sourceLocation, + }), + resultPType, + ) + } else { + return instanceEb( + nodeFactory.aRC4Encode({ + value: initialValue.resolve(), + sourceLocation, + wtype: resultPType.wtype, + }), + resultPType, + ) + } + } +} +export class DynamicBytesClassBuilder extends ClassBuilder { + readonly ptype = DynamicBytesConstructor + + newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + const { + args: [initialValue], + } = parseFunctionArgs({ + args, + typeArgs, + callLocation: sourceLocation, + funcName: `${this.ptype.name} constructor`, + genericTypeArgs: 0, + argSpec: (a) => [a.optional(bytesPType)], + }) + const resultPType = DynamicBytesType + + if (!initialValue) { + return instanceEb( + nodeFactory.bytesConstant({ + value: new Uint8Array([0, 0]), + sourceLocation, + wtype: resultPType.wtype, + }), + resultPType, + ) + } + const value = initialValue.resolve() + if (value instanceof BytesConstant) { + return instanceEb( + nodeFactory.bytesConstant({ + value: new Uint8Array([...bigIntToUint8Array(BigInt(value.value.length), 2), ...value.value]), + sourceLocation, + wtype: resultPType.wtype, + }), + resultPType, + ) + } else { + return instanceEb( + nodeFactory.aRC4Encode({ + value, + sourceLocation, + wtype: resultPType.wtype, + }), + resultPType, + ) + } + } +} export abstract class ArrayExpressionBuilder< TArrayType extends DynamicArrayType | StaticArrayType, @@ -288,6 +392,33 @@ export class StaticArrayExpressionBuilder extends ArrayExpressionBuilder { constructor(expr: Expression, ptype: PType) { invariant(ptype instanceof StaticArrayType, 'ptype must be instance of StaticArrayType') diff --git a/src/awst_build/eb/arc4/base.ts b/src/awst_build/eb/arc4/base.ts index e41c5b19..ca600ecd 100644 --- a/src/awst_build/eb/arc4/base.ts +++ b/src/awst_build/eb/arc4/base.ts @@ -3,14 +3,15 @@ import type { Expression } from '../../../awst/nodes' import { EqualityComparison } from '../../../awst/nodes' import type { SourceLocation } from '../../../awst/source-location' import { wtypes } from '../../../awst/wtypes' -import { CodeError } from '../../../errors' -import type { PType } from '../../ptypes' +import { tryConvertEnum } from '../../../util' +import { type PType } from '../../ptypes' import type { ARC4EncodedType } from '../../ptypes/arc4-types' import { instanceEb } from '../../type-registry' import { BooleanExpressionBuilder } from '../boolean-expression-builder' import { BytesExpressionBuilder } from '../bytes-expression-builder' import type { InstanceBuilder, NodeBuilder } from '../index' import { BuilderComparisonOp, FunctionBuilder, InstanceExpressionBuilder } from '../index' +import { requireBuilderOfType } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' export class Arc4EncodedBaseExpressionBuilder extends InstanceExpressionBuilder { @@ -19,10 +20,19 @@ export class Arc4EncodedBaseExpressionBuilder extends } compare(other: InstanceBuilder, op: BuilderComparisonOp, sourceLocation: SourceLocation): InstanceBuilder { - switch (op) { - case BuilderComparisonOp.eq: - case BuilderComparisonOp.ne: - throw new CodeError(`${op} operator is not supported on ${this.typeDescription}. Use 'equals' method instead`, { sourceLocation }) + const equalityOp = tryConvertEnum(op, BuilderComparisonOp, EqualityComparison) + + switch (equalityOp) { + case EqualityComparison.eq: + case EqualityComparison.ne: + return new BooleanExpressionBuilder( + nodeFactory.bytesComparisonExpression({ + operator: equalityOp, + lhs: this.toBytes(sourceLocation), + rhs: requireBuilderOfType(other, this.ptype).toBytes(sourceLocation), + sourceLocation, + }), + ) } return super.compare(other, op, sourceLocation) } diff --git a/src/awst_build/eb/arc4/bool.ts b/src/awst_build/eb/arc4/bool.ts index bc3993a4..e1d5f16b 100644 --- a/src/awst_build/eb/arc4/bool.ts +++ b/src/awst_build/eb/arc4/bool.ts @@ -1,16 +1,55 @@ +import { nodeFactory } from '../../../awst/node-factory' import type { Expression } from '../../../awst/nodes' +import { BoolConstant } from '../../../awst/nodes' import type { SourceLocation } from '../../../awst/source-location' +import { wtypes } from '../../../awst/wtypes' import type { PType } from '../../ptypes' +import { boolPType } from '../../ptypes' import { ARC4BoolClass, ARC4BooleanType, type ARC4EncodedType } from '../../ptypes/arc4-types' import type { InstanceBuilder, NodeBuilder } from '../index' import { ClassBuilder } from '../index' +import { parseFunctionArgs } from '../util/arg-parsing' import { Arc4EncodedBaseExpressionBuilder } from './base' export class BoolClassBuilder extends ClassBuilder { readonly ptype = ARC4BoolClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { - throw new Error('Method not implemented.') + const { + args: [initialValue], + } = parseFunctionArgs({ + args, + typeArgs, + callLocation: sourceLocation, + funcName: `${this.typeDescription} constructor}`, + genericTypeArgs: 0, + argSpec: (a) => [a.optional(boolPType)], + }) + let expr: Expression + if (!initialValue) { + expr = nodeFactory.boolConstant({ + value: false, + sourceLocation, + wtype: wtypes.arc4BooleanWType, + }) + } else { + const value = initialValue.resolve() + if (value instanceof BoolConstant) { + expr = nodeFactory.boolConstant({ + value: value.value, + sourceLocation, + wtype: wtypes.arc4BooleanWType, + }) + } else { + expr = nodeFactory.aRC4Encode({ + value: value, + wtype: wtypes.arc4BooleanWType, + sourceLocation, + }) + } + } + + return new BoolExpressionBuilder(expr) } } diff --git a/src/awst_build/eb/arc4/struct.ts b/src/awst_build/eb/arc4/struct.ts index c25ed9f2..a7f6c027 100644 --- a/src/awst_build/eb/arc4/struct.ts +++ b/src/awst_build/eb/arc4/struct.ts @@ -2,16 +2,17 @@ import { nodeFactory } from '../../../awst/node-factory' import type { Expression } from '../../../awst/nodes' import type { SourceLocation } from '../../../awst/source-location' import { invariant } from '../../../util' -import type { PType } from '../../ptypes' +import type { PType, PTypeOrClass } from '../../ptypes' +import { ObjectPType } from '../../ptypes' import { ARC4StructClass, ARC4StructType } from '../../ptypes/arc4-types' import { instanceEb } from '../../type-registry' -import type { InstanceBuilder } from '../index' -import { NodeBuilder } from '../index' +import type { NodeBuilder } from '../index' +import { ClassBuilder, InstanceBuilder } from '../index' import { requireExpressionOfType } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' import { Arc4EncodedBaseExpressionBuilder } from './base' -export class StructClassBuilder extends NodeBuilder { +export class StructClassBuilder extends ClassBuilder { readonly ptype: ARC4StructClass constructor(sourceLocation: SourceLocation, ptype: PType) { @@ -53,6 +54,10 @@ export class StructExpressionBuilder extends Arc4EncodedBaseExpressionBuilder [a.optional(stringPType), a.optional(numberPType), a.optional(numberPType)], + argSpec: (a) => [a.optional(stringPType)], callLocation: sourceLocation, }) codeInvariant( diff --git a/src/awst_build/eb/arc4/uintn.ts b/src/awst_build/eb/arc4/uintn.ts index 9aff589b..eb1b639b 100644 --- a/src/awst_build/eb/arc4/uintn.ts +++ b/src/awst_build/eb/arc4/uintn.ts @@ -3,10 +3,10 @@ import type { Expression } from '../../../awst/nodes' import { IntegerConstant } from '../../../awst/nodes' import type { SourceLocation } from '../../../awst/source-location' import { CodeError } from '../../../errors' -import { bigIntToUint8Array, codeInvariant, invariant } from '../../../util' -import type { PType } from '../../ptypes' +import { codeInvariant, invariant } from '../../../util' +import type { LibClassType, PType } from '../../ptypes' import { biguintPType, NumericLiteralPType, uint64PType } from '../../ptypes' -import { arc4ByteAlias, ByteClass, UintNClass, UintNType } from '../../ptypes/arc4-types' +import { UintNClass, UintNType } from '../../ptypes/arc4-types' import type { InstanceBuilder, NodeBuilder } from '../index' import { ClassBuilder } from '../index' import { isValidLiteralForPType } from '../util' @@ -38,23 +38,24 @@ export class UintNClassBuilder extends ClassBuilder { return newUintN(initialValueBuilder, ptype, sourceLocation) } } +export const classBuilderForUintNAlias = (aliasClass: LibClassType, aliasInstance: UintNType) => { + return class extends ClassBuilder { + readonly ptype = aliasClass -export class ByteClassBuilder extends ClassBuilder { - readonly ptype = ByteClass + newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + const { + args: [initialValueBuilder], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 1, + funcName: `${this.typeDescription} constructor`, + argSpec: (a) => [a.optional()], + callLocation: sourceLocation, + }) - newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { - const { - args: [initialValueBuilder], - } = parseFunctionArgs({ - args, - typeArgs, - genericTypeArgs: 0, - funcName: 'Byte constructor', - argSpec: (a) => [a.optional()], - callLocation: sourceLocation, - }) - - return newUintN(initialValueBuilder, arc4ByteAlias, sourceLocation) + return newUintN(initialValueBuilder, aliasInstance, sourceLocation) + } } } @@ -70,7 +71,7 @@ function newUintN(initialValueBuilder: InstanceBuilder | undefined, ptype: UintN ptype, ) } - if (initialValueBuilder.resolvableToPType(uint64PType)) { + if (ptype.n <= 64 && initialValueBuilder.resolvableToPType(uint64PType)) { const initialValue = initialValueBuilder.resolveToPType(uint64PType).resolve() if (initialValue instanceof IntegerConstant) { codeInvariant(isValidLiteralForPType(initialValue.value, ptype), `${initialValue.value} cannot be converted to ${ptype}`) @@ -100,10 +101,11 @@ function newUintN(initialValueBuilder: InstanceBuilder | undefined, ptype: UintN if (initialValue instanceof IntegerConstant) { codeInvariant(isValidLiteralForPType(initialValue.value, ptype), `${initialValue.value} cannot be converted to ${ptype}`) return new UintNExpressionBuilder( - nodeFactory.bytesConstant({ - value: bigIntToUint8Array(initialValue.value), + nodeFactory.integerConstant({ + value: initialValue.value, wtype: ptype.wtypeOrThrow, sourceLocation: sourceLocation, + tealAlias: null, }), ptype, ) diff --git a/src/awst_build/eb/arc4/util.ts b/src/awst_build/eb/arc4/util.ts new file mode 100644 index 00000000..8524e66c --- /dev/null +++ b/src/awst_build/eb/arc4/util.ts @@ -0,0 +1,189 @@ +import { nodeFactory } from '../../../awst/node-factory' +import type { BytesConstant, Expression } from '../../../awst/nodes' +import { EqualityComparison } from '../../../awst/nodes' +import type { SourceLocation } from '../../../awst/source-location' +import { wtypes } from '../../../awst/wtypes' +import { logger } from '../../../logger' +import { codeInvariant, hexToUint8Array } from '../../../util' +import { isArc4EncodableType, ptypeToArc4EncodedType } from '../../arc4-util' +import type { PType } from '../../ptypes' +import { bytesPType, stringPType } from '../../ptypes' +import { + ARC4EncodedType, + decodeArc4Function, + encodeArc4Function, + interpretAsArc4Function, + methodSelectorFunction, +} from '../../ptypes/arc4-types' +import { instanceEb } from '../../type-registry' +import type { InstanceBuilder, NodeBuilder } from '../index' +import { FunctionBuilder } from '../index' +import { requireStringConstant } from '../util' +import { parseFunctionArgs } from '../util/arg-parsing' + +export class InterpretAsArc4FunctionBuilder extends FunctionBuilder { + readonly ptype = interpretAsArc4Function + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + ptypes: [ptype], + args: [theBytes, prefixType], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 1, + funcName: this.typeDescription, + argSpec: (a) => [a.required(bytesPType), a.optional(stringPType)], + callLocation: sourceLocation, + }) + codeInvariant(ptype instanceof ARC4EncodedType, 'Generic type must be an ARC4 encoded type') + + const prefixBytes = getPrefixValue(prefixType) + + return instanceEb( + nodeFactory.reinterpretCast({ + expr: validatePrefix(theBytes, prefixBytes, sourceLocation), + wtype: ptype.wtype, + sourceLocation, + }), + ptype, + ) + } +} +export class EncodeArc4FunctionBuilder extends FunctionBuilder { + readonly ptype = encodeArc4Function + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + args: [valueToEncode], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 1, + funcName: this.typeDescription, + argSpec: (a) => [a.required()], + callLocation: sourceLocation, + }) + const encodedType = ptypeToArc4EncodedType(valueToEncode.ptype, sourceLocation) + + return instanceEb( + nodeFactory.reinterpretCast({ + expr: nodeFactory.aRC4Encode({ + value: valueToEncode.resolve(), + wtype: encodedType.wtype, + sourceLocation, + }), + sourceLocation, + wtype: bytesPType.wtype, + }), + bytesPType, + ) + } +} +export class DecodeArc4FunctionBuilder extends FunctionBuilder { + readonly ptype = decodeArc4Function + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + ptypes: [ptype], + args: [theBytes, prefixType], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 1, + funcName: this.typeDescription, + argSpec: (a) => [a.required(bytesPType), a.optional(stringPType)], + callLocation: sourceLocation, + }) + codeInvariant(isArc4EncodableType(ptype), `Cannot determine ARC4 encoding for ${ptype}`, sourceLocation) + + const arc4Encoded = ptypeToArc4EncodedType(ptype, sourceLocation) + + const prefixBytes = getPrefixValue(prefixType) + + return instanceEb( + nodeFactory.aRC4Decode({ + value: nodeFactory.reinterpretCast({ + expr: validatePrefix(theBytes, prefixBytes, sourceLocation), + sourceLocation, + wtype: arc4Encoded.wtype, + }), + wtype: ptype.wtypeOrThrow, + sourceLocation, + }), + ptype, + ) + } +} +function validatePrefix(base: InstanceBuilder, expectedPrefix: BytesConstant | undefined, sourceLocation: SourceLocation): Expression { + if (expectedPrefix === undefined) return base.resolve() + + const baseSingle = base.singleEvaluation().resolve() + + const baseNoPrefix = nodeFactory.intrinsicCall({ + opCode: 'extract', + immediates: [4n, 0n], + wtype: bytesPType.wtype, + stackArgs: [baseSingle], + sourceLocation, + }) + const observedPrefix = nodeFactory.intrinsicCall({ + opCode: 'extract', + immediates: [0n, 4n], + wtype: bytesPType.wtype, + stackArgs: [baseSingle], + sourceLocation, + }) + const prefixIsValid = nodeFactory.bytesComparisonExpression({ + operator: EqualityComparison.eq, + lhs: observedPrefix, + rhs: expectedPrefix, + sourceLocation, + }) + + return nodeFactory.checkedMaybe({ + expr: nodeFactory.tupleExpression({ items: [baseNoPrefix, prefixIsValid], sourceLocation }), + comment: 'Bytes has valid prefix', + }) +} + +function getPrefixValue(arg: InstanceBuilder | undefined): BytesConstant | undefined { + if (arg === undefined) return undefined + const value = requireStringConstant(arg).value + switch (value) { + case 'log': + return nodeFactory.bytesConstant({ value: hexToUint8Array('151F7C75'), sourceLocation: arg.sourceLocation }) + case 'none': + return undefined + default: + logger.error(arg.sourceLocation, `Expected literal string: 'none' | 'log'`) + } +} + +export class MethodSelectorFunctionBuilder extends FunctionBuilder { + readonly ptype = methodSelectorFunction + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + args: [methodSignature], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 0, + callLocation: sourceLocation, + funcName: this.typeDescription, + argSpec: (a) => [a.required(stringPType)], + }) + + const signature = requireStringConstant(methodSignature).value + + return instanceEb( + nodeFactory.methodConstant({ + value: signature, + wtype: wtypes.bytesWType, + sourceLocation, + }), + bytesPType, + ) + } +} diff --git a/src/awst_build/eb/assert-match-function-builder.ts b/src/awst_build/eb/assert-match-function-builder.ts index e5571053..27cfd030 100644 --- a/src/awst_build/eb/assert-match-function-builder.ts +++ b/src/awst_build/eb/assert-match-function-builder.ts @@ -6,11 +6,10 @@ import type { SourceLocation } from '../../awst/source-location' import { CodeError } from '../../errors' import { codeInvariant } from '../../util' import type { PType } from '../ptypes' -import { assertMatchFunction, stringPType, TuplePType, uint64PType } from '../ptypes' +import { assertMatchFunction, ObjectPType, stringPType, TuplePType, uint64PType } from '../ptypes' import { instanceEb } from '../type-registry' import type { InstanceBuilder } from './index' import { BuilderComparisonOp, NodeBuilder } from './index' -import { ObjectLiteralExpressionBuilder } from './literal/object-literal-expression-builder' import { requireBuilderOfType, requireInstanceBuilder, requireStringConstant } from './util' import { parseFunctionArgs } from './util/arg-parsing' import { VoidExpressionBuilder } from './void-expression-builder' @@ -31,7 +30,7 @@ export class AssertMatchFunctionBuilder extends NodeBuilder { }) codeInvariant(subject, 'subject parameter is missing', sourceLocation) - codeInvariant(tests instanceof ObjectLiteralExpressionBuilder, 'Test conditions must be an object literal', tests.sourceLocation) + codeInvariant(tests.ptype instanceof ObjectPType, 'Test conditions must be an object type', tests.sourceLocation) const condition = tests.ptype .orderedProperties() @@ -39,7 +38,7 @@ export class AssertMatchFunctionBuilder extends NodeBuilder { const subjectProperty = requireInstanceBuilder(subject.memberAccess(propName, sourceLocation)) const subjectType = subjectProperty.ptype const testProperty = requireInstanceBuilder(tests.memberAccess(propName, sourceLocation)) - if (subjectType.equals(propType)) { + if (testProperty.resolvableToPType(subjectType)) { return combineConditions( acc, subjectProperty.compare(testProperty, BuilderComparisonOp.eq, sourceLocation).resolve(), @@ -98,7 +97,9 @@ function getComparisonOpAndOperand(testProperty: InstanceBuilder, targetType: PT return [op, requireBuilderOfType(testProperty.memberAccess(prop, testProperty.sourceLocation), targetType)] } } - throw new CodeError('Unsupported assertMatch expression', { sourceLocation: testProperty.sourceLocation }) + throw new CodeError(`Cannot compare values of type ${testProperty.ptype} and ${targetType.name}`, { + sourceLocation: testProperty.sourceLocation, + }) } function combineConditions(left: Expression | undefined, right: Expression, sourceLocation: SourceLocation): Expression { diff --git a/src/awst_build/eb/bytes-expression-builder.ts b/src/awst_build/eb/bytes-expression-builder.ts index 5fd4d885..dc9ac194 100644 --- a/src/awst_build/eb/bytes-expression-builder.ts +++ b/src/awst_build/eb/bytes-expression-builder.ts @@ -3,7 +3,15 @@ import type { awst } from '../../awst' import { intrinsicFactory } from '../../awst/intrinsic-factory' import { nodeFactory } from '../../awst/node-factory' import type { Expression } from '../../awst/nodes' -import { BytesBinaryOperator, BytesConstant, BytesEncoding, BytesUnaryOperator, IntegerConstant, StringConstant } from '../../awst/nodes' +import { + BytesBinaryOperator, + BytesConstant, + BytesEncoding, + BytesUnaryOperator, + EqualityComparison, + IntegerConstant, + StringConstant, +} from '../../awst/nodes' import type { SourceLocation } from '../../awst/source-location' import { wtypes } from '../../awst/wtypes' @@ -22,6 +30,7 @@ import { stringPType, uint64PType, } from '../ptypes' +import { BooleanExpressionBuilder } from './boolean-expression-builder' import type { BuilderComparisonOp, InstanceBuilder, NodeBuilder } from './index' import { BuilderUnaryOp, FunctionBuilder, InstanceExpressionBuilder, ParameterlessFunctionBuilder } from './index' import { ArrayLiteralExpressionBuilder } from './literal/array-literal-expression-builder' @@ -211,6 +220,8 @@ export class BytesExpressionBuilder extends InstanceExpressionBuilder, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + args: [right], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 0, + callLocation: sourceLocation, + funcName: 'equals', + argSpec: (a) => [a.required(bytesPType)], + }) + return new BooleanExpressionBuilder( + nodeFactory.bytesComparisonExpression({ + operator: EqualityComparison.eq, + lhs: this.expr, + rhs: right.resolve(), + sourceLocation, + }), + ) + } +} diff --git a/src/awst_build/eb/compiled/compile-function.ts b/src/awst_build/eb/compiled/compile-function.ts new file mode 100644 index 00000000..95934d8c --- /dev/null +++ b/src/awst_build/eb/compiled/compile-function.ts @@ -0,0 +1,114 @@ +import { ContractReference, LogicSigReference } from '../../../awst/models' +import { nodeFactory } from '../../../awst/node-factory' +import type { Expression } from '../../../awst/nodes' +import type { SourceLocation } from '../../../awst/source-location' +import { TxnField } from '../../../awst/txn-fields' +import { codeInvariant, invariant } from '../../../util' +import type { PType } from '../../ptypes' +import { + compiledContractType, + compiledLogicSigType, + compileFunctionType, + ContractClassPType, + LogicSigPType, + ObjectPType, + uint64PType, +} from '../../ptypes' +import { instanceEb } from '../../type-registry' +import type { InstanceBuilder, NodeBuilder } from '../index' +import { FunctionBuilder } from '../index' +import { requireBuilderOfType, requireInstanceBuilder, requireStringConstant } from '../util' +import { parseFunctionArgs } from '../util/arg-parsing' + +export class CompileFunctionBuilder extends FunctionBuilder { + readonly ptype = compileFunctionType + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + args: [contractOrSig, options], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 0, + callLocation: sourceLocation, + funcName: this.typeDescription, + argSpec: (a) => [a.required(ContractClassPType, LogicSigPType), a.optional()], + }) + + const templateVarOptions = parseTemplateVars(options) + + if (contractOrSig.ptype instanceof ContractClassPType) { + return instanceEb( + nodeFactory.compiledContract({ + contract: ContractReference.fromPType(contractOrSig.ptype), + allocationOverrides: parseAllocationOverrides(options), + ...templateVarOptions, + wtype: compiledContractType.wtype, + sourceLocation, + }), + compiledContractType, + ) + } else { + invariant(contractOrSig.ptype instanceof LogicSigPType, 'ptype must be LogicSigPType') + return instanceEb( + nodeFactory.compiledLogicSig({ + logicSig: LogicSigReference.fromPType(contractOrSig.ptype), + ...templateVarOptions, + wtype: compiledLogicSigType.wtype, + sourceLocation, + }), + compiledLogicSigType, + ) + } + } +} +const optionsNames = { + prefix: 'templateVarsPrefix', + templateVars: 'templateVars', +} + +function parseTemplateVars(options: InstanceBuilder | undefined): { prefix: string | null; templateVariables: Map } { + const prefix = options?.hasProperty(optionsNames.prefix) + ? requireStringConstant(options.memberAccess(optionsNames.prefix, options.sourceLocation)).value + : null + + const templateVariables = new Map() + + if (options?.hasProperty(optionsNames.templateVars)) { + const templateVars = requireInstanceBuilder(options.memberAccess(optionsNames.templateVars, options.sourceLocation)) + codeInvariant( + templateVars.ptype instanceof ObjectPType, + `${optionsNames.templateVars} must be an object type`, + templateVars.sourceLocation, + ) + + for (const [varName] of templateVars.ptype.orderedProperties()) { + templateVariables.set(varName, requireInstanceBuilder(templateVars.memberAccess(varName, templateVars.sourceLocation)).resolve()) + } + } + + return { + prefix, + templateVariables, + } +} + +const allocationOverrides = { + extraProgramPages: [TxnField.ExtraProgramPages, uint64PType], + globalUints: [TxnField.ExtraProgramPages, uint64PType], + globalBytes: [TxnField.ExtraProgramPages, uint64PType], + localUints: [TxnField.ExtraProgramPages, uint64PType], + localBytes: [TxnField.ExtraProgramPages, uint64PType], +} as const + +function parseAllocationOverrides(options: InstanceBuilder | undefined): Map { + const overrides = new Map() + if (options) { + for (const [property, [field, fieldType]] of Object.entries(allocationOverrides)) { + if (options.hasProperty(property)) { + overrides.set(field, requireBuilderOfType(options.memberAccess(property, options.sourceLocation), fieldType).resolve()) + } + } + } + return overrides +} diff --git a/src/awst_build/eb/contract-builder.ts b/src/awst_build/eb/contract-builder.ts index 0ec6538e..9bd825bc 100644 --- a/src/awst_build/eb/contract-builder.ts +++ b/src/awst_build/eb/contract-builder.ts @@ -5,10 +5,10 @@ import type { SourceLocation } from '../../awst/source-location' import { wtypes } from '../../awst/wtypes' import { Constants } from '../../constants' import { CodeError } from '../../errors' -import { codeInvariant } from '../../util' +import { codeInvariant, invariant } from '../../util' import type { AwstBuildContext } from '../context/awst-build-context' -import type { ContractClassPType, PType } from '../ptypes' -import { arc4BaseContractType, baseContractType, StorageProxyPType } from '../ptypes' +import type { PType } from '../ptypes' +import { arc4BaseContractType, baseContractType, ContractClassPType, StorageProxyPType } from '../ptypes' import { instanceEb } from '../type-registry' @@ -87,3 +87,26 @@ export class ContractSuperBuilder extends ContractThisBuilder { return super.memberAccess(name, sourceLocation) } } + +export class ContractClassBuilder extends InstanceBuilder { + resolve(): Expression { + throw new CodeError('Contract class cannot be used as a value') + } + resolveLValue(): LValue { + throw new CodeError('Contract class cannot be used as a value') + } + readonly ptype: ContractClassPType + constructor(sourceLocation: SourceLocation, ptype: PType) { + super(sourceLocation) + invariant(ptype instanceof ContractClassPType, 'ptype must be ContractClassPType') + this.ptype = ptype + } + + newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + throw new CodeError('Contract class cannot be constructed manually') + } + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + throw new CodeError('Contract class cannot be called manually') + } +} diff --git a/src/awst_build/eb/index.ts b/src/awst_build/eb/index.ts index f92404a6..fd21e86e 100644 --- a/src/awst_build/eb/index.ts +++ b/src/awst_build/eb/index.ts @@ -75,7 +75,7 @@ export abstract class NodeBuilder { } hasProperty(_name: string): boolean { - throw new NotSupported(`Has property checks on ${this.typeDescription}`) + return false } memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder { diff --git a/src/awst_build/eb/literal/big-int-literal-expression-builder.ts b/src/awst_build/eb/literal/big-int-literal-expression-builder.ts index cd2f4417..c6d35362 100644 --- a/src/awst_build/eb/literal/big-int-literal-expression-builder.ts +++ b/src/awst_build/eb/literal/big-int-literal-expression-builder.ts @@ -35,11 +35,10 @@ export class BigIntLiteralExpressionBuilder extends LiteralExpressionBuilder { } resolvableToPType(ptype: PTypeOrClass): boolean { - if (!isValidLiteralForPType(this.value, ptype)) return false if (this.ptype instanceof NumericLiteralPType || this.ptype.equals(numberPType)) { - return ptype.equals(uint64PType) || ptype.equals(numberPType) || ptype.equals(this.ptype) + return ptype.equals(biguintPType) || ptype.equals(uint64PType) || ptype.equals(numberPType) || ptype.equals(this.ptype) } else if (this.ptype instanceof BigIntLiteralPType || this.ptype.equals(bigIntPType)) { - return ptype.equals(biguintPType) || ptype.equals(bigIntPType) || ptype.equals(this.ptype) + return ptype.equals(biguintPType) || ptype.equals(uint64PType) || ptype.equals(bigIntPType) || ptype.equals(this.ptype) } return false } diff --git a/src/awst_build/eb/literal/object-literal-expression-builder.ts b/src/awst_build/eb/literal/object-literal-expression-builder.ts index dbcf1723..e2204a90 100644 --- a/src/awst_build/eb/literal/object-literal-expression-builder.ts +++ b/src/awst_build/eb/literal/object-literal-expression-builder.ts @@ -74,7 +74,7 @@ export class ObjectLiteralExpressionBuilder extends LiteralExpressionBuilder { // Resolve this object to a tuple using declared order but using the target property types. // This will resolve numeric literals to algo-ts types if available const tempType = new ObjectPType({ - name: undefined, + isAnonymous: true, properties: Object.fromEntries(this.ptype.orderedProperties().map(([p]) => [p, ptype.getPropertyType(p)] as const)), }) diff --git a/src/awst_build/eb/logic-sig-builder.ts b/src/awst_build/eb/logic-sig-builder.ts new file mode 100644 index 00000000..7d6a33e7 --- /dev/null +++ b/src/awst_build/eb/logic-sig-builder.ts @@ -0,0 +1,29 @@ +import type { Expression, LValue } from '../../awst/nodes' +import type { SourceLocation } from '../../awst/source-location' +import { CodeError } from '../../errors' +import { invariant } from '../../util' +import { LogicSigPType, type PType } from '../ptypes' +import { InstanceBuilder, type NodeBuilder } from './index' + +export class LogicSigClassBuilder extends InstanceBuilder { + resolve(): Expression { + throw new CodeError('LogicSig class cannot be used as a value') + } + resolveLValue(): LValue { + throw new CodeError('LogicSig class cannot be used as a value') + } + readonly ptype: LogicSigPType + constructor(sourceLocation: SourceLocation, ptype: PType) { + super(sourceLocation) + invariant(ptype instanceof LogicSigPType, 'ptype must be LogicSigPType') + this.ptype = ptype + } + + newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + throw new CodeError('LogicSig class cannot be constructed manually') + } + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + throw new CodeError('LogicSig class cannot be called manually') + } +} diff --git a/src/awst_build/eb/namespace-builder.ts b/src/awst_build/eb/namespace-builder.ts index 4e7c6916..673e7e28 100644 --- a/src/awst_build/eb/namespace-builder.ts +++ b/src/awst_build/eb/namespace-builder.ts @@ -1,9 +1,7 @@ import type { SourceLocation } from '../../awst/source-location' -import { codeInvariant, invariant } from '../../util' +import { invariant } from '../../util' import type { PType } from '../ptypes' import { NamespacePType } from '../ptypes' -import { SymbolName } from '../symbol-name' -import { typeRegistry } from '../type-registry' import { NodeBuilder } from './index' export class NamespaceBuilder extends NodeBuilder { @@ -17,13 +15,4 @@ export class NamespaceBuilder extends NodeBuilder { get ptype(): PType { return this._ptype } - - memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder { - const symbolName = new SymbolName({ module: this._ptype.module, name }) - - const type = typeRegistry.tryResolveSingletonName(symbolName) - codeInvariant(type, `${name} does not exist in namespace ${this._ptype}`) - - return typeRegistry.getSingletonEb(type, sourceLocation) - } } diff --git a/src/awst_build/eb/storage/box/base.ts b/src/awst_build/eb/storage/box/base.ts index f6191232..ac1445fe 100644 --- a/src/awst_build/eb/storage/box/base.ts +++ b/src/awst_build/eb/storage/box/base.ts @@ -11,7 +11,12 @@ import { ValueProxy } from '../value-proxy' export abstract class BoxProxyExpressionBuilder< TProxyType extends BoxMapPType | BoxRefPType | BoxPType, > extends InstanceExpressionBuilder { - buildStorageDeclaration(memberName: string, memberLocation: SourceLocation, contractType: ContractClassPType): AppStorageDeclaration { + buildStorageDeclaration( + memberName: string, + memberLocation: SourceLocation, + memberDescription: string | null, + contractType: ContractClassPType, + ): AppStorageDeclaration { codeInvariant( this._expr instanceof BytesConstant, `key${this.ptype instanceof BoxMapPType ? ' prefix' : ''} must be a compile time constant value if ${this.typeDescription} is assigned to a contract member`, @@ -21,7 +26,7 @@ export abstract class BoxProxyExpressionBuilder< ptype: this.ptype, memberName: memberName, keyOverride: this._expr ?? null, - description: null, + description: memberDescription, definedIn: contractType, }) } diff --git a/src/awst_build/eb/storage/global-state.ts b/src/awst_build/eb/storage/global-state.ts index 973049aa..acc26eb8 100644 --- a/src/awst_build/eb/storage/global-state.ts +++ b/src/awst_build/eb/storage/global-state.ts @@ -108,7 +108,12 @@ export class GlobalStateFunctionResultBuilder extends InstanceBuilder() // Set default fee to 0 (transaction will be paid for from transaction group budget, rather than from the application balance) mappedFields.set(TxnField.Fee, nodeFactory.uInt64Constant({ value: 0n, sourceLocation })) - + if (this.ptype.kind) mappedFields.set(TxnField.TypeEnum, nodeFactory.uInt64Constant({ value: BigInt(this.ptype.kind), sourceLocation })) mapTransactionFields(mappedFields, initialFields, this.ptype.kind, sourceLocation) const fieldsType = getItxnParamsType(this.ptype.kind) @@ -84,24 +84,30 @@ function mapTransactionFields( }), ) } else if (txnFieldData.numValues > 1) { - codeInvariant( - propValue instanceof ArrayLiteralExpressionBuilder || propValue instanceof TupleExpressionBuilder, - `Unsupported expression for ${prop}`, - propValue.sourceLocation, - ) - - mappedFields.set( - txnField, - nodeFactory.tupleExpression({ - items: propValue.getItemBuilders().map((i) => requireExpressionOfType(i, fieldType)), - sourceLocation: propValue.sourceLocation, - }), - ) + if (propValue instanceof ArrayLiteralExpressionBuilder || propValue instanceof TupleExpressionBuilder) { + mappedFields.set( + txnField, + nodeFactory.tupleExpression({ + items: propValue.getItemBuilders().map((i) => requireExpressionOfType(i, fieldType)), + sourceLocation: propValue.sourceLocation, + }), + ) + } else if (txnFieldData.arrayPromote) { + mappedFields.set( + txnField, + nodeFactory.tupleExpression({ + items: [requireExpressionOfType(propValue, fieldType)], + sourceLocation: propValue.sourceLocation, + }), + ) + } else { + logger.error(propValue.sourceLocation, `Unsupported expression for ${prop}`) + } } else { mappedFields.set(txnField, requireExpressionOfType(propValue, fieldType)) } } else { - logger.error(sourceLocation, `${prop} not in valid fields `) + logger.warn(sourceLocation, `Ignoring additional property: ${prop}`) } } } diff --git a/src/awst_build/eb/transactions/txn-fields.ts b/src/awst_build/eb/transactions/txn-fields.ts index ce9e065c..c3852c2b 100644 --- a/src/awst_build/eb/transactions/txn-fields.ts +++ b/src/awst_build/eb/transactions/txn-fields.ts @@ -275,12 +275,12 @@ export const applicationCallTxnFields = { /** * Approval program */ - approvalProgram: [TxnField.ApprovalProgram, bytesPType] as const, + approvalProgram: [TxnField.ApprovalProgramPages, bytesPType] as const, /** * Clear State program */ - clearStateProgram: [TxnField.ClearStateProgram, bytesPType] as const, + clearStateProgram: [TxnField.ClearStateProgramPages, bytesPType] as const, /** * Number of Assets @@ -354,14 +354,9 @@ export const applicationCallTxnFields = { apps: [TxnField.Applications, applicationPType] as const, /** - * Approval Program as an array of pages + * The id of the created application */ - approvalProgramPages: [TxnField.ApprovalProgramPages, bytesPType] as const, - - /** - * Clear State Program as an array of pages - */ - clearStateProgramPages: [TxnField.ClearStateProgramPages, bytesPType] as const, + createdApp: [TxnField.CreatedApplicationID, applicationPType] as const, } satisfies Record export const anyTxnFields = { diff --git a/src/awst_build/eb/tuple-expression-builder.ts b/src/awst_build/eb/tuple-expression-builder.ts index 25a5cd00..d21c9345 100644 --- a/src/awst_build/eb/tuple-expression-builder.ts +++ b/src/awst_build/eb/tuple-expression-builder.ts @@ -3,7 +3,7 @@ import type { Expression } from '../../awst/nodes' import type { SourceLocation } from '../../awst/source-location' import { codeInvariant, invariant } from '../../util' import type { PType } from '../ptypes' -import { TuplePType } from '../ptypes' +import { TuplePType, uint64PType } from '../ptypes' import { instanceEb } from '../type-registry' import type { InstanceBuilder, NodeBuilder } from './index' import { InstanceExpressionBuilder } from './index' @@ -19,6 +19,20 @@ export class TupleExpressionBuilder extends InstanceExpressionBuilder [a.optional(uint64PType, boolPType)], + argSpec: (a) => [a.optional(uint64PType, boolPType, stringPType)], }) if (!value) { @@ -57,6 +58,14 @@ export class UInt64FunctionBuilder extends FunctionBuilder { }), ) } + } else if (value.ptype.equals(stringPType)) { + const valueStr = requireStringConstant(value) + return new UInt64ExpressionBuilder( + nodeFactory.uInt64Constant({ + value: stringToBigint(valueStr), + sourceLocation, + }), + ) } return value } diff --git a/src/awst_build/eb/util/index.ts b/src/awst_build/eb/util/index.ts index cf0400bd..e257d53a 100644 --- a/src/awst_build/eb/util/index.ts +++ b/src/awst_build/eb/util/index.ts @@ -75,17 +75,17 @@ export function requireExpressionsOfType( throw new CodeError(`Expected ${ptypes.length} args with types ${ptypes.join(', ')}`, { sourceLocation }) } -export function requireStringConstant(builder: InstanceBuilder): awst.StringConstant { +export function requireStringConstant(builder: NodeBuilder): awst.StringConstant { const constant = requireConstantOfType(builder, stringPType) codeInvariant(constant instanceof StringConstant, 'Expected string literal', builder.sourceLocation) return constant } -export function requireIntegerConstant(builder: InstanceBuilder): awst.IntegerConstant { +export function requireIntegerConstant(builder: NodeBuilder): awst.IntegerConstant { const constant = requestConstantOfType(builder, uint64PType) ?? requestConstantOfType(builder, biguintPType) codeInvariant(constant instanceof IntegerConstant, 'Expected integer literal') return constant } -export function requireBooleanConstant(builder: InstanceBuilder): awst.BoolConstant { +export function requireBooleanConstant(builder: NodeBuilder): awst.BoolConstant { const constant = requireConstantOfType(builder, boolPType) codeInvariant(constant instanceof BoolConstant, 'Expected boolean literal') return constant diff --git a/src/awst_build/eb/util/string-to-bigint.ts b/src/awst_build/eb/util/string-to-bigint.ts new file mode 100644 index 00000000..2168467a --- /dev/null +++ b/src/awst_build/eb/util/string-to-bigint.ts @@ -0,0 +1,13 @@ +import type { SourceLocation } from '../../../awst/source-location' +import { CodeError } from '../../../errors' + +export function stringToBigint({ value, sourceLocation }: { value: string; sourceLocation: SourceLocation }): bigint { + try { + return BigInt(value) + } catch (e) { + if (e instanceof SyntaxError) { + throw new CodeError(`Cannot convert ${value} to an integer`, { sourceLocation }) + } + throw e + } +} diff --git a/src/awst_build/lib/index.ts b/src/awst_build/lib/index.ts index bade467e..471e8442 100644 --- a/src/awst_build/lib/index.ts +++ b/src/awst_build/lib/index.ts @@ -17,23 +17,11 @@ export function buildLibAwst(context: AwstBuildContext) { propertyInitialization: [], ctor: nodeFactory.contractMethod({ memberName: Constants.constructorMethodName, - cref: contractCref, + cref: baseContractCref, args: [], sourceLocation: SourceLocation.None, documentation: nodeFactory.methodDocumentation(), - body: nodeFactory.block( - { sourceLocation: SourceLocation.None }, - nodeFactory.expressionStatement({ - expr: nodeFactory.subroutineCallExpression({ - args: [], - wtype: wtypes.voidWType, - target: nodeFactory.instanceMethodTarget({ - memberName: Constants.constructorMethodName, - }), - sourceLocation: SourceLocation.None, - }), - }), - ), + body: nodeFactory.block({ sourceLocation: SourceLocation.None }), returnType: wtypes.voidWType, arc4MethodConfig: null, }), @@ -75,7 +63,19 @@ export function buildLibAwst(context: AwstBuildContext) { args: [], sourceLocation: SourceLocation.None, documentation: nodeFactory.methodDocumentation(), - body: nodeFactory.block({ sourceLocation: SourceLocation.None }), + body: nodeFactory.block( + { sourceLocation: SourceLocation.None }, + nodeFactory.expressionStatement({ + expr: nodeFactory.subroutineCallExpression({ + args: [], + wtype: wtypes.voidWType, + target: nodeFactory.instanceMethodTarget({ + memberName: Constants.constructorMethodName, + }), + sourceLocation: SourceLocation.None, + }), + }), + ), returnType: wtypes.voidWType, arc4MethodConfig: null, }), diff --git a/src/awst_build/models/app-storage-declaration.ts b/src/awst_build/models/app-storage-declaration.ts index 11500776..732eaf21 100644 --- a/src/awst_build/models/app-storage-declaration.ts +++ b/src/awst_build/models/app-storage-declaration.ts @@ -4,8 +4,8 @@ import { AppStorageKind, BytesEncoding } from '../../awst/nodes' import type { SourceLocation } from '../../awst/source-location' import { CodeError } from '../../errors' import { invariant, utf8ToUint8Array } from '../../util' -import type { ContractClassPType, StorageProxyPType } from './../ptypes' -import { BoxMapPType, BoxPType, BoxRefPType, GlobalStateType, LocalStateType } from './../ptypes' +import type { ContractClassPType, StorageProxyPType } from '../ptypes' +import { BoxMapPType, BoxPType, BoxRefPType, GlobalStateType, LocalStateType } from '../ptypes' export class AppStorageDeclaration { readonly memberName: string diff --git a/src/awst_build/ptypes/arc4-types.ts b/src/awst_build/ptypes/arc4-types.ts index e6c20e84..c7b03d07 100644 --- a/src/awst_build/ptypes/arc4-types.ts +++ b/src/awst_build/ptypes/arc4-types.ts @@ -3,7 +3,18 @@ import { wtypes } from '../../awst/wtypes' import { Constants } from '../../constants' import { codeInvariant, zipStrict } from '../../util' import { GenericPType, PType } from './base' -import { biguintPType, boolPType, LibClassType, NumericLiteralPType, ObjectPType, stringPType, TuplePType, uint64PType } from './index' +import { + biguintPType, + boolPType, + bytesPType, + LibClassType, + LibFunctionType, + NumericLiteralPType, + ObjectPType, + stringPType, + TuplePType, + uint64PType, +} from './index' import ARC4StaticArray = wtypes.ARC4StaticArray export const UintNClass = new LibClassType({ @@ -15,6 +26,30 @@ export const ByteClass = new LibClassType({ name: 'Byte', module: Constants.arc4EncodedTypesModuleName, }) +export const UintN8Class = new LibClassType({ + name: 'UintN8', + module: Constants.arc4EncodedTypesModuleName, +}) +export const UintN16Class = new LibClassType({ + name: 'UintN16', + module: Constants.arc4EncodedTypesModuleName, +}) +export const UintN32Class = new LibClassType({ + name: 'UintN32', + module: Constants.arc4EncodedTypesModuleName, +}) +export const UintN64Class = new LibClassType({ + name: 'UintN64', + module: Constants.arc4EncodedTypesModuleName, +}) +export const UintN128Class = new LibClassType({ + name: 'UintN128', + module: Constants.arc4EncodedTypesModuleName, +}) +export const UintN256Class = new LibClassType({ + name: 'UintN256', + module: Constants.arc4EncodedTypesModuleName, +}) export abstract class ARC4EncodedType extends PType { abstract readonly wtype: wtypes.ARC4Type abstract readonly nativeType: PType | undefined @@ -92,6 +127,7 @@ export class ARC4StructClass extends PType { export class ARC4StructType extends ARC4EncodedType { readonly name: string readonly module: string + readonly description: string | undefined readonly singleton = false readonly fields: Record readonly sourceLocation: SourceLocation | undefined @@ -99,10 +135,12 @@ export class ARC4StructType extends ARC4EncodedType { name, module, fields, + description, sourceLocation, }: { name: string module: string + description: string | undefined fields: Record sourceLocation?: SourceLocation }) { @@ -110,6 +148,7 @@ export class ARC4StructType extends ARC4EncodedType { this.name = name this.module = module this.fields = fields + this.description = description this.sourceLocation = sourceLocation } @@ -122,10 +161,15 @@ export class ARC4StructType extends ARC4EncodedType { name: this.name, fields: Object.fromEntries(Object.entries(this.fields).map(([f, t]) => [f, t.wtype])), sourceLocation: this.sourceLocation, + desc: this.description ?? null, frozen: false, }) } + get signature(): string { + return `${this.name}${this.wtype.arc4Name}` + } + equals(other: PType): boolean { if (!(other instanceof ARC4StructType)) return false const thisProps = Object.entries(this.fields) @@ -140,20 +184,11 @@ export class ARC4StructType extends ARC4EncodedType { } } -// export const arc4StructBaseClass = new ARC4StructClass({ -// name: 'Struct', -// module: Constants.arc4EncodedTypesModuleName, -// instanceType: new ARC4StructType({ -// name: 'Struct', -// module: Constants.arc4EncodedTypesModuleName, -// fields: {}, -// }), -// }) - export const arc4StructBaseType = new ARC4StructType({ name: 'StructBase', module: Constants.arc4EncodedTypesModuleName, fields: {}, + description: undefined, }) export const Arc4TupleClass = new LibClassType({ @@ -237,7 +272,7 @@ export class UintNType extends ARC4EncodedType { super() codeInvariant(n >= 8n && n <= 512n && n % 8n === 0n, 'n must be between 8 and 512, and a multiple of 8') this.n = n - this.name = name ?? `UIntN<${n}>` + this.name = name ?? `UintN<${n}>` this.wtype = wtype ?? new wtypes.ARC4UIntN({ n: this.n }) } } @@ -315,23 +350,35 @@ export class DynamicArrayType extends ARC4EncodedType { readonly name: string readonly singleton = false readonly sourceLocation: SourceLocation | undefined - readonly nativeType = undefined + readonly nativeType: PType | undefined = undefined + readonly wtype: wtypes.ARC4DynamicArray - get wtype(): wtypes.ARC4DynamicArray { - return new wtypes.ARC4DynamicArray({ + constructor({ + elementType, + nativeType, + sourceLocation, + name, + immutable, + }: { + elementType: ARC4EncodedType + sourceLocation?: SourceLocation + name?: string + immutable?: boolean + nativeType?: PType + }) { + super() + this.immutable = immutable ?? false + this.elementType = elementType + this.nativeType = nativeType + this.name = name ?? `DynamicArray<${elementType}>` + this.sourceLocation = sourceLocation + this.wtype = new wtypes.ARC4DynamicArray({ elementType: this.elementType.wtype, sourceLocation: this.sourceLocation, immutable: this.immutable, + nativeType: this.nativeType?.wtype, }) } - - constructor({ elementType, sourceLocation }: { elementType: ARC4EncodedType; sourceLocation?: SourceLocation }) { - super() - this.immutable = false - this.elementType = elementType - this.name = `DynamicArray<${elementType}>` - this.sourceLocation = sourceLocation - } } export const StaticArrayConstructor = new LibClassType({ name: 'StaticArray', @@ -365,7 +412,7 @@ export class StaticArrayType extends ARC4EncodedType { readonly singleton = false readonly sourceLocation: SourceLocation | undefined readonly wtype: wtypes.ARC4StaticArray - readonly nativeType = undefined + readonly nativeType: PType | undefined constructor({ elementType, @@ -374,6 +421,7 @@ export class StaticArrayType extends ARC4EncodedType { wtype, name, immutable, + nativeType, }: { immutable?: boolean elementType: ARC4EncodedType @@ -381,15 +429,25 @@ export class StaticArrayType extends ARC4EncodedType { sourceLocation?: SourceLocation wtype?: ARC4StaticArray name?: string + nativeType?: PType }) { + codeInvariant(arraySize >= 0, 'StaticArray length must be greater than or equal to 0') + super() this.immutable = immutable ?? false this.elementType = elementType this.arraySize = arraySize - this.name = name ?? `StaticArray<${elementType}>` + this.name = name ?? `StaticArray<${elementType}, ${arraySize}>` this.sourceLocation = sourceLocation + this.nativeType = nativeType this.wtype = - wtype ?? new wtypes.ARC4StaticArray({ elementType: this.elementType.wtype, arraySize: this.arraySize, immutable: this.immutable }) + wtype ?? + new wtypes.ARC4StaticArray({ + elementType: this.elementType.wtype, + arraySize: this.arraySize, + immutable: this.immutable, + nativeType: nativeType?.wtype, + }) } } export const arc4AddressAlias = new StaticArrayType({ @@ -404,3 +462,66 @@ export const AddressClass = new LibClassType({ name: 'Address', module: Constants.arc4EncodedTypesModuleName, }) + +export const StaticBytesGeneric = new GenericPType({ + name: 'StaticBytes', + module: Constants.arc4EncodedTypesModuleName, + parameterise: (typeArgs: PType[]): StaticBytesType => { + codeInvariant(typeArgs.length === 1, 'StaticBytes type expects exactly one type parameter') + const [length] = typeArgs + + codeInvariant( + length instanceof NumericLiteralPType, + `Length generic type param for StaticBytes must be a literal number. Inferred type is ${length.name}`, + ) + return new StaticBytesType({ + length: length.literalValue, + }) + }, +}) +export const StaticBytesConstructor = new LibClassType({ + name: 'StaticBytes', + module: Constants.arc4EncodedTypesModuleName, +}) +export class StaticBytesType extends StaticArrayType { + constructor({ length }: { length: bigint }) { + codeInvariant(length >= 0, 'StaticBytes length must be greater than or equal to 0') + super({ + name: `StaticBytes<${length}>`, + immutable: true, + elementType: arc4ByteAlias, + arraySize: length, + nativeType: bytesPType, + }) + } +} +export const DynamicBytesConstructor = new LibClassType({ + name: 'DynamicBytes', + module: Constants.arc4EncodedTypesModuleName, +}) +export const DynamicBytesType = new DynamicArrayType({ + name: `DynamicBytes`, + immutable: true, + elementType: arc4ByteAlias, + nativeType: bytesPType, +}) + +export const interpretAsArc4Function = new LibFunctionType({ + name: 'interpretAsArc4', + module: Constants.arc4EncodedTypesModuleName, +}) + +export const encodeArc4Function = new LibFunctionType({ + name: 'encodeArc4', + module: Constants.arc4EncodedTypesModuleName, +}) + +export const decodeArc4Function = new LibFunctionType({ + name: 'decodeArc4', + module: Constants.arc4EncodedTypesModuleName, +}) + +export const methodSelectorFunction = new LibFunctionType({ + name: 'methodSelector', + module: Constants.arc4ModuleName, +}) diff --git a/src/awst_build/ptypes/base.ts b/src/awst_build/ptypes/base.ts index 840df890..ea0661c3 100644 --- a/src/awst_build/ptypes/base.ts +++ b/src/awst_build/ptypes/base.ts @@ -1,6 +1,6 @@ import type { wtypes } from '../../awst/wtypes' +import { CodeError } from '../../errors' import type { DeliberateAny } from '../../typescript-helpers' -import { codeInvariant } from '../../util' /** * Represents a public type visible to a developer of AlgoTS @@ -28,7 +28,9 @@ export abstract class PType { } get wtypeOrThrow(): wtypes.WType { - codeInvariant(this.wtype, `${this.fullName} does not have a wtype`) + if (!this.wtype) { + throw new CodeError(`${this.fullName} does not have a wtype`) + } return this.wtype } diff --git a/src/awst_build/ptypes/for-export.ts b/src/awst_build/ptypes/for-export.ts new file mode 100644 index 00000000..6093c0b1 --- /dev/null +++ b/src/awst_build/ptypes/for-export.ts @@ -0,0 +1,3 @@ +/* This file aggregates all ptypes into a single export for external consumption of the compiler api */ +export * from './index' +export * from './arc4-types' diff --git a/src/awst_build/ptypes/index.ts b/src/awst_build/ptypes/index.ts index 2f657cff..0c89ca09 100644 --- a/src/awst_build/ptypes/index.ts +++ b/src/awst_build/ptypes/index.ts @@ -79,7 +79,7 @@ export class LogicSigPType extends PType { readonly wtype = undefined readonly name: string readonly module: string - readonly singleton = false + readonly singleton = true readonly sourceLocation: SourceLocation readonly baseType: LogicSigPType | undefined constructor(props: { module: string; name: string; baseType?: LogicSigPType; sourceLocation: SourceLocation }) { @@ -496,7 +496,16 @@ export class FunctionPType extends PType { super() this.name = props.name this.module = props.module - this.returnType = props.returnType + if (props.returnType instanceof ObjectPType && props.returnType.isAnonymous) { + this.returnType = new ObjectPType({ + name: `${props.name}Result`, + module: props.module, + properties: props.returnType.properties, + description: props.returnType.description, + }) + } else { + this.returnType = props.returnType + } this.parameters = props.parameters } } @@ -608,23 +617,32 @@ export class ArrayPType extends TransientType { } } +type ObjectPTypeArgs = + | { module: string; name: string; description: string | undefined; properties: Record; isAnonymous?: false } + | { module?: undefined; name?: undefined; properties: Record; isAnonymous: true; description?: undefined } + export class ObjectPType extends PType { readonly name: string readonly module: string + readonly description: string | undefined readonly properties: Record readonly singleton = false + readonly isAnonymous: boolean - constructor(props: { module?: string; name?: string; properties: Record }) { + constructor(props: ObjectPTypeArgs) { super() this.name = props.name ?? '' this.module = props.module ?? '' this.properties = props.properties + this.isAnonymous = props.isAnonymous ?? false + this.description = props.description } static anonymous(props: Record | Array<[string, PType]>) { const properties = Array.isArray(props) ? Object.fromEntries(props) : props return new ObjectPType({ properties, + isAnonymous: true, }) } @@ -639,7 +657,7 @@ export class ObjectPType extends PType { tupleNames.push(propName) } return new wtypes.WTuple({ - name: this.name, + name: this.fullName, names: tupleNames, types: tupleTypes, immutable: true, @@ -647,7 +665,7 @@ export class ObjectPType extends PType { } orderedProperties() { - return Object.entries(this.properties) //.toSorted(sortBy(([key]) => key)) + return Object.entries(this.properties) } getPropertyType(name: string): PType { @@ -1243,3 +1261,36 @@ export const TemplateVarFunction = new LibFunctionType({ name: 'TemplateVar', module: Constants.templateVarModuleName, }) + +export const compileFunctionType = new LibFunctionType({ + name: 'compile', + module: Constants.compiledModuleName, +}) + +export const compiledContractType = new ObjectPType({ + name: 'CompiledContract', + module: Constants.compiledModuleName, + description: 'Provides compiled programs and state allocation values for a Contract. Created by calling `compile(ExampleContractType)`', + properties: { + approvalProgram: new TuplePType({ items: [bytesPType, bytesPType] }), + clearStateProgram: new TuplePType({ items: [bytesPType, bytesPType] }), + extraProgramPages: uint64PType, + globalUints: uint64PType, + globalBytes: uint64PType, + localUints: uint64PType, + localBytes: uint64PType, + }, +}) +export const compiledLogicSigType = new ObjectPType({ + name: 'CompiledLogicSig', + module: Constants.compiledModuleName, + description: 'Provides account for a Logic Signature. Created by calling `compile(LogicSigType)``', + properties: { + account: accountPType, + }, +}) + +export const arc28EmitFunction = new LibFunctionType({ + name: 'emit', + module: Constants.arc28ModuleName, +}) diff --git a/src/awst_build/ptypes/register.ts b/src/awst_build/ptypes/register.ts index a66aa1f6..ab207bfb 100644 --- a/src/awst_build/ptypes/register.ts +++ b/src/awst_build/ptypes/register.ts @@ -1,29 +1,43 @@ +import { Arc28EmitFunctionBuilder } from '../eb/arc28/arc-28-emit-function-builder' import { Arc4AbiMethodDecoratorBuilder, Arc4BareMethodDecoratorBuilder } from '../eb/arc4-bare-method-decorator-builder' import { AddressClassBuilder, AddressExpressionBuilder, DynamicArrayClassBuilder, DynamicArrayExpressionBuilder, + DynamicBytesClassBuilder, + DynamicBytesExpressionBuilder, StaticArrayClassBuilder, StaticArrayExpressionBuilder, + StaticBytesClassBuilder, + StaticBytesExpressionBuilder, } from '../eb/arc4/arrays' import { BoolClassBuilder, BoolExpressionBuilder } from '../eb/arc4/bool' import { StrClassBuilder, StrExpressionBuilder } from '../eb/arc4/string' import { StructClassBuilder, StructExpressionBuilder } from '../eb/arc4/struct' import { Arc4TupleClassBuilder, Arc4TupleExpressionBuilder } from '../eb/arc4/tuple' import { UFixedNxMClassBuilder, UFixedNxMExpressionBuilder } from '../eb/arc4/ufixed' -import { ByteClassBuilder, UintNClassBuilder, UintNExpressionBuilder } from '../eb/arc4/uintn' +import { classBuilderForUintNAlias, UintNClassBuilder, UintNExpressionBuilder } from '../eb/arc4/uintn' +import { + DecodeArc4FunctionBuilder, + EncodeArc4FunctionBuilder, + InterpretAsArc4FunctionBuilder, + MethodSelectorFunctionBuilder, +} from '../eb/arc4/util' import { AssertFunctionBuilder, ErrFunctionBuilder } from '../eb/assert-function-builder' import { AssertMatchFunctionBuilder } from '../eb/assert-match-function-builder' import { BigUintExpressionBuilder, BigUintFunctionBuilder } from '../eb/biguint-expression-builder' import { BooleanExpressionBuilder, BooleanFunctionBuilder } from '../eb/boolean-expression-builder' import { BytesExpressionBuilder, BytesFunctionBuilder } from '../eb/bytes-expression-builder' +import { CompileFunctionBuilder } from '../eb/compiled/compile-function' +import { ContractClassBuilder } from '../eb/contract-builder' import { EnsureBudgetFunctionBuilder } from '../eb/ensure-budget' import { FreeSubroutineExpressionBuilder } from '../eb/free-subroutine-expression-builder' import { IntrinsicEnumBuilder } from '../eb/intrinsic-enum-builder' import { IterableIteratorExpressionBuilder } from '../eb/iterable-iterator-expression-builder' import { ObjectExpressionBuilder } from '../eb/literal/object-expression-builder' import { LogFunctionBuilder } from '../eb/log-function-builder' +import { LogicSigClassBuilder } from '../eb/logic-sig-builder' import { NamespaceBuilder } from '../eb/namespace-builder' import { NativeArrayExpressionBuilder } from '../eb/native-array-expression-builder' import { FreeIntrinsicOpBuilder, IntrinsicOpGroupBuilder, IntrinsicOpGroupOrFunctionTypeBuilder } from '../eb/op-module-builder' @@ -70,15 +84,30 @@ import { Arc4TupleGeneric, ARC4TupleType, ByteClass, + decodeArc4Function, DynamicArrayConstructor, DynamicArrayGeneric, DynamicArrayType, + DynamicBytesConstructor, + DynamicBytesType, + encodeArc4Function, + interpretAsArc4Function, + methodSelectorFunction, StaticArrayConstructor, StaticArrayGeneric, StaticArrayType, + StaticBytesConstructor, + StaticBytesGeneric, + StaticBytesType, UFixedNxMClass, UFixedNxMGeneric, UFixedNxMType, + UintN128Class, + UintN16Class, + UintN256Class, + UintN32Class, + UintN64Class, + UintN8Class, UintNClass, UintNGeneric, UintNType, @@ -94,6 +123,7 @@ import { applicationItxnType, applicationPType, ApplicationTxnFunction, + arc28EmitFunction, arc4AbiMethodDecorator, arc4BareMethodDecorator, ArrayPType, @@ -130,6 +160,8 @@ import { boxRefType, BytesFunction, bytesPType, + compileFunctionType, + ContractClassPType, ensureBudgetFunction, errFunction, FunctionPType, @@ -151,6 +183,7 @@ import { LocalStateGeneric, LocalStateType, logFunction, + LogicSigPType, NamespacePType, ObjectPType, onCompleteActionType, @@ -204,6 +237,11 @@ export function registerPTypes(typeRegistry: TypeRegistry) { typeRegistry.register({ ptype: ensureBudgetFunction, singletonEb: EnsureBudgetFunctionBuilder }) typeRegistry.register({ ptype: urangeFunction, singletonEb: UrangeFunctionBuilder }) typeRegistry.register({ ptype: TemplateVarFunction, singletonEb: TemplateVarFunctionBuilder }) + typeRegistry.register({ ptype: compileFunctionType, singletonEb: CompileFunctionBuilder }) + typeRegistry.register({ ptype: arc28EmitFunction, singletonEb: Arc28EmitFunctionBuilder }) + + typeRegistry.register({ ptype: ContractClassPType, singletonEb: ContractClassBuilder }) + typeRegistry.register({ ptype: LogicSigPType, singletonEb: LogicSigClassBuilder }) for (const enumType of [opUpFeeSourceType, onCompleteActionType, transactionTypeType]) { typeRegistry.register({ ptype: enumType, singletonEb: Uint64EnumTypeBuilder }) @@ -277,7 +315,13 @@ export function registerPTypes(typeRegistry: TypeRegistry) { typeRegistry.register({ ptype: UintNClass, singletonEb: UintNClassBuilder }) typeRegistry.register({ ptype: arc4AbiMethodDecorator, singletonEb: Arc4AbiMethodDecoratorBuilder }) typeRegistry.register({ ptype: arc4BareMethodDecorator, singletonEb: Arc4BareMethodDecoratorBuilder }) - typeRegistry.register({ ptype: ByteClass, singletonEb: ByteClassBuilder }) + typeRegistry.register({ ptype: ByteClass, singletonEb: classBuilderForUintNAlias(ByteClass, arc4ByteAlias) }) + typeRegistry.register({ ptype: UintN8Class, singletonEb: classBuilderForUintNAlias(UintN8Class, new UintNType({ n: 8n })) }) + typeRegistry.register({ ptype: UintN16Class, singletonEb: classBuilderForUintNAlias(UintN8Class, new UintNType({ n: 16n })) }) + typeRegistry.register({ ptype: UintN32Class, singletonEb: classBuilderForUintNAlias(UintN8Class, new UintNType({ n: 32n })) }) + typeRegistry.register({ ptype: UintN64Class, singletonEb: classBuilderForUintNAlias(UintN8Class, new UintNType({ n: 64n })) }) + typeRegistry.register({ ptype: UintN128Class, singletonEb: classBuilderForUintNAlias(UintN8Class, new UintNType({ n: 128n })) }) + typeRegistry.register({ ptype: UintN256Class, singletonEb: classBuilderForUintNAlias(UintN8Class, new UintNType({ n: 256n })) }) typeRegistry.registerGeneric({ generic: UintNGeneric, ptype: UintNType, instanceEb: UintNExpressionBuilder }) typeRegistry.register({ ptype: UFixedNxMClass, singletonEb: UFixedNxMClassBuilder }) typeRegistry.registerGeneric({ generic: UFixedNxMGeneric, ptype: UFixedNxMType, instanceEb: UFixedNxMExpressionBuilder }) @@ -296,6 +340,14 @@ export function registerPTypes(typeRegistry: TypeRegistry) { typeRegistry.registerGeneric({ generic: Arc4TupleGeneric, ptype: ARC4TupleType, instanceEb: Arc4TupleExpressionBuilder }) typeRegistry.register({ ptype: ARC4StructType, instanceEb: StructExpressionBuilder }) typeRegistry.register({ ptype: ARC4StructClass, singletonEb: StructClassBuilder }) + typeRegistry.register({ ptype: DynamicBytesConstructor, singletonEb: DynamicBytesClassBuilder }) + typeRegistry.register({ ptype: StaticBytesConstructor, singletonEb: StaticBytesClassBuilder }) + typeRegistry.register({ ptype: DynamicBytesType, instanceEb: DynamicBytesExpressionBuilder }) + typeRegistry.registerGeneric({ generic: StaticBytesGeneric, ptype: StaticBytesType, instanceEb: StaticBytesExpressionBuilder }) + typeRegistry.register({ ptype: interpretAsArc4Function, singletonEb: InterpretAsArc4FunctionBuilder }) + typeRegistry.register({ ptype: encodeArc4Function, singletonEb: EncodeArc4FunctionBuilder }) + typeRegistry.register({ ptype: decodeArc4Function, singletonEb: DecodeArc4FunctionBuilder }) + typeRegistry.register({ ptype: methodSelectorFunction, singletonEb: MethodSelectorFunctionBuilder }) // GTXN types typeRegistry.register({ ptype: paymentGtxnType, instanceEb: GroupTransactionExpressionBuilder }) diff --git a/src/awst_build/type-resolver.ts b/src/awst_build/type-resolver.ts index f2f43c57..335509ad 100644 --- a/src/awst_build/type-resolver.ts +++ b/src/awst_build/type-resolver.ts @@ -38,7 +38,7 @@ import { unknownPType, voidPType, } from './ptypes' -import { ARC4EncodedType, arc4StructBaseType, ARC4StructClass, ARC4StructType } from './ptypes/arc4-types' +import { ARC4EncodedType, arc4StructBaseType, ARC4StructClass, ARC4StructType, UintNType } from './ptypes/arc4-types' import { SymbolName } from './symbol-name' import { typeRegistry } from './type-registry' @@ -217,10 +217,14 @@ export class TypeResolver { if (typeName.fullName === baseContractType.fullName) return baseContractType if (typeName.fullName === arc4StructBaseType.fullName) return arc4StructBaseType if (typeName.fullName === logicSigBaseType.fullName) return logicSigBaseType + const [baseType, ...rest] = tsType.getBaseTypes()?.map((t) => this.resolveType(t, sourceLocation)) ?? [] invariant(rest.length === 0, 'Class can have at most one base type') + // Treat sub-types of UintN type as the base type. + if (baseType instanceof UintNType) return baseType + if (baseType instanceof ContractClassPType) { return this.reflectContractType(typeName, tsType, baseType, sourceLocation) } @@ -263,9 +267,13 @@ export class TypeResolver { private reflectObjectType(tsType: ts.Type, sourceLocation: SourceLocation): ObjectPType { const typeAlias = tsType.aliasSymbol ? this.getSymbolFullName(tsType.aliasSymbol, sourceLocation) : undefined - const properties: Record = {} for (const prop of tsType.getProperties()) { + if (prop.name.startsWith('__@')) { + // Symbol property - ignore + // TODO: Check AST nodes to confirm? + continue + } const type = this.checker.getTypeOfSymbol(prop) const ptype = this.resolveType(type, sourceLocation) if (ptype.singleton) { @@ -275,7 +283,7 @@ export class TypeResolver { } } if (typeAlias) { - return new ObjectPType({ ...typeAlias, properties }) + return new ObjectPType({ ...typeAlias, properties, description: tryGetTypeDescription(tsType) }) } return ObjectPType.anonymous(properties) } @@ -288,8 +296,8 @@ export class TypeResolver { const ptype = this.resolve(typeDeclaration, sourceLocation) if (ptype instanceof ARC4StructType) { return ARC4StructClass.fromStructType(ptype) - } else if (ptype instanceof ContractClassPType) { - throw new CodeError('Contract classes cannot be explicitly instantiated', { sourceLocation }) + } else if (ptype instanceof ContractClassPType || ptype instanceof LogicSigPType) { + return ptype } } throw new CodeError('Unable to reflect constructor type', { sourceLocation }) @@ -317,13 +325,14 @@ export class TypeResolver { module: typeName.module, }) } + private reflectStructType( typeName: SymbolName, tsType: ts.Type, baseType: ARC4StructType, sourceLocation: SourceLocation, ): ARC4StructType { - const ignoredProps = ['bytes', '__type', 'equals', Constants.constructorMethodName] + const ignoredProps = ['bytes', 'equals', Constants.constructorMethodName] const fields: Record = {} for (const prop of tsType.getProperties()) { if (isIn(prop.name, ignoredProps)) continue @@ -340,6 +349,7 @@ export class TypeResolver { ...typeName, fields: fields, sourceLocation: sourceLocation, + description: tryGetTypeDescription(tsType), }) } @@ -437,3 +447,15 @@ function isIntersectionType(tsType: ts.Type): tsType is ts.IntersectionType { function isInstantiationExpression(tsType: ts.Type): tsType is ts.Type & { node: ts.ExpressionWithTypeArguments } { return isObjectType(tsType) && hasFlags(tsType.objectFlags, ObjectFlags.InstantiationExpressionType) } + +function tryGetTypeDescription(tsType: ts.Type): string | undefined { + const dec = tsType.aliasSymbol?.valueDeclaration ?? tsType.symbol.valueDeclaration + if (!dec) return undefined + const docs = ts.getJSDocCommentsAndTags(dec) + for (const doc of docs) { + if (ts.isJSDoc(doc)) { + return ts.getTextOfJSDocComment(doc.comment) + } + } + return undefined +} diff --git a/src/cli.ts b/src/cli.ts index 4ba43669..b55b7347 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -7,6 +7,8 @@ import { ConsoleLogSink } from './logger/sinks/console-log-sink' import type { PuyaPassThroughOptions } from './puya/options' import { defaultPuyaOptions, LocalsCoalescingStrategy } from './puya/options' +const cmdInteger = () => z.preprocess((x) => (typeof x === 'string' && x.length > 0 ? Number(x) : x), z.number().int()) + const cliOptionsSchema = z.object({ outputAwst: z.boolean(), outputAwstJson: z.boolean(), @@ -18,15 +20,16 @@ const cliOptionsSchema = z.object({ // Puya options outputTeal: z.boolean(), outputArc32: z.boolean(), + outputArc56: z.boolean(), outputSsaIr: z.boolean(), outputOptimizationIr: z.boolean(), outputDestructuredIr: z.boolean(), outputMemoryIr: z.boolean(), outputBytecode: z.boolean(), matchAlgodBytecode: z.boolean(), - debugLevel: z.number().int(), - optimizationLevel: z.number().int(), - targetAvmVersion: z.number().int(), + debugLevel: cmdInteger(), + optimizationLevel: cmdInteger(), + targetAvmVersion: cmdInteger(), cliTemplateDefinitions: z.preprocess((x) => x ?? [], z.array(z.string())), templateVarsPrefix: z.string(), localsCoalescingStrategy: z.nativeEnum(LocalsCoalescingStrategy), @@ -44,7 +47,7 @@ function cli() { .argument('', 'The path, or paths to search for compatible .algo.ts files') .addOption( new Option('--log-level [level]', 'The minimum log level to output') - .choices([LogLevel.Debug, LogLevel.Info, LogLevel.Warn, LogLevel.Error, LogLevel.Critical]) + .choices([LogLevel.Debug, LogLevel.Info, LogLevel.Warning, LogLevel.Error, LogLevel.Critical]) .default(LogLevel.Info), ) .addOption(new Option('--output-awst', 'Output debugging awst file per parsed file').default(false)) @@ -59,6 +62,11 @@ function cli() { 'Do not output {contract}.arc32.json ARC-32 app spec file. Only applicable to ARC4 contracts', ).default(defaultPuyaOptions.outputArc32), ) + .addOption( + new Option('--output-arc56', 'Output {contract}.arc56.json ARC-56 app spec file. Only applicable to ARC4 contracts').default( + defaultPuyaOptions.outputArc56, + ), + ) .addOption(new Option('--output-ssa-ir', 'Output IR (in SSA form) before optimisations').default(defaultPuyaOptions.outputSsaIr)) .addOption(new Option('--output-optimization-ir', 'Output IR after each optimization').default(defaultPuyaOptions.outputOptimizationIr)) .addOption( @@ -107,6 +115,7 @@ function cli() { .action((a, o) => { using logCtx = LoggingContext.create() + logger.configure([new ConsoleLogSink(LogLevel.Warning)]) try { const paths = cliArgumentsSchema.parse(a) const cliOptions = cliOptionsSchema.parse(o) diff --git a/src/constants.ts b/src/constants.ts index bf9c575f..70cebd49 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -17,6 +17,8 @@ export const Constants = { transactionsModuleName: `${algoTsPackage}/transactions.d.ts`, gtxnModuleName: `${algoTsPackage}/gtxn.d.ts`, itxnModuleName: `${algoTsPackage}/itxn.d.ts`, + compiledModuleName: `${algoTsPackage}/compiled.d.ts`, + arc28ModuleName: `${algoTsPackage}/arc-28.d.ts`, primitivesModuleName: `${algoTsPackage}/primitives.d.ts`, arc4EncodedTypesModuleName: `${algoTsPackage}/arc4/encoded-types.d.ts`, arc4BareDecoratorName: 'arc4.baremethod', diff --git a/src/index.ts b/src/index.ts index 41e008b3..fcdc2a4a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,17 +24,7 @@ import { } from './util' export { SourceLocation } from './awst/source-location' -export { - anyPType, - BoxMapPType, - BoxPType, - ContractClassPType, - FunctionPType, - GlobalStateType, - LocalStateType, - PType, -} from './awst_build/ptypes' -export { ARC4StructType, ARC4TupleType, DynamicArrayType, StaticArrayType, UFixedNxMType, UintNType } from './awst_build/ptypes/arc4-types' +export * as ptypes from './awst_build/ptypes/for-export' export { registerPTypes } from './awst_build/ptypes/register' export { typeRegistry } from './awst_build/type-registry' export { TypeResolver } from './awst_build/type-resolver' diff --git a/src/logger/index.ts b/src/logger/index.ts index 1f434b67..cb072d4c 100644 --- a/src/logger/index.ts +++ b/src/logger/index.ts @@ -7,7 +7,7 @@ type NodeOrSourceLocation = SourceLocation | { sourceLocation: SourceLocation } export enum LogLevel { Error = 'error', Info = 'info', - Warn = 'warn', + Warning = 'warning', Debug = 'debug', Critical = 'critical', } @@ -15,7 +15,7 @@ const logLevelToInt = { [LogLevel.Critical]: 4, [LogLevel.Error]: 3, [LogLevel.Info]: 1, - [LogLevel.Warn]: 2, + [LogLevel.Warning]: 2, [LogLevel.Debug]: 0, } @@ -39,7 +39,7 @@ class PuyaLogger { this.logSinks = sinks } - private addLog(level: LogEvent['level'], source: NodeOrSourceLocation | undefined, message: string) { + addLog(level: LogEvent['level'], source: NodeOrSourceLocation | undefined, message: string) { const logEvent: LogEvent = { sourceLocation: source ? (source instanceof SourceLocation ? source : source.sourceLocation) : undefined, message, @@ -71,7 +71,7 @@ class PuyaLogger { this.addLog(LogLevel.Debug, source, message) } warn(source: NodeOrSourceLocation | undefined, message: string): void { - this.addLog(LogLevel.Warn, source, message) + this.addLog(LogLevel.Warning, source, message) } critical(source: NodeOrSourceLocation | undefined, message: string): void { this.addLog(LogLevel.Critical, source, message) diff --git a/src/logger/sinks/console-log-sink.ts b/src/logger/sinks/console-log-sink.ts index fa1cdccf..24a7b650 100644 --- a/src/logger/sinks/console-log-sink.ts +++ b/src/logger/sinks/console-log-sink.ts @@ -9,7 +9,7 @@ const levelConfig: Record export const defaultPuyaOptions: PuyaPassThroughOptions = { outputTeal: true, outputArc32: true, + outputArc56: true, outputSsaIr: false, outputOptimizationIr: false, outputDestructuredIr: false, @@ -26,6 +27,7 @@ export type PuyaPassThroughOptions = Omit export class PuyaOptions { outputTeal: boolean outputArc32: boolean + outputArc56: boolean outputSsaIr: boolean outputOptimizationIr: boolean outputDestructuredIr: boolean @@ -50,6 +52,7 @@ export class PuyaOptions { this.compilationSet = compilationSet this.outputTeal = passThroughOptions.outputTeal this.outputArc32 = passThroughOptions.outputArc32 + this.outputArc56 = passThroughOptions.outputArc56 this.outputSsaIr = passThroughOptions.outputSsaIr this.outputOptimizationIr = passThroughOptions.outputOptimizationIr this.outputDestructuredIr = passThroughOptions.outputDestructuredIr diff --git a/src/puya/run-puya.ts b/src/puya/run-puya.ts index 02f77841..2f6348ab 100644 --- a/src/puya/run-puya.ts +++ b/src/puya/run-puya.ts @@ -1,13 +1,34 @@ import { sync } from 'cross-spawn' import { logger } from '../logger' +import { deserializeAndLog } from './log-deserializer' export function runPuya({ command, args, cwd }: { command: string; args: string[]; cwd?: string }) { const proc = sync(command, args, { // forward all stdin/stdout/stderr to current handlers, with correct interleaving - stdio: 'inherit', + stdio: 'pipe', cwd, }) + let line = '' + for (const chunk of proc.output) { + if (chunk === undefined || chunk === null) continue + const text = chunk.toString('utf-8') + for (const c of text) { + switch (c) { + case '\n': + deserializeAndLog(line) + line = '' + break + case '\r': + continue + default: + line += c + break + } + } + } + if (line) deserializeAndLog(line) + if (proc.error) { // only happens during invocation error, not error return status if ('code' in proc.error && proc.error.code === 'ENOENT') { diff --git a/tests/approvals/_run.spec.ts b/tests/approvals.spec.ts similarity index 75% rename from tests/approvals/_run.spec.ts rename to tests/approvals.spec.ts index c6744edc..770f88d4 100644 --- a/tests/approvals/_run.spec.ts +++ b/tests/approvals.spec.ts @@ -1,26 +1,32 @@ import { sync } from 'cross-spawn' +import { rimraf } from 'rimraf' import { describe, expect, it } from 'vitest' -import { compile } from '../../src' -import { buildCompileOptions } from '../../src/compile-options' -import { isErrorOrCritical, LoggingContext, LogLevel } from '../../src/logger' -import { defaultPuyaOptions } from '../../src/puya/options' -import { invariant } from '../../src/util' +import { compile } from '../src' +import { buildCompileOptions } from '../src/compile-options' +import { isErrorOrCritical, LoggingContext, LogLevel } from '../src/logger' +import { defaultPuyaOptions } from '../src/puya/options' +import { invariant } from '../src/util' + +describe('Approvals', async () => { + await rimraf('tests/approvals/out') -describe('Approvals', () => { using logCtx = LoggingContext.create() const result = compile( buildCompileOptions({ - outputAwstJson: false, - outputAwst: false, + outputAwstJson: true, + outputAwst: true, paths: ['tests/approvals'], outDir: 'out/[name]', dryRun: false, - logLevel: LogLevel.Warn, + logLevel: LogLevel.Warning, }), { ...defaultPuyaOptions, - outputTeal: false, + optimizationLevel: 0, + outputTeal: true, outputArc32: true, + outputArc56: true, + outputSsaIr: true, }, ) invariant(result.ast, 'Compilation must result in ast') @@ -49,10 +55,10 @@ describe('Approvals', () => { }) it('There should be no differences to committed changes', () => { - // Run git add to force line ending changes - sync('git', ['add', '.'], { - stdio: 'inherit', - }) + // // Run git add to force line ending changes + // sync('git', ['add', '.'], { + // stdio: 'inherit', + // }) const result = sync('git', ['status', '--porcelain'], { stdio: 'pipe', }) diff --git a/tests/approvals/accounts.algo.ts b/tests/approvals/accounts.algo.ts index c8bb02e5..5b7a6543 100644 --- a/tests/approvals/accounts.algo.ts +++ b/tests/approvals/accounts.algo.ts @@ -1,8 +1,9 @@ import type { Account, Asset } from '@algorandfoundation/algorand-typescript' -import { Contract, Global } from '@algorandfoundation/algorand-typescript' +import { Contract, ensureBudget, Global } from '@algorandfoundation/algorand-typescript' export class AccountsContract extends Contract { public getAccountInfo(account: Account, asset: Asset) { + ensureBudget(1400) return { bytes: account.bytes, balance: account.balance, diff --git a/tests/approvals/arc28-events.algo.ts b/tests/approvals/arc28-events.algo.ts new file mode 100644 index 00000000..45c423a3 --- /dev/null +++ b/tests/approvals/arc28-events.algo.ts @@ -0,0 +1,31 @@ +import type { uint64 } from '@algorandfoundation/algorand-typescript' +import { Contract, emit } from '@algorandfoundation/algorand-typescript' +import { Struct, UintN64 } from '@algorandfoundation/algorand-typescript/arc4' + +type Swapped = { + a: uint64 + b: uint64 +} + +class SwappedArc4 extends Struct<{ a: UintN64; b: UintN64 }> {} + +class EventEmitter extends Contract { + emitSwapped(a: uint64, b: uint64) { + emit({ a: b, b: a }) + + const x: Swapped = { a: b, b: a } + emit(x) + + const y = new SwappedArc4({ + a: new UintN64(b), + b: new UintN64(a), + }) + emit(y) + + emit('Swapped', b, a) + } + + emitCustom(arg0: string, arg1: boolean) { + emit('Custom', arg0, arg1) + } +} diff --git a/tests/approvals/arc4-encode-decode.algo.ts b/tests/approvals/arc4-encode-decode.algo.ts new file mode 100644 index 00000000..c8547fd9 --- /dev/null +++ b/tests/approvals/arc4-encode-decode.algo.ts @@ -0,0 +1,36 @@ +import type { biguint, bytes, uint64 } from '@algorandfoundation/algorand-typescript' +import { assert, assertMatch, Contract } from '@algorandfoundation/algorand-typescript' +import { Bool, decodeArc4, DynamicBytes, encodeArc4, Str, Struct, UintN, UintN64 } from '@algorandfoundation/algorand-typescript/arc4' + +class TestStruct extends Struct<{ a: UintN64; b: DynamicBytes }> {} +type TestObj = { a: UintN64; b: DynamicBytes } +export class Arc4EncodeDecode extends Contract { + testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { + assert(encodeArc4(a) === new UintN64(a).bytes) + assert(encodeArc4(b) === new Bool(b).bytes) + assert(encodeArc4(c) === new UintN<512>(c).bytes) + assert(encodeArc4(d) === new DynamicBytes(d).bytes) + assert(encodeArc4(e) === new Str(e).bytes) + assert(encodeArc4({ a, b: d }) === new TestStruct({ a: new UintN64(a), b: new DynamicBytes(d) }).bytes) + } + + testDecoding( + a: uint64, + a_bytes: bytes, + b: boolean, + b_bytes: bytes, + c: biguint, + c_bytes: bytes, + d: string, + d_bytes: bytes, + e: TestObj, + e_bytes: bytes, + ) { + assert(decodeArc4(a_bytes) === a) + assert(decodeArc4(b_bytes) === b) + assert(decodeArc4(c_bytes) === c) + assert(decodeArc4(d_bytes) === d) + + assertMatch(decodeArc4(e_bytes), e) + } +} diff --git a/tests/approvals/arc4-struct.algo.ts b/tests/approvals/arc4-struct.algo.ts index d0b64d51..b7880761 100644 --- a/tests/approvals/arc4-struct.algo.ts +++ b/tests/approvals/arc4-struct.algo.ts @@ -1,5 +1,5 @@ import { assert, Contract, log } from '@algorandfoundation/algorand-typescript' -import { Struct, UintN } from '@algorandfoundation/algorand-typescript/arc4' +import { interpretAsArc4, Struct, UintN } from '@algorandfoundation/algorand-typescript/arc4' type ARC4Uint64 = UintN<64> const ARC4Uint64 = UintN<64> @@ -12,7 +12,7 @@ class StructDemo extends Contract { log(v1.x) log(v1.y) const v2 = new Vector({ y: new ARC4Uint64(0), x: new ARC4Uint64(0) }) - assert(v1.equals(v2)) + assert(v1 === v2) } public addVectors(v1: Vector, v2: Vector) { @@ -21,4 +21,16 @@ class StructDemo extends Contract { y: new ARC4Uint64(v1.y.native + v2.y.native), }) } + + public implicitCastingAndSpreading(v1: Vector) { + const v2 = new Vector(v1) + const v3 = new Vector({ ...v2 }) + assert(v1.bytes === v2.bytes) + assert(v3.bytes === v1.bytes) + } + + public toAndFromBytes(v1: Vector): Vector { + const v1_bytes = v1.bytes + return interpretAsArc4(v1_bytes) + } } diff --git a/tests/approvals/arc4-types.algo.ts b/tests/approvals/arc4-types.algo.ts index 38a2fd4b..886edc12 100644 --- a/tests/approvals/arc4-types.algo.ts +++ b/tests/approvals/arc4-types.algo.ts @@ -1,15 +1,30 @@ -import type { biguint, uint64 } from '@algorandfoundation/algorand-typescript' -import { assert, BaseContract, Bytes, Txn } from '@algorandfoundation/algorand-typescript' -import { Address, Byte, DynamicArray, StaticArray, Str, Tuple, UFixedNxM, UintN } from '@algorandfoundation/algorand-typescript/arc4' +import type { biguint, bytes, uint64 } from '@algorandfoundation/algorand-typescript' +import { arc4, assert, BaseContract, BigUint, Bytes, Txn } from '@algorandfoundation/algorand-typescript' +import { + Address, + Byte, + DynamicArray, + DynamicBytes, + interpretAsArc4, + StaticArray, + StaticBytes, + Str, + Tuple, + UFixedNxM, + UintN, + UintN128, + UintN32, + UintN64, +} from '@algorandfoundation/algorand-typescript/arc4' function testUFixed() { - const a = new UFixedNxM('1.244', 32, 4) + const a = new UFixedNxM<32, 4>('1.244') const c = new UFixedNxM<32, 4>('1.244') - assert(a.equals(c)) + assert(a === c) } -function test(n: uint64, b: biguint, c: UintN<256>) { +function testUintN(n: uint64, b: biguint, c: UintN<256>) { const x = new UintN<8>(4) assert(x.bytes.length === 1) const x2 = new UintN<8>(255n) @@ -20,11 +35,28 @@ function test(n: uint64, b: biguint, c: UintN<256>) { const z = new UintN<8>(n) const z_native = z.native assert(z_native === n) + const big128 = new UintN128(2n ** 100n) + const a = new UintN<128>(b) const a_native = a.native assert(a_native === b) assert(c.bytes.length === 256 / 8) + + const a_bytes = a.bytes + const a_from_bytes = interpretAsArc4>(a_bytes) + + assert(a_from_bytes === a) + + const aliased64 = new UintN64(12) + + assert(aliased64.native === 12) + const aliased32 = new UintN32(50545) + assert(BigUint(aliased32.bytes) === 50545n) + + const byte = new Byte(255) + + assert(byte.bytes.bitwiseInvert() === Bytes.fromHex('00')) } function testStr() { @@ -32,6 +64,29 @@ function testStr() { assert(s1.bytes === new UintN<16>(0).bytes, 'Empty string should equal the uint16 length prefix') const s2 = new Str('Hello') assert(s2.native === 'Hello') + + const s2_bytes = s2.bytes + + const s2_from_bytes = interpretAsArc4(s2_bytes) + + assert(s2 === s2_from_bytes) +} + +function testDynamicBytes(someBytes: bytes) { + const db1 = new DynamicBytes() + assert(db1.native === Bytes(), 'No args should give empty bytes') + assert(db1.bytes === new UintN<16>(0).bytes, 'bytes prop should return length header (of 0)') + const db2 = new DynamicBytes(someBytes) + assert(db2.native === someBytes) + + const db3 = new DynamicBytes('hello') + assert(db3.native === Bytes('hello')) +} + +function testStaticBytes() { + const s1 = new StaticBytes() + const s2 = new StaticBytes<4>() + const s3 = new StaticBytes<5>(Bytes.fromHex('AABBCCDDEE')) } type ARC4Uint64 = UintN<64> @@ -44,33 +99,33 @@ function testArrays(n: ARC4Uint64) { const myStatic = new StaticArray(n, n) - assert(myStatic[0].equals(myArray.pop())) + assert(myStatic[0] === myArray.pop()) myStatic[1] = new UintN<64>(50) - // const myStatic2 = new StaticArray(n, n, n) + const myStatic2 = new StaticArray(n, n, n) } function testByte() { const b = new Byte() const b2 = new Byte(0) - assert(b.equals(b2)) + assert(b === b2) } function testAddress() { const a = new Address() const b = new Address(Txn.sender) - assert(!a.equals(b), 'Zero address should not match sender') - assert(a.equals(new Address()), 'Two zero addresses should match') - assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') + assert(a !== b, 'Zero address should not match sender') + assert(a === new Address(), 'Two zero addresses should match') + assert(a[0] === new Byte(), 'Zero address should start with zero byte') } function testTuple() { const t = new Tuple(new ARC4Uint64(34)) const firstItem = t.at(0) const firstItemIndexer = t.native[0] - assert(firstItem.equals(firstItemIndexer)) + assert(firstItem === firstItemIndexer) const t1 = new Tuple(new Address(), new Byte()) assert(t1.length === 2) } @@ -83,11 +138,17 @@ export class Arc4TypesTestContract extends BaseContract { public approvalProgram(): boolean { const x = new ARC4Uint64() testStr() - test(1, 2n, new UintN<256>(4)) + testUintN(1, 2n, new UintN<256>(4)) + testUFixed() testByte() testArrays(new UintN<64>(65)) testAddress() testTuple() + testUFixed() + testDynamicBytes(Bytes('hmmmmmmmmm')) + testStaticBytes() + const result = new arc4.DynamicArray>() + assert(result.length === 0) return true } } diff --git a/tests/approvals/biguint-expressions.algo.ts b/tests/approvals/biguint-expressions.algo.ts index bc0b8bbf..ae1c269b 100644 --- a/tests/approvals/biguint-expressions.algo.ts +++ b/tests/approvals/biguint-expressions.algo.ts @@ -1,7 +1,8 @@ -import type { bytes, uint64 } from '@algorandfoundation/algorand-typescript' -import { BigUint } from '@algorandfoundation/algorand-typescript' +import type { biguint, bytes, uint64 } from '@algorandfoundation/algorand-typescript' +import { assert, BaseContract, BigUint, Bytes, op } from '@algorandfoundation/algorand-typescript' +import { itob } from '@algorandfoundation/algorand-typescript/op' -function test(a: uint64, b: boolean, c: bytes) { +function testConstructor(a: uint64, b: boolean, c: bytes) { BigUint() BigUint(true) BigUint(false) @@ -16,3 +17,20 @@ function test(a: uint64, b: boolean, c: bytes) { BigUint(b) BigUint(c) } + +function testOps(smaller: biguint, larger: biguint) { + assert(smaller < larger) + assert(smaller <= smaller) + assert(larger > smaller) + assert(larger >= larger) + assert(smaller === BigUint(smaller)) + assert(smaller === BigUint(op.bzero(4).concat(Bytes(smaller))), 'Leading zeros should be ignored in equality') +} + +class DemoContract extends BaseContract { + public approvalProgram() { + testConstructor(1, false, itob(4)) + testOps(500n, 1000n) + return true + } +} diff --git a/tests/approvals/byte-expressions.algo.ts b/tests/approvals/byte-expressions.algo.ts index 6d088883..4c213e4a 100644 --- a/tests/approvals/byte-expressions.algo.ts +++ b/tests/approvals/byte-expressions.algo.ts @@ -1,13 +1,20 @@ import type { biguint, uint64 } from '@algorandfoundation/algorand-typescript' -import { assert, BigUint, Bytes, op, Uint64 } from '@algorandfoundation/algorand-typescript' +import { assert, BaseContract, BigUint, Bytes, op, Uint64 } from '@algorandfoundation/algorand-typescript' function test(a: uint64, b: biguint, c: string) { - assert(Bytes().length === 0) - assert(Bytes(a) === op.itob(a)) - assert(Bytes(Uint64(1)) === Bytes.fromHex('0000000000000001')) + assert(Bytes().length === 0, 'Empty bytes has length of 0') + assert(Bytes(a) === op.itob(a), 'Bytes(uint64) is equivalent to itob') + assert(Bytes(Uint64(1)) === Bytes.fromHex('0000000000000001'), 'Bytes(uint64) returns an 8 byte encoding') assert(Bytes(BigUint(256)) === Bytes.fromHex('0100')) - assert(BigUint(Bytes(b)) === b) + assert(BigUint(Bytes(b)) === b, 'Round trip of biguint to bytes and back results in the same value') assert(String(Bytes(c)) === c) assert(Bytes(Bytes('123')) === Bytes('123')) assert(Bytes([1, 2, 3, 4]) === Bytes.fromHex('01020304')) } + +class DemoContract extends BaseContract { + public approvalProgram() { + test(1, 50n, 'things') + return true + } +} diff --git a/tests/approvals/jsdoc.algo.ts b/tests/approvals/jsdoc.algo.ts new file mode 100644 index 00000000..007e6a08 --- /dev/null +++ b/tests/approvals/jsdoc.algo.ts @@ -0,0 +1,44 @@ +import type { bytes, uint64 } from '@algorandfoundation/algorand-typescript' +import { Contract, GlobalState, LocalState } from '@algorandfoundation/algorand-typescript' +import { Struct, UintN } from '@algorandfoundation/algorand-typescript/arc4' + +/** + * This is the description for demo struct + */ +class DemoStruct extends Struct<{ a: UintN<64> }> {} + +/** + * This is the description for demo type + */ +type DemoType = { + a: bytes +} + +/** + * This is the description for the contract + */ +export class JSDocDemo extends Contract { + globalState = GlobalState() + localState = LocalState() + + /** + * This is the description of the method + * @param a This is the description of 'a' + * @param b This is the description of 'b' + * @returns This is the description of the return value + */ + test(a: uint64, b: bytes): DemoStruct { + return new DemoStruct({ a: new UintN<64>(a) }) + } + + /** + * This is the description of the method + * @param a This is the description of 'a' + * @returns This is the description of the return value + */ + test2(a: bytes): DemoType { + return { + a, + } + } +} diff --git a/tests/approvals/named-types.algo.ts b/tests/approvals/named-types.algo.ts index 5f9e767c..c7c6328e 100644 --- a/tests/approvals/named-types.algo.ts +++ b/tests/approvals/named-types.algo.ts @@ -1,5 +1,5 @@ import type { uint64 } from '@algorandfoundation/algorand-typescript' -import { Contract, Uint64 } from '@algorandfoundation/algorand-typescript' +import { assertMatch, Contract, Uint64 } from '@algorandfoundation/algorand-typescript' type XY = { x: uint64 @@ -11,13 +11,6 @@ type YX = { x: uint64 } -/** - * In TypeScript, objects with the same properties are considered equal regardless of declaration order however puya-ts - * should respect the declaration order when encoding an object as an ARC4 tuple. Ie. XY should be assignable to YX but - * when encoded as an ARC4 tuple they should be encoded as [X, Y] and [Y, X] respectively. - * - * TODO: This is not currently the case. - */ export class MyContract extends Contract { public getXY(): XY { return { @@ -40,6 +33,10 @@ export class MyContract extends Contract { } } + public test(x: XY, y: YX) { + assertMatch(x, { ...y }) + } + public testing() { const a = this.getXY() const b = this.getYX() diff --git a/tests/approvals/out/abi-decorators/AbiDecorators.approval.teal b/tests/approvals/out/abi-decorators/AbiDecorators.approval.teal new file mode 100644 index 00000000..82783ed5 --- /dev/null +++ b/tests/approvals/out/abi-decorators/AbiDecorators.approval.teal @@ -0,0 +1,205 @@ +#pragma version 10 + +tests/approvals/abi-decorators.algo.ts::AbiDecorators.approvalProgram: + intcblock 0 1 + bytecblock 0x151f7c75 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.constructor() -> void: +constructor: + // tests/approvals/abi-decorators.algo.ts:4 + // export default class AbiDecorators extends Contract { + proto 0 0 + // tests/approvals/abi-decorators.algo.ts:16 + // globalValue = GlobalState({ initialValue: Uint64(123) }) + pushbytes "globalValue" + pushint 123 // 123 + app_global_put + retsub + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/abi-decorators.algo.ts:4 + // export default class AbiDecorators extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@9 + txna ApplicationArgs 0 + pushbytes 0xf9020d5a // method "justNoop()void" + pushbytes 0xe179f9d4 // method "createMethod()void" + pushbytes 0x63c27aba // method "allActions()void" + pushbytes 0x14d1b6ea // method "overrideReadonlyName()uint64" + pushbytes 0xc1367374 // method "methodWithDefaults(uint64,uint64,uint64)uint64" + uncover 5 + match __puya_arc4_router___justNoop_route@2 __puya_arc4_router___createMethod_route@3 __puya_arc4_router___allActions_route@4 __puya_arc4_router___overrideReadonlyName_route@5 __puya_arc4_router___methodWithDefaults_route@6 + b __puya_arc4_router___switch_case_default@7 + +__puya_arc4_router___justNoop_route@2: + // tests/approvals/abi-decorators.algo.ts:5 + // @abimethod({ allowActions: 'NoOp' }) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub justNoop + intc_1 // 1 + retsub + +__puya_arc4_router___createMethod_route@3: + // tests/approvals/abi-decorators.algo.ts:7 + // @abimethod({ onCreate: 'require' }) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub createMethod + intc_1 // 1 + retsub + +__puya_arc4_router___allActions_route@4: + // tests/approvals/abi-decorators.algo.ts:9 + // @abimethod({ allowActions: ['NoOp', 'OptIn', 'CloseOut', 'DeleteApplication', 'UpdateApplication'] }) + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub allActions + intc_1 // 1 + retsub + +__puya_arc4_router___overrideReadonlyName_route@5: + // tests/approvals/abi-decorators.algo.ts:11 + // @abimethod({ readonly: true, name: 'overrideReadonlyName' }) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub readonly + itob + bytec_0 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___methodWithDefaults_route@6: + // tests/approvals/abi-decorators.algo.ts:18 + // @abimethod({ defaultArguments: { a: { from: 'globalValue' }, b: { from: 'readonly' }, c: { constant: 145 } } }) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/abi-decorators.algo.ts:4 + // export default class AbiDecorators extends Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + btoi + txna ApplicationArgs 3 + btoi + // tests/approvals/abi-decorators.algo.ts:18 + // @abimethod({ defaultArguments: { a: { from: 'globalValue' }, b: { from: 'readonly' }, c: { constant: 145 } } }) + uncover 2 + uncover 2 + uncover 2 + callsub methodWithDefaults + itob + bytec_0 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@7: + b __puya_arc4_router___after_if_else@10 + +__puya_arc4_router___bare_routing@9: + +__puya_arc4_router___after_if_else@10: + // tests/approvals/abi-decorators.algo.ts:4 + // export default class AbiDecorators extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.justNoop() -> void: +justNoop: + // tests/approvals/abi-decorators.algo.ts:5-6 + // @abimethod({ allowActions: 'NoOp' }) + // public justNoop(): void {} + proto 0 0 + retsub + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.createMethod() -> void: +createMethod: + // tests/approvals/abi-decorators.algo.ts:7-8 + // @abimethod({ onCreate: 'require' }) + // public createMethod(): void {} + proto 0 0 + retsub + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.allActions() -> void: +allActions: + // tests/approvals/abi-decorators.algo.ts:9-10 + // @abimethod({ allowActions: ['NoOp', 'OptIn', 'CloseOut', 'DeleteApplication', 'UpdateApplication'] }) + // public allActions(): void {} + proto 0 0 + retsub + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.readonly() -> uint64: +readonly: + // tests/approvals/abi-decorators.algo.ts:11-12 + // @abimethod({ readonly: true, name: 'overrideReadonlyName' }) + // public readonly(): uint64 { + proto 0 1 + // tests/approvals/abi-decorators.algo.ts:13 + // return 5 + pushint 5 // 5 + retsub + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.methodWithDefaults(a: uint64, b: uint64, c: uint64) -> uint64: +methodWithDefaults: + // tests/approvals/abi-decorators.algo.ts:18-19 + // @abimethod({ defaultArguments: { a: { from: 'globalValue' }, b: { from: 'readonly' }, c: { constant: 145 } } }) + // public methodWithDefaults(a: uint64, b: uint64, c: uint64): uint64 { + proto 3 1 + // tests/approvals/abi-decorators.algo.ts:20 + // return a * b + c + frame_dig -3 + frame_dig -2 + * + frame_dig -1 + + + retsub diff --git a/tests/approvals/out/abi-decorators/AbiDecorators.arc32.json b/tests/approvals/out/abi-decorators/AbiDecorators.arc32.json index eb54016c..f1b65177 100644 --- a/tests/approvals/out/abi-decorators/AbiDecorators.arc32.json +++ b/tests/approvals/out/abi-decorators/AbiDecorators.arc32.json @@ -49,7 +49,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWJpLWRlY29yYXRvcnMuYWxnby50czo6QWJpRGVjb3JhdG9ycy5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwCiAgICBieXRlY2Jsb2NrIDB4MTUxZjdjNzUKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FiaS1kZWNvcmF0b3JzLmFsZ28udHM6OkFiaURlY29yYXRvcnMuY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hYmktZGVjb3JhdG9ycy5hbGdvLnRzOjQKICAgIC8vIGV4cG9ydCBkZWZhdWx0IGNsYXNzIEFiaURlY29yYXRvcnMgZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hYmktZGVjb3JhdG9ycy5hbGdvLnRzOjE2CiAgICAvLyBnbG9iYWxWYWx1ZSA9IEdsb2JhbFN0YXRlKHsgaW5pdGlhbFZhbHVlOiBVaW50NjQoMTIzKSB9KQogICAgcHVzaGJ5dGVzICJnbG9iYWxWYWx1ZSIK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cmF0b3JzLmFsZ28udHM6MTgtMTkKICAgIC8vIEBhYmltZXRob2QoeyBkZWZhdWx0QXJndW1lbnRzOiB7IGE6IHsgZnJvbTogJ2dsb2JhbFZhbHVlJyB9LCBiOiB7IGZyb206ICdyZWFkb25seScgfSwgYzogeyBjb25zdGFudDogMTQ1IH0gfSB9KQogICAgLy8gcHVibGljIG1ldGhvZFdpdGhEZWZhdWx0cyhhOiB1aW50NjQsIGI6IHVpbnQ2NCwgYzogdWludDY0KTogdWludDY0IHsKICAgIHByb3RvIDMgMQogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FiaS1kZWNvcmF0b3JzLmFsZ28udHM6MjAKICAgIC8vIHJldHVybiBhICogYiArIGMKICAgIGZyYW1lX2RpZyAtMwogICAgZnJhbWVfZGlnIC0yCiAgICAqCiAgICBmcmFtZV9kaWcgLTEKICAgICsKICAgIHJldHN1Ygo=", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWJpLWRlY29yYXRvcnMuYWxnby50czo6QWJpRGVjb3JhdG9ycy5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/abi-decorators/AbiDecorators.arc56.json b/tests/approvals/out/abi-decorators/AbiDecorators.arc56.json new file mode 100644 index 00000000..e95fb14e --- /dev/null +++ b/tests/approvals/out/abi-decorators/AbiDecorators.arc56.json @@ -0,0 +1,190 @@ +{ + "name": "AbiDecorators", + "structs": {}, + "methods": [ + { + "name": "justNoop", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "createMethod", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "allActions", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp", + "OptIn", + "CloseOut", + "DeleteApplication", + "UpdateApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "overrideReadonlyName", + "args": [], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": true, + "events": [], + "recommendations": {} + }, + { + "name": "methodWithDefaults", + "args": [ + { + "type": "uint64", + "name": "a", + "defaultValue": { + "source": "global", + "data": "Z2xvYmFsVmFsdWU=", + "type": "AVMString" + } + }, + { + "type": "uint64", + "name": "b", + "defaultValue": { + "source": "method", + "data": "readonly()uint64" + } + }, + { + "type": "uint64", + "name": "c" + } + ], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 1, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "globalValue": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "Z2xvYmFsVmFsdWU=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 108, + 123, + 148, + 168 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 128 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 113, + 138, + 153, + 173 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWJpLWRlY29yYXRvcnMuYWxnby50czo6QWJpRGVjb3JhdG9ycy5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRj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1lbnRzOiB7IGE6IHsgZnJvbTogJ2dsb2JhbFZhbHVlJyB9LCBiOiB7IGZyb206ICdyZWFkb25seScgfSwgYzogeyBjb25zdGFudDogMTQ1IH0gfSB9KQogICAgLy8gcHVibGljIG1ldGhvZFdpdGhEZWZhdWx0cyhhOiB1aW50NjQsIGI6IHVpbnQ2NCwgYzogdWludDY0KTogdWludDY0IHsKICAgIHByb3RvIDMgMQogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FiaS1kZWNvcmF0b3JzLmFsZ28udHM6MjAKICAgIC8vIHJldHVybiBhICogYiArIGMKICAgIGZyYW1lX2RpZyAtMwogICAgZnJhbWVfZGlnIC0yCiAgICAqCiAgICBmcmFtZV9kaWcgLTEKICAgICsKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWJpLWRlY29yYXRvcnMuYWxnby50czo6QWJpRGVjb3JhdG9ycy5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/abi-decorators/AbiDecorators.clear.teal b/tests/approvals/out/abi-decorators/AbiDecorators.clear.teal new file mode 100644 index 00000000..2998c6e5 --- /dev/null +++ b/tests/approvals/out/abi-decorators/AbiDecorators.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/abi-decorators.algo.ts::AbiDecorators.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/abi-decorators/AbiDecorators.ssa.ir b/tests/approvals/out/abi-decorators/AbiDecorators.ssa.ir index d5ea9aab..0c34977e 100644 --- a/tests/approvals/out/abi-decorators/AbiDecorators.ssa.ir +++ b/tests/approvals/out/abi-decorators/AbiDecorators.ssa.ir @@ -27,34 +27,34 @@ contract tests/approvals/abi-decorators.algo.ts::AbiDecorators: block@2: // justNoop_route_L5 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // is not creating + (assert tmp%6#0) // can only call when not creating tests/approvals/abi-decorators.algo.ts::AbiDecorators.justNoop() return 1u block@3: // createMethod_route_L7 let tmp%7#0: uint64 = (txn OnCompletion) let tmp%8#0: bool = (== tmp%7#0 NoOp) - (assert tmp%8#0) // OnCompletion is NoOp + (assert tmp%8#0) // OnCompletion is not NoOp let tmp%9#0: uint64 = (txn ApplicationID) let tmp%10#0: bool = (== tmp%9#0 0u) - (assert tmp%10#0) // is creating + (assert tmp%10#0) // can only call when creating tests/approvals/abi-decorators.algo.ts::AbiDecorators.createMethod() return 1u block@4: // allActions_route_L9 let tmp%11#0: uint64 = (txn ApplicationID) let tmp%12#0: bool = (!= tmp%11#0 0u) - (assert tmp%12#0) // is not creating + (assert tmp%12#0) // can only call when not creating tests/approvals/abi-decorators.algo.ts::AbiDecorators.allActions() return 1u block@5: // overrideReadonlyName_route_L11 let tmp%13#0: uint64 = (txn OnCompletion) let tmp%14#0: bool = (== tmp%13#0 NoOp) - (assert tmp%14#0) // OnCompletion is NoOp + (assert tmp%14#0) // OnCompletion is not NoOp let tmp%15#0: uint64 = (txn ApplicationID) let tmp%16#0: bool = (!= tmp%15#0 0u) - (assert tmp%16#0) // is not creating + (assert tmp%16#0) // can only call when not creating let to_encode%0#0: uint64 = tests/approvals/abi-decorators.algo.ts::AbiDecorators.readonly() let val_as_bytes%0#0: bytes = (itob to_encode%0#0) let tmp%17#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) @@ -63,10 +63,10 @@ contract tests/approvals/abi-decorators.algo.ts::AbiDecorators: block@6: // methodWithDefaults_route_L18 let tmp%18#0: uint64 = (txn OnCompletion) let tmp%19#0: bool = (== tmp%18#0 NoOp) - (assert tmp%19#0) // OnCompletion is NoOp + (assert tmp%19#0) // OnCompletion is not NoOp let tmp%20#0: uint64 = (txn ApplicationID) let tmp%21#0: bool = (!= tmp%20#0 0u) - (assert tmp%21#0) // is not creating + (assert tmp%21#0) // can only call when not creating let tmp%22#0: bytes = (txna ApplicationArgs 1) let tmp%23#0: uint64 = (btoi tmp%22#0) let tmp%24#0: bytes = (txna ApplicationArgs 2) diff --git a/tests/approvals/out/abi-decorators/abi-decorators.awst b/tests/approvals/out/abi-decorators/abi-decorators.awst index e42f0290..79c33284 100644 --- a/tests/approvals/out/abi-decorators/abi-decorators.awst +++ b/tests/approvals/out/abi-decorators/abi-decorators.awst @@ -46,11 +46,11 @@ contract AbiDecorators Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/abi-decorators/abi-decorators.awst.json b/tests/approvals/out/abi-decorators/abi-decorators.awst.json index 47fa1b1b..216895b3 100644 --- a/tests/approvals/out/abi-decorators/abi-decorators.awst.json +++ b/tests/approvals/out/abi-decorators/abi-decorators.awst.json @@ -109,8 +109,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -942,7 +941,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -984,42 +1018,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1029,7 +1028,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -1082,6 +1081,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/accounts/AccountsContract.approval.teal b/tests/approvals/out/accounts/AccountsContract.approval.teal new file mode 100644 index 00000000..0ed09168 --- /dev/null +++ b/tests/approvals/out/accounts/AccountsContract.approval.teal @@ -0,0 +1,1388 @@ +#pragma version 10 + +tests/approvals/accounts.algo.ts::AccountsContract.approvalProgram: + intcblock 0 1 93 + bytecblock 0x00 0x068101 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/accounts.algo.ts::AccountsContract.constructor() -> void: +constructor: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + proto 0 0 + retsub + + +// tests/approvals/accounts.algo.ts::AccountsContract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@5 + txna ApplicationArgs 0 + pushbytes 0xdfe9a035 // method "getAccountInfo(account,asset)(byte[],uint64,uint64,byte[],uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,bool,bool)" + swap + match __puya_arc4_router___getAccountInfo_route@2 + b __puya_arc4_router___switch_case_default@3 + +__puya_arc4_router___getAccountInfo_route@2: + // tests/approvals/accounts.algo.ts:5 + // public getAccountInfo(account: Account, asset: Asset) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + txna ApplicationArgs 1 + btoi + txnas Accounts + txna ApplicationArgs 2 + btoi + txnas Assets + // tests/approvals/accounts.algo.ts:5 + // public getAccountInfo(account: Account, asset: Asset) { + callsub getAccountInfo + cover 14 + cover 13 + cover 12 + cover 11 + cover 10 + cover 9 + cover 8 + cover 7 + cover 6 + cover 5 + cover 4 + cover 3 + cover 2 + swap + dup + len + itob + extract 6 2 + swap + concat + cover 11 + itob + cover 12 + itob + cover 12 + dup + len + itob + extract 6 2 + swap + concat + cover 14 + itob + cover 9 + itob + cover 10 + itob + cover 11 + itob + cover 11 + itob + cover 12 + itob + cover 12 + itob + cover 12 + itob + cover 12 + swap + itob + cover 12 + bytec_0 // 0x00 + intc_0 // 0 + uncover 9 + setbit + cover 11 + bytec_0 // 0x00 + intc_0 // 0 + uncover 15 + setbit + cover 9 + intc_2 // 93 + itob + extract 6 2 + pushbytes 0x + swap + concat + dig 1 + len + intc_2 // 93 + + + swap + uncover 4 + concat + uncover 5 + concat + swap + itob + extract 6 2 + concat + uncover 2 + concat + uncover 2 + concat + uncover 2 + concat + uncover 2 + concat + uncover 2 + concat + uncover 2 + concat + uncover 3 + concat + uncover 3 + concat + uncover 4 + concat + uncover 3 + concat + uncover 2 + intc_0 // 0 + getbit + swap + pushint 737 // 737 + uncover 2 + setbit + swap + concat + swap + concat + pushbytes 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@3: + b __puya_arc4_router___after_if_else@9 + +__puya_arc4_router___bare_routing@5: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@6 + b __puya_arc4_router___switch_case_default@7 + +__puya_arc4_router_____algots__.defaultCreate@6: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@7: + +__puya_arc4_router___after_if_else@9: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/accounts.algo.ts::AccountsContract.getAccountInfo(account: bytes, asset: uint64) -> bytes, uint64, uint64, bytes, uint64, uint64, uint64, uint64, uint64, uint64, uint64, uint64, uint64, uint64, uint64: +getAccountInfo: + // tests/approvals/accounts.algo.ts:5 + // public getAccountInfo(account: Account, asset: Asset) { + proto 2 15 + // tests/approvals/accounts.algo.ts:6 + // ensureBudget(1400) + pushint 1400 // 1400 + intc_0 // 0 + callsub ensure_budget + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:21 + // isOptInApp: account.isOptedIn(Global.currentApplicationId), + global CurrentApplicationID + frame_dig -2 + swap + app_opted_in + // tests/approvals/accounts.algo.ts:9 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:22 + // isOptInAsset: account.isOptedIn(asset), + frame_dig -2 + frame_dig -1 + asset_holding_get AssetBalance + bury 1 + // tests/approvals/accounts.algo.ts:7-23 + // return { + // bytes: account.bytes, + // balance: account.balance, + // minBalance: account.minBalance, + // authAddress: account.authAddress.bytes, + // totalNumUint: account.totalNumUint, + // totalNumByteSlice: account.totalNumByteSlice, + // totalExtraAppPages: account.totalExtraAppPages, + // totalAppsCreated: account.totalAppsCreated, + // totalAppsOptedIn: account.totalAppsOptedIn, + // totalAssetsCreated: account.totalAssetsCreated, + // totalAssets: account.totalAssets, + // totalBoxes: account.totalBoxes, + // totalBoxBytes: account.totalBoxBytes, + // isOptInApp: account.isOptedIn(Global.currentApplicationId), + // isOptInAsset: account.isOptedIn(asset), + // } + frame_dig -2 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + retsub + + +// tests/approvals/accounts.algo.ts::AccountsContract.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + proto 0 0 + retsub + + +// _puya_lib.util.ensure_budget(required_budget: uint64, fee_source: uint64) -> void: +ensure_budget: + proto 2 0 + frame_dig -2 + pushint 10 // 10 + + + +ensure_budget_while_top@1: + global OpcodeBudget + frame_dig 0 + < + bz ensure_budget_after_while@7 + itxn_begin + pushint 6 // appl + itxn_field TypeEnum + pushint 5 // DeleteApplication + itxn_field OnCompletion + bytec_1 // 0x068101 + itxn_field ApprovalProgram + bytec_1 // 0x068101 + itxn_field ClearStateProgram + intc_0 // 0 + intc_1 // 1 + frame_dig -1 + match ensure_budget_switch_case_0@3 ensure_budget_switch_case_1@4 + b ensure_budget_switch_case_default@5 + +ensure_budget_switch_case_0@3: + intc_0 // 0 + itxn_field Fee + b ensure_budget_switch_case_next@6 + +ensure_budget_switch_case_1@4: + global MinTxnFee + itxn_field Fee + b ensure_budget_switch_case_next@6 + +ensure_budget_switch_case_default@5: + +ensure_budget_switch_case_next@6: + itxn_submit + b ensure_budget_while_top@1 + +ensure_budget_after_while@7: + retsub diff --git a/tests/approvals/out/accounts/AccountsContract.arc32.json b/tests/approvals/out/accounts/AccountsContract.arc32.json index 7e8a065d..451e0815 100644 --- a/tests/approvals/out/accounts/AccountsContract.arc32.json +++ b/tests/approvals/out/accounts/AccountsContract.arc32.json @@ -6,7 +6,7 @@ }, "structs": { "output": { - "name": "", + "name": "getAccountInfoResult", "elements": [ [ "bytes", @@ -74,7 +74,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo6QWNjb3VudHNDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo6QWNjb3VudHNDb250cmFjdC5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo0CiAgICAvLyBleHBvcnQgY2xhc3MgQWNjb3VudHNDb250cmFjdCBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJ6IF9fcHV5YV9hcmM0X3JvdXRlcl9fX2JhcmVfcm91dGluZ0A1CiAgICBwdXNoYnl0ZXMgMHhkZmU5YTAzNSAvLyBtZXRob2QgImdldEFjY291bnRJbmZvKGFjY291bnQsYXNzZXQpKGJ5dGVbXSx1aW50NjQsdWludDY0LGJ5dGVbXSx1aW50NjQsdWludDY0LHVpbnQ2NCx1aW50NjQsdWludDY0LHVpbnQ2NCx1aW50NjQsdWludDY0LHVpbnQ2NCxib29sLGJvb2wpIgogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMAogICAgbWF0Y2ggX19wdXlhX2FyYzRfcm91dGVyX19fZ2V0QWNjb3VudEluZm9fcm91dGVAMgogICAgaW50Y18wIC8vIDAKICAgIHJldHN1YgoKX19wdXlhX2FyYzRfcm91dGVyX19fZ2V0QWNjb3VudEluZm9fcm91dGVAMjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hY2NvdW50cy5h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mNvdmVyIDE0CiAgICBpdG9iCiAgICB1bmNvdmVyIDE0CiAgICBpdG9iCiAgICB1bmNvdmVyIDE0CiAgICBpdG9iCiAgICB1bmNvdmVyIDE0CiAgICBpdG9iCiAgICBwdXNoYnl0ZXMgMHgwMAogICAgaW50Y18wIC8vIDAKICAgIHVuY292ZXIgMTYKICAgIHNldGJpdAogICAgcHVzaGJ5dGVzIDB4MDAKICAgIGludGNfMCAvLyAwCiAgICB1bmNvdmVyIDE2CiAgICBzZXRiaXQKICAgIGRpZyAxNAogICAgbGVuCiAgICBwdXNoaW50IDkzIC8vIDkzCiAgICArCiAgICBwdXNoYnl0ZXMgMHgwMDVkCiAgICB1bmNvdmVyIDE1CiAgICBjb25jYXQKICAgIHVuY292ZXIgMTQKICAgIGNvbmNhdAogICAgc3dhcAogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAxMQogICAgY29uY2F0CiAgICB1bmNvdmVyIDEwCiAgICBjb25jYXQKICAgIHVuY292ZXIgOQogICAgY29uY2F0CiAgICB1bmNvdmVyIDgKICAgIGNvbmNhdAogICAgdW5jb3ZlciA3CiAgICBjb25jYXQKICAgIHVuY292ZXIgNgogICAgY29uY2F0CiAgICB1bmNvdmVyIDUKICAgIGNvbmNhdAogICAgdW5jb3ZlciA0CiAgICBjb25jYXQKICAgIHVuY292ZXIgMwogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgc3dhcAogICAgaW50Y18wIC8vIDAKICAgIGdldGJpdAogICAgcHVzaGludCA3MzcgLy8gNzM3CiAgICBzd2FwCiAgICBzZXRiaXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHB1c2hieXRlcyAweDE1MWY3Yzc1CiAgICBzd2FwCiAgICBjb25jYXQKICAgIGxvZwogICAgaW50Y18xIC8vIDEKICAgIHJldHN1YgoKX19wdXlhX2FyYzRfcm91dGVy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3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/accounts/AccountsContract.arc56.json b/tests/approvals/out/accounts/AccountsContract.arc56.json new file mode 100644 index 00000000..16ff0c23 --- /dev/null +++ b/tests/approvals/out/accounts/AccountsContract.arc56.json @@ -0,0 +1,348 @@ +{ + "name": "AccountsContract", + "structs": { + "getAccountInfoResult": [ + { + "name": "bytes", + "type": "byte[]" + }, + { + "name": "balance", + "type": "uint64" + }, + { + "name": "minBalance", + "type": "uint64" + }, + { + "name": "authAddress", + "type": "byte[]" + }, + { + "name": "totalNumUint", + "type": "uint64" + }, + { + "name": "totalNumByteSlice", + "type": "uint64" + }, + { + "name": "totalExtraAppPages", + "type": "uint64" + }, + { + "name": "totalAppsCreated", + "type": "uint64" + }, + { + "name": "totalAppsOptedIn", + "type": "uint64" + }, + { + "name": "totalAssetsCreated", + "type": "uint64" + }, + { + "name": "totalAssets", + "type": "uint64" + }, + { + "name": "totalBoxes", + "type": "uint64" + }, + { + "name": "totalBoxBytes", + "type": "uint64" + }, + { + "name": "isOptInApp", + "type": "bool" + }, + { + "name": "isOptInAsset", + "type": "bool" + } + ] + }, + "methods": [ + { + "name": "getAccountInfo", + "args": [ + { + "type": "account", + "name": "account" + }, + { + "type": "asset", + "name": "asset" + } + ], + "returns": { + "type": "(byte[],uint64,uint64,byte[],uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,bool,bool)", + "struct": "getAccountInfoResult" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 61 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 302, + 309, + 316, + 323, + 330, + 337, + 344, + 351, + 358, + 365, + 372, + 379, + 384, + 391, + 398, + 405, + 412, + 419, + 426, + 433, + 440, + 447, + 454, + 461, + 468, + 473, + 480, + 487, + 494, + 501, + 508, + 515, + 522, + 529, + 536, + 543, + 550, + 557, + 562, + 569, + 576, + 583, + 590, + 597, + 604, + 611, + 618, + 625, + 632, + 639, + 646, + 651, + 658, + 665, + 672, + 679, + 686, + 693, + 700, + 707, + 714, + 721, + 728, + 735, + 740, + 747, + 754, + 761, + 768, + 775, + 782, + 789, + 796, + 803, + 810, + 817, + 824, + 829, + 836, + 843, + 850, + 857, + 864, + 871, + 878, + 885, + 892, + 899, + 906, + 913, + 918, + 925, + 932, + 939, + 946, + 953, + 960, + 967, + 974, + 981, + 988, + 995, + 1002, + 1007, + 1014, + 1021, + 1028, + 1035, + 1042, + 1049, + 1056, + 1063, + 1070, + 1077, + 1084, + 1091, + 1096, + 1103, + 1110, + 1117, + 1124, + 1131, + 1138, + 1145, + 1152, + 1159, + 1166, + 1173, + 1180, + 1185, + 1192, + 1199, + 1206, + 1213, + 1220, + 1227, + 1234, + 1241, + 1248, + 1255, + 1262, + 1269, + 1274, + 1281, + 1288, + 1295, + 1302, + 1309, + 1316, + 1323, + 1330, + 1337, + 1344, + 1351, + 1358, + 1363, + 1370, + 1377, + 1384, + 1391, + 1398, + 1405, + 1412, + 1419, + 1426, + 1433, + 1440, + 1447, + 1460, + 1467, + 1474, + 1481, + 1488, + 1495, + 1502, + 1509, + 1516, + 1523, + 1530, + 1537 + ], + "errorMessage": "account funded" + }, + { + "pc": [ + 278 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 66 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { +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EFzc2V0cwogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FjY291bnRzLmFsZ28udHM6NQogICAgLy8gcHVibGljIGdldEFjY291bnRJbmZvKGFjY291bnQ6IEFjY291bnQsIGFzc2V0OiBBc3NldCkgewogICAgY2FsbHN1YiBnZXRBY2NvdW50SW5mbwogICAgY292ZXIgMTQKICAgIGNvdmVyIDEzCiAgICBjb3ZlciAxMgogICAgY292ZXIgMTEKICAgIGNvdmVyIDEwCiAgICBjb3ZlciA5CiAgICBjb3ZlciA4CiAgICBjb3ZlciA3CiAgICBjb3ZlciA2CiAgICBjb3ZlciA1CiAgICBjb3ZlciA0CiAgICBjb3ZlciAzCiAgICBjb3ZlciAyCiAgICBzd2FwCiAgICBkdXAKICAgIGxlbgogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHN3YXAKICAgIGNvbmNhdAogICAgY292ZXIgMTEKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgZHVwCiAgICBsZW4KICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBzd2FwCiAgICBjb25jYXQKICAgIGNvdmVyIDE0CiAgICBpdG9iCiAgICBjb3ZlciA5CiAgICBpdG9iCiAgICBjb3ZlciAxMAogICAgaXRvYgogICAgY292ZXIgMTEKICAgIGl0b2IKICAgIGNvdmVyIDExCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgc3dhcAogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGJ5dGVjXzAgLy8gMHgwMAogICAgaW50Y18wIC8vIDAKICAgIHVuY292ZXIgOQogICAgc2V0Yml0CiAgICBjb3ZlciAxMQogICAgYnl0ZWNfMCAvLyAweDAwCiAgICBpbnRjXzAgLy8gMAogICAgdW5jb3ZlciAxNQogICAgc2V0Yml0CiAgICBjb3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IDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo6QWNjb3VudHNDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/accounts/AccountsContract.clear.teal b/tests/approvals/out/accounts/AccountsContract.clear.teal new file mode 100644 index 00000000..c5fc9c10 --- /dev/null +++ b/tests/approvals/out/accounts/AccountsContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/accounts.algo.ts::AccountsContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/accounts/AccountsContract.ssa.ir b/tests/approvals/out/accounts/AccountsContract.ssa.ir index 9def3d5e..ec59adcc 100644 --- a/tests/approvals/out/accounts/AccountsContract.ssa.ir +++ b/tests/approvals/out/accounts/AccountsContract.ssa.ir @@ -26,10 +26,10 @@ contract tests/approvals/accounts.algo.ts::AccountsContract: block@2: // getAccountInfo_route_L5 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // is not creating + (assert tmp%6#0) // can only call when not creating let tmp%7#0: bytes = (txna ApplicationArgs 1) let tmp%8#0: uint64 = (btoi tmp%7#0) let tmp%9#0: bytes = ((txnas Accounts) tmp%8#0) @@ -99,7 +99,7 @@ contract tests/approvals/accounts.algo.ts::AccountsContract: block@6: // __algots__.defaultCreate_L4 let tmp%15#0: uint64 = (txn ApplicationID) let tmp%16#0: bool = (== tmp%15#0 0u) - (assert tmp%16#0) // is creating + (assert tmp%16#0) // can only call when creating tests/approvals/accounts.algo.ts::AccountsContract.__algots__.defaultCreate() return 1u block@7: // switch_case_default_L4 @@ -111,6 +111,7 @@ contract tests/approvals/accounts.algo.ts::AccountsContract: subroutine tests/approvals/accounts.algo.ts::AccountsContract.getAccountInfo(account: bytes, asset: uint64) -> : block@0: // L5 + _puya_lib.util.ensure_budget(1400u, 0u) let (value%0#0: uint64, check%0#0: bool) = ((acct_params_get AcctBalance) account#0) (assert check%0#0) // account funded let (value%1#0: uint64, check%1#0: bool) = ((acct_params_get AcctMinBalance) account#0) @@ -138,11 +139,419 @@ contract tests/approvals/accounts.algo.ts::AccountsContract: let tmp%0#0: uint64 = (global CurrentApplicationID) let tmp%1#0: bool = (app_opted_in account#0 tmp%0#0) let (tmp%2#0: uint64, tmp%3#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) - return account#0 value%0#0 value%1#0 value%2#0 value%3#0 value%4#0 value%5#0 value%6#0 value%7#0 value%8#0 value%9#0 value%10#0 value%11#0 tmp%1#0 tmp%3#0 + let (value%12#0: uint64, check%12#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%12#0) // account funded + let (value%13#0: uint64, check%13#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%13#0) // account funded + let (value%14#0: bytes, check%14#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%14#0) // account funded + let (value%15#0: uint64, check%15#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%15#0) // account funded + let (value%16#0: uint64, check%16#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%16#0) // account funded + let (value%17#0: uint64, check%17#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%17#0) // account funded + let (value%18#0: uint64, check%18#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%18#0) // account funded + let (value%19#0: uint64, check%19#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%19#0) // account funded + let (value%20#0: uint64, check%20#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%20#0) // account funded + let (value%21#0: uint64, check%21#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%21#0) // account funded + let (value%22#0: uint64, check%22#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%22#0) // account funded + let (value%23#0: uint64, check%23#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%23#0) // account funded + let tmp%4#0: uint64 = (global CurrentApplicationID) + let tmp%5#0: bool = (app_opted_in account#0 tmp%4#0) + let (tmp%6#0: uint64, tmp%7#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%24#0: uint64, check%24#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%24#0) // account funded + let (value%25#0: uint64, check%25#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%25#0) // account funded + let (value%26#0: bytes, check%26#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%26#0) // account funded + let (value%27#0: uint64, check%27#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%27#0) // account funded + let (value%28#0: uint64, check%28#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%28#0) // account funded + let (value%29#0: uint64, check%29#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%29#0) // account funded + let (value%30#0: uint64, check%30#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%30#0) // account funded + let (value%31#0: uint64, check%31#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%31#0) // account funded + let (value%32#0: uint64, check%32#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%32#0) // account funded + let (value%33#0: uint64, check%33#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%33#0) // account funded + let (value%34#0: uint64, check%34#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%34#0) // account funded + let (value%35#0: uint64, check%35#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%35#0) // account funded + let tmp%8#0: uint64 = (global CurrentApplicationID) + let tmp%9#0: bool = (app_opted_in account#0 tmp%8#0) + let (tmp%10#0: uint64, tmp%11#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%36#0: uint64, check%36#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%36#0) // account funded + let (value%37#0: uint64, check%37#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%37#0) // account funded + let (value%38#0: bytes, check%38#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%38#0) // account funded + let (value%39#0: uint64, check%39#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%39#0) // account funded + let (value%40#0: uint64, check%40#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%40#0) // account funded + let (value%41#0: uint64, check%41#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%41#0) // account funded + let (value%42#0: uint64, check%42#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%42#0) // account funded + let (value%43#0: uint64, check%43#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%43#0) // account funded + let (value%44#0: uint64, check%44#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%44#0) // account funded + let (value%45#0: uint64, check%45#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%45#0) // account funded + let (value%46#0: uint64, check%46#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%46#0) // account funded + let (value%47#0: uint64, check%47#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%47#0) // account funded + let tmp%12#0: uint64 = (global CurrentApplicationID) + let tmp%13#0: bool = (app_opted_in account#0 tmp%12#0) + let (tmp%14#0: uint64, tmp%15#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%48#0: uint64, check%48#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%48#0) // account funded + let (value%49#0: uint64, check%49#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%49#0) // account funded + let (value%50#0: bytes, check%50#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%50#0) // account funded + let (value%51#0: uint64, check%51#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%51#0) // account funded + let (value%52#0: uint64, check%52#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%52#0) // account funded + let (value%53#0: uint64, check%53#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%53#0) // account funded + let (value%54#0: uint64, check%54#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%54#0) // account funded + let (value%55#0: uint64, check%55#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%55#0) // account funded + let (value%56#0: uint64, check%56#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%56#0) // account funded + let (value%57#0: uint64, check%57#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%57#0) // account funded + let (value%58#0: uint64, check%58#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%58#0) // account funded + let (value%59#0: uint64, check%59#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%59#0) // account funded + let tmp%16#0: uint64 = (global CurrentApplicationID) + let tmp%17#0: bool = (app_opted_in account#0 tmp%16#0) + let (tmp%18#0: uint64, tmp%19#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%60#0: uint64, check%60#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%60#0) // account funded + let (value%61#0: uint64, check%61#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%61#0) // account funded + let (value%62#0: bytes, check%62#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%62#0) // account funded + let (value%63#0: uint64, check%63#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%63#0) // account funded + let (value%64#0: uint64, check%64#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%64#0) // account funded + let (value%65#0: uint64, check%65#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%65#0) // account funded + let (value%66#0: uint64, check%66#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%66#0) // account funded + let (value%67#0: uint64, check%67#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%67#0) // account funded + let (value%68#0: uint64, check%68#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%68#0) // account funded + let (value%69#0: uint64, check%69#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%69#0) // account funded + let (value%70#0: uint64, check%70#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%70#0) // account funded + let (value%71#0: uint64, check%71#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%71#0) // account funded + let tmp%20#0: uint64 = (global CurrentApplicationID) + let tmp%21#0: bool = (app_opted_in account#0 tmp%20#0) + let (tmp%22#0: uint64, tmp%23#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%72#0: uint64, check%72#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%72#0) // account funded + let (value%73#0: uint64, check%73#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%73#0) // account funded + let (value%74#0: bytes, check%74#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%74#0) // account funded + let (value%75#0: uint64, check%75#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%75#0) // account funded + let (value%76#0: uint64, check%76#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%76#0) // account funded + let (value%77#0: uint64, check%77#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%77#0) // account funded + let (value%78#0: uint64, check%78#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%78#0) // account funded + let (value%79#0: uint64, check%79#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%79#0) // account funded + let (value%80#0: uint64, check%80#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%80#0) // account funded + let (value%81#0: uint64, check%81#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%81#0) // account funded + let (value%82#0: uint64, check%82#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%82#0) // account funded + let (value%83#0: uint64, check%83#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%83#0) // account funded + let tmp%24#0: uint64 = (global CurrentApplicationID) + let tmp%25#0: bool = (app_opted_in account#0 tmp%24#0) + let (tmp%26#0: uint64, tmp%27#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%84#0: uint64, check%84#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%84#0) // account funded + let (value%85#0: uint64, check%85#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%85#0) // account funded + let (value%86#0: bytes, check%86#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%86#0) // account funded + let (value%87#0: uint64, check%87#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%87#0) // account funded + let (value%88#0: uint64, check%88#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%88#0) // account funded + let (value%89#0: uint64, check%89#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%89#0) // account funded + let (value%90#0: uint64, check%90#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%90#0) // account funded + let (value%91#0: uint64, check%91#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%91#0) // account funded + let (value%92#0: uint64, check%92#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%92#0) // account funded + let (value%93#0: uint64, check%93#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%93#0) // account funded + let (value%94#0: uint64, check%94#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%94#0) // account funded + let (value%95#0: uint64, check%95#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%95#0) // account funded + let tmp%28#0: uint64 = (global CurrentApplicationID) + let tmp%29#0: bool = (app_opted_in account#0 tmp%28#0) + let (tmp%30#0: uint64, tmp%31#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%96#0: uint64, check%96#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%96#0) // account funded + let (value%97#0: uint64, check%97#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%97#0) // account funded + let (value%98#0: bytes, check%98#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%98#0) // account funded + let (value%99#0: uint64, check%99#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%99#0) // account funded + let (value%100#0: uint64, check%100#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%100#0) // account funded + let (value%101#0: uint64, check%101#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%101#0) // account funded + let (value%102#0: uint64, check%102#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%102#0) // account funded + let (value%103#0: uint64, check%103#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%103#0) // account funded + let (value%104#0: uint64, check%104#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%104#0) // account funded + let (value%105#0: uint64, check%105#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%105#0) // account funded + let (value%106#0: uint64, check%106#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%106#0) // account funded + let (value%107#0: uint64, check%107#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%107#0) // account funded + let tmp%32#0: uint64 = (global CurrentApplicationID) + let tmp%33#0: bool = (app_opted_in account#0 tmp%32#0) + let (tmp%34#0: uint64, tmp%35#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%108#0: uint64, check%108#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%108#0) // account funded + let (value%109#0: uint64, check%109#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%109#0) // account funded + let (value%110#0: bytes, check%110#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%110#0) // account funded + let (value%111#0: uint64, check%111#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%111#0) // account funded + let (value%112#0: uint64, check%112#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%112#0) // account funded + let (value%113#0: uint64, check%113#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%113#0) // account funded + let (value%114#0: uint64, check%114#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%114#0) // account funded + let (value%115#0: uint64, check%115#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%115#0) // account funded + let (value%116#0: uint64, check%116#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%116#0) // account funded + let (value%117#0: uint64, check%117#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%117#0) // account funded + let (value%118#0: uint64, check%118#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%118#0) // account funded + let (value%119#0: uint64, check%119#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%119#0) // account funded + let tmp%36#0: uint64 = (global CurrentApplicationID) + let tmp%37#0: bool = (app_opted_in account#0 tmp%36#0) + let (tmp%38#0: uint64, tmp%39#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%120#0: uint64, check%120#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%120#0) // account funded + let (value%121#0: uint64, check%121#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%121#0) // account funded + let (value%122#0: bytes, check%122#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%122#0) // account funded + let (value%123#0: uint64, check%123#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%123#0) // account funded + let (value%124#0: uint64, check%124#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%124#0) // account funded + let (value%125#0: uint64, check%125#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%125#0) // account funded + let (value%126#0: uint64, check%126#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%126#0) // account funded + let (value%127#0: uint64, check%127#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%127#0) // account funded + let (value%128#0: uint64, check%128#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%128#0) // account funded + let (value%129#0: uint64, check%129#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%129#0) // account funded + let (value%130#0: uint64, check%130#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%130#0) // account funded + let (value%131#0: uint64, check%131#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%131#0) // account funded + let tmp%40#0: uint64 = (global CurrentApplicationID) + let tmp%41#0: bool = (app_opted_in account#0 tmp%40#0) + let (tmp%42#0: uint64, tmp%43#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%132#0: uint64, check%132#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%132#0) // account funded + let (value%133#0: uint64, check%133#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%133#0) // account funded + let (value%134#0: bytes, check%134#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%134#0) // account funded + let (value%135#0: uint64, check%135#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%135#0) // account funded + let (value%136#0: uint64, check%136#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%136#0) // account funded + let (value%137#0: uint64, check%137#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%137#0) // account funded + let (value%138#0: uint64, check%138#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%138#0) // account funded + let (value%139#0: uint64, check%139#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%139#0) // account funded + let (value%140#0: uint64, check%140#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%140#0) // account funded + let (value%141#0: uint64, check%141#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%141#0) // account funded + let (value%142#0: uint64, check%142#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%142#0) // account funded + let (value%143#0: uint64, check%143#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%143#0) // account funded + let tmp%44#0: uint64 = (global CurrentApplicationID) + let tmp%45#0: bool = (app_opted_in account#0 tmp%44#0) + let (tmp%46#0: uint64, tmp%47#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%144#0: uint64, check%144#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%144#0) // account funded + let (value%145#0: uint64, check%145#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%145#0) // account funded + let (value%146#0: bytes, check%146#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%146#0) // account funded + let (value%147#0: uint64, check%147#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%147#0) // account funded + let (value%148#0: uint64, check%148#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%148#0) // account funded + let (value%149#0: uint64, check%149#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%149#0) // account funded + let (value%150#0: uint64, check%150#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%150#0) // account funded + let (value%151#0: uint64, check%151#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%151#0) // account funded + let (value%152#0: uint64, check%152#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%152#0) // account funded + let (value%153#0: uint64, check%153#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%153#0) // account funded + let (value%154#0: uint64, check%154#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%154#0) // account funded + let (value%155#0: uint64, check%155#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%155#0) // account funded + let tmp%48#0: uint64 = (global CurrentApplicationID) + let tmp%49#0: bool = (app_opted_in account#0 tmp%48#0) + let (tmp%50#0: uint64, tmp%51#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%156#0: uint64, check%156#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%156#0) // account funded + let (value%157#0: uint64, check%157#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%157#0) // account funded + let (value%158#0: bytes, check%158#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%158#0) // account funded + let (value%159#0: uint64, check%159#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%159#0) // account funded + let (value%160#0: uint64, check%160#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%160#0) // account funded + let (value%161#0: uint64, check%161#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%161#0) // account funded + let (value%162#0: uint64, check%162#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%162#0) // account funded + let (value%163#0: uint64, check%163#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%163#0) // account funded + let (value%164#0: uint64, check%164#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%164#0) // account funded + let (value%165#0: uint64, check%165#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%165#0) // account funded + let (value%166#0: uint64, check%166#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%166#0) // account funded + let (value%167#0: uint64, check%167#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%167#0) // account funded + let tmp%52#0: uint64 = (global CurrentApplicationID) + let tmp%53#0: bool = (app_opted_in account#0 tmp%52#0) + let (tmp%54#0: uint64, tmp%55#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%168#0: uint64, check%168#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%168#0) // account funded + let (value%169#0: uint64, check%169#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%169#0) // account funded + let (value%170#0: bytes, check%170#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%170#0) // account funded + let (value%171#0: uint64, check%171#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%171#0) // account funded + let (value%172#0: uint64, check%172#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%172#0) // account funded + let (value%173#0: uint64, check%173#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%173#0) // account funded + let (value%174#0: uint64, check%174#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%174#0) // account funded + let (value%175#0: uint64, check%175#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%175#0) // account funded + let (value%176#0: uint64, check%176#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%176#0) // account funded + let (value%177#0: uint64, check%177#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%177#0) // account funded + let (value%178#0: uint64, check%178#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%178#0) // account funded + let (value%179#0: uint64, check%179#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%179#0) // account funded + let tmp%56#0: uint64 = (global CurrentApplicationID) + let tmp%57#0: bool = (app_opted_in account#0 tmp%56#0) + let (tmp%58#0: uint64, tmp%59#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + return account#0 value%12#0 value%25#0 value%38#0 value%51#0 value%64#0 value%77#0 value%90#0 value%103#0 value%116#0 value%129#0 value%142#0 value%155#0 tmp%53#0 tmp%59#0 subroutine tests/approvals/accounts.algo.ts::AccountsContract.__algots__.defaultCreate() -> void: block@0: // L4 return + + subroutine _puya_lib.util.ensure_budget(required_budget: uint64, fee_source: uint64) -> void: + block@0: // L12 + let required_budget_with_buffer#0: uint64 = (+ required_budget#0 10u) + goto block@1 + block@1: // while_top_L20 + let tmp%0#0: uint64 = (global OpcodeBudget) + let tmp%1#0: bool = (> required_budget_with_buffer#0 tmp%0#0) + goto tmp%1#0 ? block@2 : block@7 + block@2: // while_body_L21 + itxn_begin + ((itxn_field TypeEnum) appl) + ((itxn_field OnCompletion) DeleteApplication) + ((itxn_field ApprovalProgram) 0x068101) + ((itxn_field ClearStateProgram) 0x068101) + switch fee_source#0 {0u => block@3, 1u => block@4, * => block@5} + block@3: // switch_case_0_L28 + ((itxn_field Fee) 0u) + goto block@6 + block@4: // switch_case_1_L30 + let tmp%2#0: uint64 = (global MinTxnFee) + ((itxn_field Fee) tmp%2#0) + goto block@6 + block@5: // switch_case_default_L26 + goto block@6 + block@6: // switch_case_next_L26 + itxn_submit + goto block@1 + block@7: // after_while_L20 + return program clear-state: subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: diff --git a/tests/approvals/out/accounts/accounts.awst b/tests/approvals/out/accounts/accounts.awst index 0d7eac48..d3510519 100644 --- a/tests/approvals/out/accounts/accounts.awst +++ b/tests/approvals/out/accounts/accounts.awst @@ -13,9 +13,10 @@ contract AccountsContract return True } - getAccountInfo(): { bytes: bytes, balance: uint64, minBalance: uint64, authAddress: bytes, totalNumUint: uint64, totalNumByteSlice: uint64, totalExtraAppPages: uint64, totalAppsCreated: uint64, totalAppsOptedIn: uint64, totalAssetsCreated: uint64, totalAssets: uint64, totalBoxes: uint64, totalBoxBytes: uint64, isOptInApp: bool, isOptInAsset: bool } + getAccountInfo(): getAccountInfoResult{ bytes: bytes, balance: uint64, minBalance: uint64, authAddress: bytes, totalNumUint: uint64, totalNumByteSlice: uint64, totalExtraAppPages: uint64, totalAppsCreated: uint64, totalAppsOptedIn: uint64, totalAssetsCreated: uint64, totalAssets: uint64, totalBoxes: uint64, totalBoxBytes: uint64, isOptInApp: bool, isOptInAsset: bool } { - return { bytes: reinterpret_cast(account), balance: checked_maybe(acct_params_get(account), comment=account funded), minBalance: checked_maybe(acct_params_get(account), comment=account funded), authAddress: reinterpret_cast(checked_maybe(acct_params_get(account), comment=account funded)), totalNumUint: checked_maybe(acct_params_get(account), comment=account funded), totalNumByteSlice: checked_maybe(acct_params_get(account), comment=account funded), totalExtraAppPages: checked_maybe(acct_params_get(account), comment=account funded), totalAppsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAppsOptedIn: checked_maybe(acct_params_get(account), comment=account funded), totalAssetsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAssets: checked_maybe(acct_params_get(account), comment=account funded), totalBoxes: checked_maybe(acct_params_get(account), comment=account funded), totalBoxBytes: checked_maybe(acct_params_get(account), comment=account funded), isOptInApp: app_opted_in(account, global()), isOptInAsset: asset_holding_get(account, asset).1 } + ensure_budget(1400, 0) + return { bytes: (#0 = { bytes: reinterpret_cast(account), balance: checked_maybe(acct_params_get(account), comment=account funded), minBalance: checked_maybe(acct_params_get(account), comment=account funded), authAddress: reinterpret_cast(checked_maybe(acct_params_get(account), comment=account funded)), totalNumUint: checked_maybe(acct_params_get(account), comment=account funded), totalNumByteSlice: checked_maybe(acct_params_get(account), comment=account funded), totalExtraAppPages: checked_maybe(acct_params_get(account), comment=account funded), totalAppsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAppsOptedIn: checked_maybe(acct_params_get(account), comment=account funded), totalAssetsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAssets: checked_maybe(acct_params_get(account), comment=account funded), totalBoxes: checked_maybe(acct_params_get(account), comment=account funded), totalBoxBytes: checked_maybe(acct_params_get(account), comment=account funded), isOptInApp: app_opted_in(account, global()), isOptInAsset: asset_holding_get(account, asset).1 }).bytes, balance: #0.balance, minBalance: #0.minBalance, authAddress: #0.authAddress, totalNumUint: #0.totalNumUint, totalNumByteSlice: #0.totalNumByteSlice, totalExtraAppPages: #0.totalExtraAppPages, totalAppsCreated: #0.totalAppsCreated, totalAppsOptedIn: #0.totalAppsOptedIn, totalAssetsCreated: #0.totalAssetsCreated, totalAssets: #0.totalAssets, totalBoxes: #0.totalBoxes, totalBoxBytes: #0.totalBoxBytes, isOptInApp: #0.isOptInApp, isOptInAsset: #0.isOptInAsset } } constructor(): void @@ -25,11 +26,11 @@ contract AccountsContract Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/accounts/accounts.awst.json b/tests/approvals/out/accounts/accounts.awst.json index e6f7c88c..ffd9d5f2 100644 --- a/tests/approvals/out/accounts/accounts.awst.json +++ b/tests/approvals/out/accounts/accounts.awst.json @@ -109,8 +109,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -346,7 +345,7 @@ ], "return_type": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/accounts.algo.ts::getAccountInfoResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -480,17 +479,93 @@ "source_location": { "file": "tests/approvals/accounts.algo.ts", "line": 5, - "end_line": 23, + "end_line": 24, "column": 56, "end_column": 3 }, "body": [ { - "_type": "ReturnStatement", + "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/accounts.algo.ts", "line": 6, - "end_line": 22, + "end_line": 6, + "column": 4, + "end_column": 22 + }, + "expr": { + "_type": "PuyaLibCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 6, + "column": 4, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "func": "ensure_budget", + "args": [ + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 6, + "column": 17, + "end_column": 21 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1400", + "teal_alias": null + } + }, + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 6, + "column": 4, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + } + } + ] + } + }, + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, "column": 4, "end_column": 5 }, @@ -498,14 +573,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/accounts.algo.ts::getAccountInfoResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -636,13 +711,13 @@ }, "items": [ { - "_type": "ReinterpretCast", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", "line": 7, - "end_line": 7, - "column": 13, - "end_column": 26 + "end_line": 23, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -651,57 +726,29 @@ "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", "line": 7, - "end_line": 7, - "column": 13, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "account" - } - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, - "column": 15, - "end_column": 30 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, - "column": 15, - "end_column": 30 + "end_line": 23, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "tuple", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, { "_type": "WType", "name": "uint64", @@ -711,73 +758,18 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctBalance" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, - "column": 15, - "end_column": 22 }, - "wtype": { + { "_type": "WType", - "name": "account", + "name": "bytes", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, - "column": 18, - "end_column": 36 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, - "column": 18, - "end_column": 36 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { "_type": "WType", "name": "uint64", @@ -787,166 +779,25 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctMinBalance" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, - "column": 18, - "end_column": 25 }, - "wtype": { + { "_type": "WType", - "name": "account", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, - "column": 19, - "end_column": 44 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, - "column": 19, - "end_column": 38 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, - "column": 19, - "end_column": 38 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctAuthAddr" - ], - "stack_args": [ { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, - "column": 19, - "end_column": 26 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - } - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, - "column": 20, - "end_column": 40 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, - "column": 20, - "end_column": 40 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, { "_type": "WType", "name": "uint64", @@ -956,73 +807,18 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalNumUint" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, - "column": 20, - "end_column": 27 }, - "wtype": { + { "_type": "WType", - "name": "account", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, - "column": 25, - "end_column": 50 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, - "column": 25, - "end_column": 50 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { "_type": "WType", "name": "uint64", @@ -1032,149 +828,19653 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalNumByteSlice" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, - "column": 25, - "end_column": 32 }, - "wtype": { + { "_type": "WType", - "name": "account", + "name": "bool", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, - "column": 26, - "end_column": 52 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, - "column": 26, - "end_column": 52 - }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "bytes" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "balance" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "minBalance" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "authAddress" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalNumUint" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalNumByteSlice" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalExtraAppPages" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalAppsCreated" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalAppsOptedIn" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalAssetsCreated" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalAssets" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalBoxes" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalBoxBytes" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, "wtype": { "_type": "WTuple", - "name": "tuple", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" }, { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" } ] }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalExtraAppPages" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, - "column": 26, - "end_column": 33 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "account" - } - ], - "comment": null + "id": "0" }, - "comment": "account funded" + "name": "isOptInApp" }, { - "_type": "CheckedMaybe", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, - "column": 24, - "end_column": 48 + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", - "name": "uint64", + "name": "bool", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, - "column": 24, - "end_column": 48 + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "tuple", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, { "_type": "WType", "name": "uint64", @@ -1184,73 +20484,18 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalAppsCreated" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, - "column": 24, - "end_column": 31 }, - "wtype": { + { "_type": "WType", - "name": "account", + "name": "bytes", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, - "column": 24, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, - "column": 24, - "end_column": 48 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { "_type": "WType", "name": "uint64", @@ -1260,73 +20505,11 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalAppsOptedIn" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, - "column": 24, - "end_column": 31 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, - "column": 26, - "end_column": 52 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, - "column": 26, - "end_column": 52 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { "_type": "WType", "name": "uint64", @@ -1336,73 +20519,18 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalAssetsCreated" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, - "column": 26, - "end_column": 33 }, - "wtype": { + { "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, - "column": 19, - "end_column": 38 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, - "column": 19, - "end_column": 38 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, { "_type": "WType", "name": "uint64", @@ -1412,73 +20540,18 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalAssets" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, - "column": 19, - "end_column": 26 }, - "wtype": { + { "_type": "WType", - "name": "account", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, - "column": 18, - "end_column": 36 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, - "column": 18, - "end_column": 36 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { "_type": "WType", "name": "uint64", @@ -1486,6 +20559,13 @@ "ephemeral": false, "scalar_type": 2 }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, { "_type": "WType", "name": "bool", @@ -1493,268 +20573,1277 @@ "ephemeral": false, "scalar_type": 2 } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" ] }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalBoxes" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, - "column": 18, - "end_column": 25 + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 28, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 33, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 32, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, - "column": 21, - "end_column": 42 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, - "column": 21, - "end_column": 42 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 27, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" }, { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalBoxBytes" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, - "column": 21, - "end_column": 28 + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 29, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ] + }, + "comment": "account funded" }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, - "column": 18, - "end_column": 64 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "app_opted_in", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, - "column": 18, - "end_column": 25 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "account" - }, - { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, - "column": 36, - "end_column": 63 - }, - "wtype": { - "_type": "WType", - "name": "application", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "global", - "immediates": [ - "CurrentApplicationID" - ], - "stack_args": [], - "comment": null - } - ], - "comment": null - }, - { - "_type": "TupleItemExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, - "column": 20, - "end_column": 44 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "base": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, - "column": 20, - "end_column": 44 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 43, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [] + } + ] }, { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 22, + "end_line": 22, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ] + }, + "index": "1" } ] }, - "op_code": "asset_holding_get", - "immediates": [ - "AssetBalance" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, - "column": 20, - "end_column": 27 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "account" - }, - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, - "column": 38, - "end_column": 43 - }, - "wtype": { - "_type": "WType", - "name": "asset", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "asset" - } - ], - "comment": null + "id": "0" }, - "index": "1" + "name": "isOptInAsset" } ] } @@ -1790,7 +21879,7 @@ "default_args": {}, "structs": { "output": { - "name": "", + "name": "getAccountInfoResult", "elements": [ [ "bytes", @@ -1953,7 +22042,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -1995,42 +22119,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -2040,7 +22129,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, @@ -2106,6 +22195,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/arc28-events/EventEmitter.approval.teal b/tests/approvals/out/arc28-events/EventEmitter.approval.teal new file mode 100644 index 00000000..c35a01a1 --- /dev/null +++ b/tests/approvals/out/arc28-events/EventEmitter.approval.teal @@ -0,0 +1,242 @@ +#pragma version 10 + +tests/approvals/arc28-events.algo.ts::EventEmitter.approvalProgram: + intcblock 0 1 + bytecblock 0x 0x1ccbd925 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/arc28-events.algo.ts::EventEmitter.constructor() -> void: +constructor: + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + proto 0 0 + retsub + + +// tests/approvals/arc28-events.algo.ts::EventEmitter.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@6 + txna ApplicationArgs 0 + pushbytes 0xd43cee5d // method "emitSwapped(uint64,uint64)void" + pushbytes 0xf14889d7 // method "emitCustom(string,bool)void" + uncover 2 + match __puya_arc4_router___emitSwapped_route@2 __puya_arc4_router___emitCustom_route@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___emitSwapped_route@2: + // tests/approvals/arc28-events.algo.ts:13 + // emitSwapped(a: uint64, b: uint64) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + btoi + // tests/approvals/arc28-events.algo.ts:13 + // emitSwapped(a: uint64, b: uint64) { + callsub emitSwapped + intc_1 // 1 + retsub + +__puya_arc4_router___emitCustom_route@3: + // tests/approvals/arc28-events.algo.ts:28 + // emitCustom(arg0: string, arg1: boolean) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + txna ApplicationArgs 1 + extract 2 0 + txna ApplicationArgs 2 + intc_0 // 0 + getbit + // tests/approvals/arc28-events.algo.ts:28 + // emitCustom(arg0: string, arg1: boolean) { + callsub emitCustom + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@4: + b __puya_arc4_router___after_if_else@10 + +__puya_arc4_router___bare_routing@6: + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@7 + b __puya_arc4_router___switch_case_default@8 + +__puya_arc4_router_____algots__.defaultCreate@7: + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@8: + +__puya_arc4_router___after_if_else@10: + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/arc28-events.algo.ts::EventEmitter.emitSwapped(a: uint64, b: uint64) -> void: +emitSwapped: + // tests/approvals/arc28-events.algo.ts:13 + // emitSwapped(a: uint64, b: uint64) { + proto 2 0 + // tests/approvals/arc28-events.algo.ts:14 + // emit({ a: b, b: a }) + frame_dig -1 + itob + frame_dig -2 + itob + swap + bytec_0 // 0x + swap + concat + swap + concat + bytec_1 // method "Swapped(uint64,uint64)" + swap + concat + log + // tests/approvals/arc28-events.algo.ts:16 + // const x: Swapped = { a: b, b: a } + frame_dig -1 + frame_dig -2 + swap + itob + swap + itob + swap + // tests/approvals/arc28-events.algo.ts:17 + // emit(x) + bytec_0 // 0x + swap + concat + swap + concat + bytec_1 // method "Swapped(uint64,uint64)" + swap + concat + log + // tests/approvals/arc28-events.algo.ts:20 + // a: new UintN64(b), + frame_dig -1 + itob + // tests/approvals/arc28-events.algo.ts:21 + // b: new UintN64(a), + frame_dig -2 + itob + swap + // tests/approvals/arc28-events.algo.ts:19-22 + // const y = new SwappedArc4({ + // a: new UintN64(b), + // b: new UintN64(a), + // }) + bytec_0 // 0x + swap + concat + swap + concat + // tests/approvals/arc28-events.algo.ts:23 + // emit(y) + pushbytes 0xbbab7378 // method "SwappedArc4(uint64,uint64)" + swap + concat + log + // tests/approvals/arc28-events.algo.ts:25 + // emit('Swapped', b, a) + frame_dig -1 + itob + frame_dig -2 + itob + swap + bytec_0 // 0x + swap + concat + swap + concat + bytec_1 // method "Swapped(uint64,uint64)" + swap + concat + log + retsub + + +// tests/approvals/arc28-events.algo.ts::EventEmitter.emitCustom(arg0: bytes, arg1: uint64) -> void: +emitCustom: + // tests/approvals/arc28-events.algo.ts:28 + // emitCustom(arg0: string, arg1: boolean) { + proto 2 0 + // tests/approvals/arc28-events.algo.ts:29 + // emit('Custom', arg0, arg1) + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + pushbytes 0x00 + intc_0 // 0 + frame_dig -1 + setbit + pushint 3 // 3 + itob + extract 6 2 + bytec_0 // 0x + swap + concat + swap + concat + swap + concat + pushbytes 0xa313c066 // method "Custom(string,bool)" + swap + concat + log + retsub + + +// tests/approvals/arc28-events.algo.ts::EventEmitter.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/arc28-events/EventEmitter.arc32.json b/tests/approvals/out/arc28-events/EventEmitter.arc32.json new file mode 100644 index 00000000..15a8a438 --- /dev/null +++ b/tests/approvals/out/arc28-events/EventEmitter.arc32.json @@ -0,0 +1,81 @@ +{ + "hints": { + "emitSwapped(uint64,uint64)void": { + "call_config": { + "no_op": "CALL" + } + }, + "emitCustom(string,bool)void": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjMjgtZXZlbnRzLmFsZ28udHM6OkV2ZW50RW1pdHRlci5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBieXRlY2Jsb2NrIDB4IDB4MWNjYmQ5MjUKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FyYzI4LWV2ZW50cy5hbGdvLnRzOjpFdmVudEVtaXR0ZXIuY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hcmMyOC1ldmVudHMuYWxnby50czoxMgogICAgLy8gY2xhc3MgRXZlbnRFbWl0dGVyIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMC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HB1c2hpbnQgMyAvLyAzCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgYnl0ZWNfMCAvLyAweAogICAgc3dhcAogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHN3YXAKICAgIGNvbmNhdAogICAgcHVzaGJ5dGVzIDB4YTMxM2MwNjYgLy8gbWV0aG9kICJDdXN0b20oc3RyaW5nLGJvb2wpIgogICAgc3dhcAogICAgY29uY2F0CiAgICBsb2cKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9hcmMyOC1ldmVudHMuYWxnby50czo6RXZlbnRFbWl0dGVyLl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hcmMyOC1ldmVudHMuYWxnby50czoxMgogICAgLy8gY2xhc3MgRXZlbnRFbWl0dGVyIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjMjgtZXZlbnRzLmFsZ28udHM6OkV2ZW50RW1pdHRlci5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "EventEmitter", + "methods": [ + { + "name": "emitSwapped", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "emitCustom", + "args": [ + { + "type": "string", + "name": "arg0" + }, + { + "type": "bool", + "name": "arg1" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/tests/approvals/out/arc28-events/EventEmitter.arc56.json b/tests/approvals/out/arc28-events/EventEmitter.arc56.json new file mode 100644 index 00000000..2a92d0a7 --- /dev/null +++ b/tests/approvals/out/arc28-events/EventEmitter.arc56.json @@ -0,0 +1,233 @@ +{ + "name": "EventEmitter", + "structs": {}, + "methods": [ + { + "name": "emitSwapped", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [ + { + "name": "Swapped", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ] + }, + { + "name": "SwappedArc4", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ] + }, + { + "name": "Swapped", + "args": [ + { + "type": "uint64", + "name": "0" + }, + { + "type": "uint64", + "name": "1" + } + ] + } + ], + "recommendations": {} + }, + { + "name": "emitCustom", + "args": [ + { + "type": "string", + "name": "arg0" + }, + { + "type": "bool", + "name": "arg1" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [ + { + "name": "Custom", + "args": [ + { + "type": "string", + "name": "0" + }, + { + "type": "bool", + "name": "1" + } + ] + } + ], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 69, + 92 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 132 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 74, + 97 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjMjgtZXZlbnRzLmFsZ28udHM6OkV2ZW50RW1pdHRlci5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBieXRlY2Jsb2NrIDB4IDB4MWNjYmQ5MjUKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FyYzI4LWV2ZW50cy5hbGdvLnRzOjpFdmVudEVtaXR0ZXIuY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hcmMyOC1ldmVudHMuYWxnby50czoxMgogICAgLy8gY2xhc3MgRXZlbnRFbWl0dGVyIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvYXJjMjgtZXZlbnRzLmFsZ28udHM6OkV2ZW50RW1pdHRlci5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvYXJjMjgtZXZlbnRzLmFsZ28udHM6MTIKICAgIC8vIGNsYXNzIEV2ZW50RW1pdHRlciBleHRlbmRzIENvbn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lc3RzL2FwcHJvdmFscy9hcmMyOC1ldmVudHMuYWxnby50czo6RXZlbnRFbWl0dGVyLl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hcmMyOC1ldmVudHMuYWxnby50czoxMgogICAgLy8gY2xhc3MgRXZlbnRFbWl0dGVyIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjMjgtZXZlbnRzLmFsZ28udHM6OkV2ZW50RW1pdHRlci5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [ + { + "name": "Swapped", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ] + }, + { + "name": "SwappedArc4", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ] + }, + { + "name": "Swapped", + "args": [ + { + "type": "uint64", + "name": "0" + }, + { + "type": "uint64", + "name": "1" + } + ] + }, + { + "name": "Custom", + "args": [ + { + "type": "string", + "name": "0" + }, + { + "type": "bool", + "name": "1" + } + ] + } + ], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/arc28-events/EventEmitter.clear.teal b/tests/approvals/out/arc28-events/EventEmitter.clear.teal new file mode 100644 index 00000000..a157afbe --- /dev/null +++ b/tests/approvals/out/arc28-events/EventEmitter.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/arc28-events.algo.ts::EventEmitter.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/arc28-events/EventEmitter.ssa.ir b/tests/approvals/out/arc28-events/EventEmitter.ssa.ir new file mode 100644 index 00000000..04fe20a8 --- /dev/null +++ b/tests/approvals/out/arc28-events/EventEmitter.ssa.ir @@ -0,0 +1,139 @@ +contract tests/approvals/arc28-events.algo.ts::EventEmitter: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/arc28-events.algo.ts::EventEmitter.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/arc28-events.algo.ts::EventEmitter.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/arc28-events.algo.ts::EventEmitter.constructor() -> void: + block@0: // L12 + return + + subroutine tests/approvals/arc28-events.algo.ts::EventEmitter.__puya_arc4_router__() -> bool: + block@0: // L12 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@6 + block@1: // abi_routing_L12 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "emitSwapped(uint64,uint64)void" => block@2, method "emitCustom(string,bool)void" => block@3, * => block@4} + block@2: // emitSwapped_route_L13 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + let tmp%7#0: bytes = (txna ApplicationArgs 1) + let tmp%8#0: uint64 = (btoi tmp%7#0) + let tmp%9#0: bytes = (txna ApplicationArgs 2) + let tmp%10#0: uint64 = (btoi tmp%9#0) + tests/approvals/arc28-events.algo.ts::EventEmitter.emitSwapped(tmp%8#0, tmp%10#0) + return 1u + block@3: // emitCustom_route_L28 + let tmp%11#0: uint64 = (txn OnCompletion) + let tmp%12#0: bool = (== tmp%11#0 NoOp) + (assert tmp%12#0) // OnCompletion is not NoOp + let tmp%13#0: uint64 = (txn ApplicationID) + let tmp%14#0: bool = (!= tmp%13#0 0u) + (assert tmp%14#0) // can only call when not creating + let tmp%15#0: bytes = (txna ApplicationArgs 1) + let tmp%16#0: bytes = ((extract 2 0) tmp%15#0) + let tmp%17#0: bytes = (txna ApplicationArgs 2) + let tmp%18#0: bool = (getbit tmp%17#0 0u) + tests/approvals/arc28-events.algo.ts::EventEmitter.emitCustom(tmp%16#0, tmp%18#0) + return 1u + block@4: // switch_case_default_L12 + goto block@5 + block@5: // switch_case_next_L12 + goto block@10 + block@6: // bare_routing_L12 + let tmp%19#0: uint64 = (txn OnCompletion) + switch tmp%19#0 {0u => block@7, * => block@8} + block@7: // __algots__.defaultCreate_L12 + let tmp%20#0: uint64 = (txn ApplicationID) + let tmp%21#0: bool = (== tmp%20#0 0u) + (assert tmp%21#0) // can only call when creating + tests/approvals/arc28-events.algo.ts::EventEmitter.__algots__.defaultCreate() + return 1u + block@8: // switch_case_default_L12 + goto block@9 + block@9: // switch_case_next_L12 + goto block@10 + block@10: // after_if_else_L12 + return 0u + + subroutine tests/approvals/arc28-events.algo.ts::EventEmitter.emitSwapped(a: uint64, b: uint64) -> void: + block@0: // L13 + let val_as_bytes%0#0: bytes = (itob b#0) + let val_as_bytes%1#0: bytes = (itob a#0) + let current_tail_offset%0#0: uint64 = 16u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 val_as_bytes%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 val_as_bytes%1#0) + let event%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) + (log event%0#0) + let (x.a#0: uint64, x.b#0: uint64) = (b#0, a#0) + let val_as_bytes%2#0: bytes = (itob x.a#0) + let val_as_bytes%3#0: bytes = (itob x.b#0) + let current_tail_offset%1#0: uint64 = 16u + let encoded_tuple_buffer%3#0: bytes = 0x + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 val_as_bytes%2#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 val_as_bytes%3#0) + let event%1#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%5#0) + (log event%1#0) + let val_as_bytes%4#0: bytes = (itob b#0) + let val_as_bytes%5#0: bytes = (itob a#0) + let val_as_bytes%6#0: bytes = (itob b#0) + let val_as_bytes%7#0: bytes = (itob a#0) + let current_tail_offset%2#0: uint64 = 16u + let encoded_tuple_buffer%6#0: bytes = 0x + let encoded_tuple_buffer%7#0: bytes = (concat encoded_tuple_buffer%6#0 val_as_bytes%4#0) + let encoded_tuple_buffer%8#0: bytes = (concat encoded_tuple_buffer%7#0 val_as_bytes%7#0) + let y#0: bytes = encoded_tuple_buffer%8#0 + let event%2#0: bytes = (concat method "SwappedArc4(uint64,uint64)" y#0) + (log event%2#0) + let val_as_bytes%8#0: bytes = (itob b#0) + let val_as_bytes%9#0: bytes = (itob a#0) + let current_tail_offset%3#0: uint64 = 16u + let encoded_tuple_buffer%9#0: bytes = 0x + let encoded_tuple_buffer%10#0: bytes = (concat encoded_tuple_buffer%9#0 val_as_bytes%8#0) + let encoded_tuple_buffer%11#0: bytes = (concat encoded_tuple_buffer%10#0 val_as_bytes%9#0) + let event%3#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%11#0) + (log event%3#0) + return + + subroutine tests/approvals/arc28-events.algo.ts::EventEmitter.emitCustom(arg0: bytes, arg1: bool) -> void: + block@0: // L28 + let length%0#0: uint64 = (len arg0#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 arg0#0) + let encoded_bool%0#0: bytes = (setbit 0x00 0u arg1#0) + let current_tail_offset%0#0: uint64 = 3u + let encoded_tuple_buffer%0#0: bytes = 0x + let as_bytes%1#0: bytes = (itob current_tail_offset%0#0) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len encoded_value%0#0) + let current_tail_offset%1#0: uint64 = (+ current_tail_offset%0#0 data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 encoded_bool%0#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%0#0) + let event%0#0: bytes = (concat method "Custom(string,bool)" encoded_tuple_buffer%3#0) + (log event%0#0) + return + + subroutine tests/approvals/arc28-events.algo.ts::EventEmitter.__algots__.defaultCreate() -> void: + block@0: // L12 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/arc28-events/arc28-events.awst b/tests/approvals/out/arc28-events/arc28-events.awst new file mode 100644 index 00000000..bd22607e --- /dev/null +++ b/tests/approvals/out/arc28-events/arc28-events.awst @@ -0,0 +1,49 @@ +contract EventEmitter +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + emitSwapped(): void + { + emit("Swapped(uint64,uint64)", ARC4_ENCODE({ a: b, b: a }, wtype=Swapped)) + x: Swapped{ a: uint64, b: uint64 } = { a: (#0 = { a: b, b: a }).a, b: #0.b } + emit("Swapped(uint64,uint64)", ARC4_ENCODE(x, wtype=Swapped)) + y: SwappedArc4 = new SwappedArc4(a=(#1 = { a: ARC4_ENCODE(b, wtype=arc4.uint64), b: ARC4_ENCODE(a, wtype=arc4.uint64) }).a, b=#1.b) + emit("SwappedArc4(uint64,uint64)", y) + emit("Swapped(uint64,uint64)", new Swapped(0=ARC4_ENCODE(b, wtype=arc4.uint64), 1=ARC4_ENCODE(a, wtype=arc4.uint64))) + } + + emitCustom(): void + { + emit("Custom(string,bool)", new Custom(0=ARC4_ENCODE(arg0, wtype=arc4.dynamic_array), 1=ARC4_ENCODE(arg1, wtype=arc4.bool))) + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + + BaseContract::constructor(): void + { + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/arc28-events/arc28-events.awst.json b/tests/approvals/out/arc28-events/arc28-events.awst.json new file mode 100644 index 00000000..1b6e3ca3 --- /dev/null +++ b/tests/approvals/out/arc28-events/arc28-events.awst.json @@ -0,0 +1,2447 @@ +[ + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "id": "tests/approvals/arc28-events.algo.ts::EventEmitter", + "name": "EventEmitter", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 13, + "end_line": 13, + "column": 2, + "end_column": 35 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 13, + "end_line": 13, + "column": 14, + "end_column": 23 + } + }, + { + "_type": "SubroutineArgument", + "name": "b", + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 34 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 13, + "end_line": 26, + "column": 36, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 14, + "end_line": 14, + "column": 4, + "end_column": 33 + }, + "expr": { + "_type": "Emit", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 14, + "end_line": 14, + "column": 4, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "signature": "Swapped(uint64,uint64)", + "value": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 14, + "end_line": 14, + "column": 18, + "end_column": 32 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Swapped", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "value": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 14, + "end_line": 14, + "column": 18, + "end_column": 32 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 14, + "end_line": 14, + "column": 23, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 14, + "end_line": 14, + "column": 29, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + ] + } + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 16, + "end_line": 16, + "column": 10, + "end_column": 37 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 16, + "end_line": 16, + "column": 10, + "end_column": 11 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc28-events.algo.ts::Swapped", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "name": "x" + }, + "value": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 16, + "end_line": 16, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc28-events.algo.ts::Swapped", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 16, + "end_line": 16, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 16, + "end_line": 16, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 16, + "end_line": 16, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 16, + "end_line": 16, + "column": 28, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 16, + "end_line": 16, + "column": 34, + "end_column": 35 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + ] + }, + "id": "0" + }, + "name": "a" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 16, + "end_line": 16, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 16, + "end_line": 16, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 16, + "end_line": 16, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 16, + "end_line": 16, + "column": 28, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 16, + "end_line": 16, + "column": 34, + "end_column": 35 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + ] + }, + "id": "0" + }, + "name": "b" + } + ] + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 4, + "end_column": 11 + }, + "expr": { + "_type": "Emit", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 4, + "end_column": 11 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "signature": "Swapped(uint64,uint64)", + "value": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Swapped", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc28-events.algo.ts::Swapped", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "name": "x" + } + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 19, + "end_line": 22, + "column": 10, + "end_column": 6 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 19, + "end_line": 19, + "column": 10, + "end_column": 11 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "SwappedArc4", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 19, + "end_line": 19, + "column": 10, + "end_column": 11 + }, + "frozen": false, + "desc": null + }, + "name": "y" + }, + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 19, + "end_line": 22, + "column": 14, + "end_column": 6 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "SwappedArc4", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 19, + "end_line": 19, + "column": 18, + "end_column": 29 + }, + "frozen": false, + "desc": null + }, + "values": { + "a": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 19, + "end_line": 22, + "column": 14, + "end_column": 6 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 19, + "end_line": 22, + "column": 30, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 19, + "end_line": 22, + "column": 30, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 20, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + }, + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 21, + "end_line": 21, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 21, + "end_line": 21, + "column": 21, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + ] + }, + "id": "1" + }, + "name": "a" + }, + "b": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 19, + "end_line": 22, + "column": 14, + "end_column": 6 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 19, + "end_line": 22, + "column": 30, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 19, + "end_line": 22, + "column": 30, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 20, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 20, + "column": 21, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + }, + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 21, + "end_line": 21, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 21, + "end_line": 21, + "column": 21, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + ] + }, + "id": "1" + }, + "name": "b" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 23, + "end_line": 23, + "column": 4, + "end_column": 11 + }, + "expr": { + "_type": "Emit", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 23, + "end_line": 23, + "column": 4, + "end_column": 11 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "signature": "SwappedArc4(uint64,uint64)", + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 23, + "end_line": 23, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "SwappedArc4", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 23, + "end_line": 23, + "column": 9, + "end_column": 10 + }, + "frozen": false, + "desc": null + }, + "name": "y" + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 25, + "end_line": 25, + "column": 4, + "end_column": 25 + }, + "expr": { + "_type": "Emit", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 25, + "end_line": 25, + "column": 4, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "signature": "Swapped(uint64,uint64)", + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 25, + "end_line": 25, + "column": 4, + "end_column": 25 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Swapped", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "0": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "1": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 25, + "end_line": 25, + "column": 4, + "end_column": 25 + }, + "frozen": false, + "desc": null + }, + "values": { + "0": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 25, + "end_line": 25, + "column": 20, + "end_column": 21 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 25, + "end_line": 25, + "column": 20, + "end_column": 21 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + }, + "1": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 25, + "end_line": 25, + "column": 23, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 25, + "end_line": 25, + "column": 23, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + } + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc28-events.algo.ts::EventEmitter", + "member_name": "emitSwapped", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 13, + "end_line": 13, + "column": 2, + "end_column": 35 + }, + "name": "emitSwapped", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 28, + "end_line": 28, + "column": 2, + "end_column": 41 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "arg0", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 28, + "end_line": 28, + "column": 13, + "end_column": 25 + } + }, + { + "_type": "SubroutineArgument", + "name": "arg1", + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 28, + "end_line": 28, + "column": 27, + "end_column": 40 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 28, + "end_line": 30, + "column": 42, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 30 + }, + "expr": { + "_type": "Emit", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "signature": "Custom(string,bool)", + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 30 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Custom", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(string,bool)", + "fields": { + "0": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "1": { + "_type": "ARC4Type", + "name": "arc4.bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "bool" + } + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 30 + }, + "frozen": false, + "desc": null + }, + "values": { + "0": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 29, + "end_line": 29, + "column": 19, + "end_column": 23 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 29, + "end_line": 29, + "column": 19, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "arg0" + } + }, + "1": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 29, + "end_line": 29, + "column": 25, + "end_column": 29 + }, + "wtype": { + "_type": "ARC4Type", + "name": "arc4.bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "bool" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 29, + "end_line": 29, + "column": 25, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "arg1" + } + } + } + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc28-events.algo.ts::EventEmitter", + "member_name": "emitCustom", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 28, + "end_line": 28, + "column": 2, + "end_column": 41 + }, + "name": "emitCustom", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc28-events.algo.ts::EventEmitter", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc28-events.algo.ts::EventEmitter", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true + } + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + } +] \ No newline at end of file diff --git a/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.approval.teal b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.approval.teal new file mode 100644 index 00000000..b6cdec5b --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.approval.teal @@ -0,0 +1,396 @@ +#pragma version 10 + +tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.approvalProgram: + intcblock 0 1 8 64 + bytecblock 0x00 0x + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.constructor() -> void: +constructor: + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + proto 0 0 + retsub + + +// tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@6 + txna ApplicationArgs 0 + pushbytes 0x9be85afa // method "testEncoding(uint64,bool,uint512,byte[],string)void" + pushbytes 0xa2d335ac // method "testDecoding(uint64,byte[],bool,byte[],uint512,byte[],string,byte[],(uint64,byte[]),byte[])void" + uncover 2 + match __puya_arc4_router___testEncoding_route@2 __puya_arc4_router___testDecoding_route@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___testEncoding_route@2: + // tests/approvals/arc4-encode-decode.algo.ts:8 + // testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + intc_0 // 0 + getbit + txna ApplicationArgs 3 + txna ApplicationArgs 4 + extract 2 0 + txna ApplicationArgs 5 + extract 2 0 + // tests/approvals/arc4-encode-decode.algo.ts:8 + // testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { + uncover 4 + uncover 4 + uncover 4 + uncover 4 + uncover 4 + callsub testEncoding + intc_1 // 1 + retsub + +__puya_arc4_router___testDecoding_route@3: + // tests/approvals/arc4-encode-decode.algo.ts:17-28 + // testDecoding( + // a: uint64, + // a_bytes: bytes, + // b: boolean, + // b_bytes: bytes, + // c: biguint, + // c_bytes: bytes, + // d: string, + // d_bytes: bytes, + // e: TestObj, + // e_bytes: bytes, + // ) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + extract 2 0 + txna ApplicationArgs 3 + intc_0 // 0 + getbit + txna ApplicationArgs 4 + extract 2 0 + txna ApplicationArgs 5 + txna ApplicationArgs 6 + extract 2 0 + txna ApplicationArgs 7 + extract 2 0 + txna ApplicationArgs 8 + extract 2 0 + txna ApplicationArgs 9 + dup + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + swap + dup + intc_2 // 8 + extract_uint16 + swap + dup + len + swap + uncover 2 + uncover 2 + substring3 + txna ApplicationArgs 10 + extract 2 0 + // tests/approvals/arc4-encode-decode.algo.ts:17-28 + // testDecoding( + // a: uint64, + // a_bytes: bytes, + // b: boolean, + // b_bytes: bytes, + // c: biguint, + // c_bytes: bytes, + // d: string, + // d_bytes: bytes, + // e: TestObj, + // e_bytes: bytes, + // ) { + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + callsub testDecoding + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@4: + b __puya_arc4_router___after_if_else@10 + +__puya_arc4_router___bare_routing@6: + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@7 + b __puya_arc4_router___switch_case_default@8 + +__puya_arc4_router_____algots__.defaultCreate@7: + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@8: + +__puya_arc4_router___after_if_else@10: + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.testEncoding(a: uint64, b: uint64, c: bytes, d: bytes, e: bytes) -> void: +testEncoding: + // tests/approvals/arc4-encode-decode.algo.ts:8 + // testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { + proto 5 0 + // tests/approvals/arc4-encode-decode.algo.ts:9 + // assert(encodeArc4(a) === new UintN64(a).bytes) + frame_dig -5 + itob + frame_dig -5 + itob + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:10 + // assert(encodeArc4(b) === new Bool(b).bytes) + bytec_0 // 0x00 + intc_0 // 0 + frame_dig -4 + setbit + bytec_0 // 0x00 + intc_0 // 0 + frame_dig -4 + setbit + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:11 + // assert(encodeArc4(c) === new UintN<512>(c).bytes) + frame_dig -3 + len + intc_3 // 64 + <= + assert // overflow + intc_3 // 64 + bzero + frame_dig -3 + b| + frame_dig -3 + len + intc_3 // 64 + <= + assert // overflow + intc_3 // 64 + bzero + frame_dig -3 + b| + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:12 + // assert(encodeArc4(d) === new DynamicBytes(d).bytes) + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:13 + // assert(encodeArc4(e) === new Str(e).bytes) + frame_dig -1 + len + itob + extract 6 2 + frame_dig -1 + concat + frame_dig -1 + len + itob + extract 6 2 + frame_dig -1 + concat + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:14 + // assert(encodeArc4({ a, b: d }) === new TestStruct({ a: new UintN64(a), b: new DynamicBytes(d) }).bytes) + frame_dig -5 + itob + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + swap + bytec_1 // 0x + swap + concat + pushint 10 // 10 + itob + extract 6 2 + concat + swap + concat + frame_dig -5 + itob + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + swap + bytec_1 // 0x + swap + concat + pushint 10 // 10 + itob + extract 6 2 + concat + swap + concat + == + assert + retsub + + +// tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.testDecoding(a: uint64, a_bytes: bytes, b: uint64, b_bytes: bytes, c: bytes, c_bytes: bytes, d: bytes, d_bytes: bytes, e.a: bytes, e.b: bytes, e_bytes: bytes) -> void: +testDecoding: + // tests/approvals/arc4-encode-decode.algo.ts:17-28 + // testDecoding( + // a: uint64, + // a_bytes: bytes, + // b: boolean, + // b_bytes: bytes, + // c: biguint, + // c_bytes: bytes, + // d: string, + // d_bytes: bytes, + // e: TestObj, + // e_bytes: bytes, + // ) { + proto 11 0 + // tests/approvals/arc4-encode-decode.algo.ts:29 + // assert(decodeArc4(a_bytes) === a) + frame_dig -10 + btoi + frame_dig -11 + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:30 + // assert(decodeArc4(b_bytes) === b) + frame_dig -8 + intc_0 // 0 + getbit + frame_dig -9 + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:31 + // assert(decodeArc4(c_bytes) === c) + frame_dig -6 + frame_dig -7 + b== + assert + // tests/approvals/arc4-encode-decode.algo.ts:32 + // assert(decodeArc4(d_bytes) === d) + frame_dig -4 + extract 2 0 + frame_dig -5 + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:34 + // assertMatch(decodeArc4(e_bytes), e) + frame_dig -1 + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + frame_dig -3 + == + bz testDecoding_bool_false@3 + frame_dig -1 + intc_2 // 8 + extract_uint16 + frame_dig -1 + len + frame_dig -1 + uncover 2 + uncover 2 + substring3 + frame_dig -2 + == + bz testDecoding_bool_false@3 + intc_1 // 1 + b testDecoding_bool_merge@4 + +testDecoding_bool_false@3: + intc_0 // 0 + +testDecoding_bool_merge@4: + // tests/approvals/arc4-encode-decode.algo.ts:34 + // assertMatch(decodeArc4(e_bytes), e) + assert // assert target is match for conditions + retsub + + +// tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc32.json b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc32.json new file mode 100644 index 00000000..99c1e866 --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc32.json @@ -0,0 +1,140 @@ +{ + "hints": { + "testEncoding(uint64,bool,uint512,byte[],string)void": { + "call_config": { + "no_op": "CALL" + } + }, + "testDecoding(uint64,byte[],bool,byte[],uint512,byte[],string,byte[],(uint64,byte[]),byte[])void": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "e": { + "name": "TestObj", + "elements": [ + [ + "a", + "uint64" + ], + [ + "b", + "byte[]" + ] + ] + } + } + } + }, + "source": { + "approval": "I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FwcHJvdmFscy9hcmM0LWVuY29kZS1kZWNvZGUuYWxnby50czozNAogICAgLy8gYXNzZXJ0TWF0Y2goZGVjb2RlQXJjNDxUZXN0T2JqPihlX2J5dGVzKSwgZSkKICAgIGFzc2VydCAvLyBhc3NlcnQgdGFyZ2V0IGlzIG1hdGNoIGZvciBjb25kaXRpb25zCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGUtZGVjb2RlLmFsZ28udHM6OkFyYzRFbmNvZGVEZWNvZGUuX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlKCkgLT4gdm9pZDoKX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtZW5jb2RlLWRlY29kZS5hbGdvLnRzOjcKICAgIC8vIGV4cG9ydCBjbGFzcyBBcmM0RW5jb2RlRGVjb2RlIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGUtZGVjb2RlLmFsZ28udHM6OkFyYzRFbmNvZGVEZWNvZGUuY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "Arc4EncodeDecode", + "methods": [ + { + "name": "testEncoding", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "bool", + "name": "b" + }, + { + "type": "uint512", + "name": "c" + }, + { + "type": "byte[]", + "name": "d" + }, + { + "type": "string", + "name": "e" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "testDecoding", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "byte[]", + "name": "a_bytes" + }, + { + "type": "bool", + "name": "b" + }, + { + "type": "byte[]", + "name": "b_bytes" + }, + { + "type": "uint512", + "name": "c" + }, + { + "type": "byte[]", + "name": "c_bytes" + }, + { + "type": "string", + "name": "d" + }, + { + "type": "byte[]", + "name": "d_bytes" + }, + { + "type": "(uint64,byte[])", + "name": "e" + }, + { + "type": "byte[]", + "name": "e_bytes" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc56.json b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc56.json new file mode 100644 index 00000000..b9e1162b --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc56.json @@ -0,0 +1,202 @@ +{ + "name": "Arc4EncodeDecode", + "structs": { + "TestObj": [ + { + "name": "a", + "type": "uint64" + }, + { + "name": "b", + "type": "byte[]" + } + ] + }, + "methods": [ + { + "name": "testEncoding", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "bool", + "name": "b" + }, + { + "type": "uint512", + "name": "c" + }, + { + "type": "byte[]", + "name": "d" + }, + { + "type": "string", + "name": "e" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "testDecoding", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "byte[]", + "name": "a_bytes" + }, + { + "type": "bool", + "name": "b" + }, + { + "type": "byte[]", + "name": "b_bytes" + }, + { + "type": "uint512", + "name": "c" + }, + { + "type": "byte[]", + "name": "c_bytes" + }, + { + "type": "string", + "name": "d" + }, + { + "type": "byte[]", + "name": "d_bytes" + }, + { + "type": "(uint64,byte[])", + "struct": "TestObj", + "name": "e" + }, + { + "type": "byte[]", + "name": "e_bytes" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 171, + 427 + ], + "errorMessage": "Index access is out of bounds" + }, + { + "pc": [ + 68, + 117 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 459 + ], + "errorMessage": "assert target is match for conditions" + }, + { + "pc": [ + 236 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 73, + 122 + ], + "errorMessage": "can only call when not creating" + }, + { + "pc": [ + 272, + 283 + ], + "errorMessage": "overflow" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGUtZGVjb2RlLmFsZ28udHM6OkFyYzRFbmNvZGVEZWNvZGUuYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMSA4IDY0CiAgICBieXRlY2Jsb2NrIDB4MDAgMHgKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtZW5jb2RlLWRlY29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hbGdvLnRzOjcKICAgIC8vIGV4cG9ydCBjbGFzcyBBcmM0RW5jb2RlRGVjb2RlIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGUtZGVjb2RlLmFsZ28udHM6OkFyYzRFbmNvZGVEZWNvZGUuY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.clear.teal b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.clear.teal new file mode 100644 index 00000000..b7e3aa30 --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.ssa.ir b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.ssa.ir new file mode 100644 index 00000000..e54d4a50 --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.ssa.ir @@ -0,0 +1,218 @@ +contract tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.constructor() -> void: + block@0: // L7 + return + + subroutine tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.__puya_arc4_router__() -> bool: + block@0: // L7 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@6 + block@1: // abi_routing_L7 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "testEncoding(uint64,bool,uint512,byte[],string)void" => block@2, method "testDecoding(uint64,byte[],bool,byte[],uint512,byte[],string,byte[],(uint64,byte[]),byte[])void" => block@3, * => block@4} + block@2: // testEncoding_route_L8 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + let tmp%7#0: bytes = (txna ApplicationArgs 1) + let tmp%8#0: uint64 = (btoi tmp%7#0) + let tmp%9#0: bytes = (txna ApplicationArgs 2) + let tmp%10#0: bool = (getbit tmp%9#0 0u) + let tmp%11#0: bytes = (txna ApplicationArgs 3) + let tmp%12#0: bytes = (txna ApplicationArgs 4) + let tmp%13#0: bytes = ((extract 2 0) tmp%12#0) + let tmp%14#0: bytes = (txna ApplicationArgs 5) + let tmp%15#0: bytes = ((extract 2 0) tmp%14#0) + tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.testEncoding(tmp%8#0, tmp%10#0, tmp%11#0, tmp%13#0, tmp%15#0) + return 1u + block@3: // testDecoding_route_L17 + let tmp%16#0: uint64 = (txn OnCompletion) + let tmp%17#0: bool = (== tmp%16#0 NoOp) + (assert tmp%17#0) // OnCompletion is not NoOp + let tmp%18#0: uint64 = (txn ApplicationID) + let tmp%19#0: bool = (!= tmp%18#0 0u) + (assert tmp%19#0) // can only call when not creating + let tmp%20#0: bytes = (txna ApplicationArgs 1) + let tmp%21#0: uint64 = (btoi tmp%20#0) + let tmp%22#0: bytes = (txna ApplicationArgs 2) + let tmp%23#0: bytes = ((extract 2 0) tmp%22#0) + let tmp%24#0: bytes = (txna ApplicationArgs 3) + let tmp%25#0: bool = (getbit tmp%24#0 0u) + let tmp%26#0: bytes = (txna ApplicationArgs 4) + let tmp%27#0: bytes = ((extract 2 0) tmp%26#0) + let tmp%28#0: bytes = (txna ApplicationArgs 5) + let tmp%29#0: bytes = (txna ApplicationArgs 6) + let tmp%30#0: bytes = ((extract 2 0) tmp%29#0) + let tmp%31#0: bytes = (txna ApplicationArgs 7) + let tmp%32#0: bytes = ((extract 2 0) tmp%31#0) + let tmp%33#0: bytes = (txna ApplicationArgs 8) + let tmp%34#0: bytes = ((extract 2 0) tmp%33#0) + let tmp%35#0: bytes = (txna ApplicationArgs 9) + let item0%0#0: bytes = (extract3 tmp%35#0 0u 8u) // on error: Index access is out of bounds + let item_start_offset%0#0: uint64 = (extract_uint16 tmp%35#0 8u) + let item_end_offset%0#0: uint64 = (len tmp%35#0) + let item1%0#0: bytes = (substring3 tmp%35#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%36#0: bytes = (txna ApplicationArgs 10) + let tmp%37#0: bytes = ((extract 2 0) tmp%36#0) + tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.testDecoding(tmp%21#0, tmp%23#0, tmp%25#0, tmp%27#0, tmp%28#0, tmp%30#0, tmp%32#0, tmp%34#0, item0%0#0, item1%0#0, tmp%37#0) + return 1u + block@4: // switch_case_default_L7 + goto block@5 + block@5: // switch_case_next_L7 + goto block@10 + block@6: // bare_routing_L7 + let tmp%38#0: uint64 = (txn OnCompletion) + switch tmp%38#0 {0u => block@7, * => block@8} + block@7: // __algots__.defaultCreate_L7 + let tmp%39#0: uint64 = (txn ApplicationID) + let tmp%40#0: bool = (== tmp%39#0 0u) + (assert tmp%40#0) // can only call when creating + tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.__algots__.defaultCreate() + return 1u + block@8: // switch_case_default_L7 + goto block@9 + block@9: // switch_case_next_L7 + goto block@10 + block@10: // after_if_else_L7 + return 0u + + subroutine tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.testEncoding(a: uint64, b: bool, c: biguint, d: bytes, e: bytes) -> void: + block@0: // L8 + let val_as_bytes%0#0: bytes = (itob a#0) + let val_as_bytes%1#0: bytes = (itob a#0) + let tmp%0#0: bool = (== val_as_bytes%0#0 val_as_bytes%1#0) + (assert tmp%0#0) + let encoded_bool%0#0: bytes = (setbit 0x00 0u b#0) + let encoded_bool%1#0: bytes = (setbit 0x00 0u b#0) + let tmp%1#0: bool = (== encoded_bool%0#0 encoded_bool%1#0) + (assert tmp%1#0) + let len_%0#0: uint64 = (len c#0) + let no_overflow%0#0: bool = (<= len_%0#0 64u) + (assert no_overflow%0#0) // overflow + let b_zeros%0#0: bytes = (bzero 64u) + let tmp%2#0: bytes = (b| c#0 b_zeros%0#0) + let len_%1#0: uint64 = (len c#0) + let no_overflow%1#0: bool = (<= len_%1#0 64u) + (assert no_overflow%1#0) // overflow + let b_zeros%1#0: bytes = (bzero 64u) + let tmp%3#0: bytes = (b| c#0 b_zeros%1#0) + let tmp%4#0: bool = (== tmp%2#0 tmp%3#0) + (assert tmp%4#0) + let length%0#0: uint64 = (len d#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 d#0) + let length%1#0: uint64 = (len d#0) + let as_bytes%1#0: bytes = (itob length%1#0) + let length_uint16%1#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_value%1#0: bytes = (concat length_uint16%1#0 d#0) + let tmp%5#0: bool = (== encoded_value%0#0 encoded_value%1#0) + (assert tmp%5#0) + let length%2#0: uint64 = (len e#0) + let as_bytes%2#0: bytes = (itob length%2#0) + let length_uint16%2#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_value%2#0: bytes = (concat length_uint16%2#0 e#0) + let length%3#0: uint64 = (len e#0) + let as_bytes%3#0: bytes = (itob length%3#0) + let length_uint16%3#0: bytes = ((extract 6 2) as_bytes%3#0) + let encoded_value%3#0: bytes = (concat length_uint16%3#0 e#0) + let tmp%6#0: bool = (== encoded_value%2#0 encoded_value%3#0) + (assert tmp%6#0) + let val_as_bytes%2#0: bytes = (itob a#0) + let length%4#0: uint64 = (len d#0) + let as_bytes%4#0: bytes = (itob length%4#0) + let length_uint16%4#0: bytes = ((extract 6 2) as_bytes%4#0) + let encoded_value%4#0: bytes = (concat length_uint16%4#0 d#0) + let current_tail_offset%0#0: uint64 = 10u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 val_as_bytes%2#0) + let as_bytes%5#0: bytes = (itob current_tail_offset%0#0) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%5#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len encoded_value%4#0) + let current_tail_offset%1#0: uint64 = (+ current_tail_offset%0#0 data_length%0#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%4#0) + let val_as_bytes%3#0: bytes = (itob a#0) + let length%5#0: uint64 = (len d#0) + let as_bytes%6#0: bytes = (itob length%5#0) + let length_uint16%5#0: bytes = ((extract 6 2) as_bytes%6#0) + let encoded_value%5#0: bytes = (concat length_uint16%5#0 d#0) + let val_as_bytes%4#0: bytes = (itob a#0) + let length%6#0: uint64 = (len d#0) + let as_bytes%7#0: bytes = (itob length%6#0) + let length_uint16%6#0: bytes = ((extract 6 2) as_bytes%7#0) + let encoded_value%6#0: bytes = (concat length_uint16%6#0 d#0) + let current_tail_offset%2#0: uint64 = 10u + let encoded_tuple_buffer%4#0: bytes = 0x + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 val_as_bytes%3#0) + let as_bytes%8#0: bytes = (itob current_tail_offset%2#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%8#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 offset_as_uint16%1#0) + let data_length%1#0: uint64 = (len encoded_value%6#0) + let current_tail_offset%3#0: uint64 = (+ current_tail_offset%2#0 data_length%1#0) + let encoded_tuple_buffer%7#0: bytes = (concat encoded_tuple_buffer%6#0 encoded_value%6#0) + let tmp%7#0: bool = (== encoded_tuple_buffer%3#0 encoded_tuple_buffer%7#0) + (assert tmp%7#0) + return + + subroutine tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.testDecoding(a: uint64, a_bytes: bytes, b: bool, b_bytes: bytes, c: biguint, c_bytes: bytes, d: bytes, d_bytes: bytes, e.a: bytes, e.b: bytes, e_bytes: bytes) -> void: + block@0: // L17 + let tmp%0#0: uint64 = (btoi a_bytes#0) + let tmp%1#0: bool = (== tmp%0#0 a#0) + (assert tmp%1#0) + let tmp%2#0: bool = (getbit b_bytes#0 0u) + let tmp%3#0: bool = (== tmp%2#0 b#0) + (assert tmp%3#0) + let tmp%4#0: bool = (b== c_bytes#0 c#0) + (assert tmp%4#0) + let tmp%5#0: bytes = ((extract 2 0) d_bytes#0) + let tmp%6#0: bool = (== tmp%5#0 d#0) + (assert tmp%6#0) + let item0%0#0: bytes = (extract3 e_bytes#0 0u 8u) // on error: Index access is out of bounds + let item_start_offset%0#0: uint64 = (extract_uint16 e_bytes#0 8u) + let item_end_offset%0#0: uint64 = (len e_bytes#0) + let item1%0#0: bytes = (substring3 e_bytes#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%7#0: bool = (== item0%0#0 e.a#0) + goto tmp%7#0 ? block@1 : block@3 + block@1: // and_contd_L34 + let item0%1#0: bytes = (extract3 e_bytes#0 0u 8u) // on error: Index access is out of bounds + let item_start_offset%1#0: uint64 = (extract_uint16 e_bytes#0 8u) + let item_end_offset%1#0: uint64 = (len e_bytes#0) + let item1%1#0: bytes = (substring3 e_bytes#0 item_start_offset%1#0 item_end_offset%1#0) + let tmp%8#0: bool = (== item1%1#0 e.b#0) + goto tmp%8#0 ? block@2 : block@3 + block@2: // bool_true_L34 + let and_result%0#0: bool = 1u + goto block@4 + block@3: // bool_false_L34 + let and_result%0#1: bool = 0u + goto block@4 + block@4: // bool_merge_L34 + let and_result%0#2: bool = φ(and_result%0#0 <- block@2, and_result%0#1 <- block@3) + (assert and_result%0#2) // assert target is match for conditions + return + + subroutine tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.__algots__.defaultCreate() -> void: + block@0: // L7 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst new file mode 100644 index 00000000..e763ca6c --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst @@ -0,0 +1,53 @@ +contract Arc4EncodeDecode +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + testEncoding(): void + { + assert(reinterpret_cast(ARC4_ENCODE(a, wtype=arc4.uint64)) == reinterpret_cast(ARC4_ENCODE(a, wtype=arc4.uint64))) + assert(reinterpret_cast(ARC4_ENCODE(b, wtype=arc4.bool)) == reinterpret_cast(ARC4_ENCODE(b, wtype=arc4.bool))) + assert(reinterpret_cast(ARC4_ENCODE(c, wtype=arc4.uint512)) == reinterpret_cast(ARC4_ENCODE(c, wtype=arc4.uint512))) + assert(reinterpret_cast(ARC4_ENCODE(d, wtype=arc4.dynamic_array)) == reinterpret_cast(ARC4_ENCODE(d, wtype=arc4.dynamic_array))) + assert(reinterpret_cast(ARC4_ENCODE(e, wtype=arc4.dynamic_array)) == reinterpret_cast(ARC4_ENCODE(e, wtype=arc4.dynamic_array))) + assert(reinterpret_cast(ARC4_ENCODE({ a: a, b: d }, wtype=(uint64,byte[]))) == reinterpret_cast(new TestStruct(a=(#0 = { a: ARC4_ENCODE(a, wtype=arc4.uint64), b: ARC4_ENCODE(d, wtype=arc4.dynamic_array) }).a, b=#0.b))) + } + + testDecoding(): void + { + assert(ARC4_DECODE(reinterpret_cast(a_bytes)) == a) + assert(ARC4_DECODE(reinterpret_cast(b_bytes)) == b) + assert(ARC4_DECODE(reinterpret_cast(c_bytes)) == c) + assert(ARC4_DECODE(reinterpret_cast>(d_bytes)) == d) + assert(reinterpret_cast(ARC4_DECODE(reinterpret_cast(e_bytes)).a) == reinterpret_cast(e.a) and reinterpret_cast(ARC4_DECODE(reinterpret_cast(e_bytes)).b) == reinterpret_cast(e.b), comment=assert target is match for conditions) + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + + BaseContract::constructor(): void + { + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json new file mode 100644 index 00000000..6f5b98e2 --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json @@ -0,0 +1,4057 @@ +[ + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "id": "tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode", + "name": "Arc4EncodeDecode", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 2, + "end_column": 70 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 24 + } + }, + { + "_type": "SubroutineArgument", + "name": "b", + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 26, + "end_column": 36 + } + }, + { + "_type": "SubroutineArgument", + "name": "c", + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 38, + "end_column": 48 + } + }, + { + "_type": "SubroutineArgument", + "name": "d", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 50, + "end_column": 58 + } + }, + { + "_type": "SubroutineArgument", + "name": "e", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 60, + "end_column": 69 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 15, + "column": 71, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 4, + "end_column": 50 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 4, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 44, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 29, + "end_column": 43 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 41, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 4, + "end_column": 47 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 4, + "end_column": 47 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4Type", + "name": "arc4.bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "bool" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 41, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 29, + "end_column": 40 + }, + "wtype": { + "_type": "ARC4Type", + "name": "arc4.bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "bool" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 38, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 4, + "end_column": 53 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 4, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 11, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint512", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint512", + "n": "512" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 47, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 29, + "end_column": 46 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint512", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint512", + "n": "512" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 44, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 4, + "end_column": 55 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 4, + "end_column": 55 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 11, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 49, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 29, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 46, + "end_column": 47 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 46 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "e" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 40, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 29, + "end_column": 39 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 37, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "e" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 4, + "end_column": 107 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 4, + "end_column": 107 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 11, + "end_column": 106 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 11, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 11, + "end_column": 34 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,byte[])", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "value": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 22, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 30, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + ] + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 101, + "end_column": 106 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 39, + "end_column": 100 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "TestStruct", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,byte[])", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 43, + "end_column": 53 + }, + "frozen": false, + "desc": null + }, + "values": { + "a": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 39, + "end_column": 100 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 54, + "end_column": 99 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 54, + "end_column": 99 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 59, + "end_column": 73 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 71, + "end_column": 72 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + }, + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 78, + "end_column": 97 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 95, + "end_column": 96 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + } + ] + }, + "id": "0" + }, + "name": "a" + }, + "b": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 39, + "end_column": 100 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 54, + "end_column": 99 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 54, + "end_column": 99 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 59, + "end_column": 73 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 71, + "end_column": 72 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + }, + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 78, + "end_column": 97 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 95, + "end_column": 96 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + } + ] + }, + "id": "0" + }, + "name": "b" + } + } + } + } + }, + "error_message": null + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode", + "member_name": "testEncoding", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 2, + "end_column": 70 + }, + "name": "testEncoding", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 17, + "end_line": 28, + "column": 2, + "end_column": 3 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 18, + "end_line": 18, + "column": 4, + "end_column": 13 + } + }, + { + "_type": "SubroutineArgument", + "name": "a_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 19, + "end_line": 19, + "column": 4, + "end_column": 18 + } + }, + { + "_type": "SubroutineArgument", + "name": "b", + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 20, + "end_line": 20, + "column": 4, + "end_column": 14 + } + }, + { + "_type": "SubroutineArgument", + "name": "b_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 21, + "end_line": 21, + "column": 4, + "end_column": 18 + } + }, + { + "_type": "SubroutineArgument", + "name": "c", + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 22, + "end_line": 22, + "column": 4, + "end_column": 14 + } + }, + { + "_type": "SubroutineArgument", + "name": "c_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 23, + "end_line": 23, + "column": 4, + "end_column": 18 + } + }, + { + "_type": "SubroutineArgument", + "name": "d", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 24, + "end_line": 24, + "column": 4, + "end_column": 13 + } + }, + { + "_type": "SubroutineArgument", + "name": "d_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 25, + "end_line": 25, + "column": 4, + "end_column": 18 + } + }, + { + "_type": "SubroutineArgument", + "name": "e", + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encode-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 26, + "end_line": 26, + "column": 4, + "end_column": 14 + } + }, + { + "_type": "SubroutineArgument", + "name": "e_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 27, + "end_line": 27, + "column": 4, + "end_column": 18 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 28, + "end_line": 35, + "column": 4, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 45 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 38 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 30, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "a_bytes" + } + } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 43, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 4, + "end_column": 46 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 4, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 11, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 11, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 11, + "end_column": 39 + }, + "wtype": { + "_type": "ARC4Type", + "name": "arc4.bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "bool" + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 31, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "b_bytes" + } + } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 44, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 4, + "end_column": 46 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 4, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 39 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint512", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint512", + "n": "512" + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 31, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c_bytes" + } + } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 44, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 4, + "end_column": 45 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 4, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 11, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 11, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 11, + "end_column": 38 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 30, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d_bytes" + } + } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 43, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 16, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encode-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 16, + "end_column": 44 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,byte[])", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 36, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "e_bytes" + } + } + }, + "name": "a" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 46, + "end_column": 47 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encode-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "name": "e" + }, + "name": "a" + } + } + }, + "op": "and", + "right": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "base": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 16, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encode-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 16, + "end_column": 44 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,byte[])", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 36, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "e_bytes" + } + } + }, + "name": "b" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 46, + "end_column": 47 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encode-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "name": "e" + }, + "name": "b" + } + } + } + }, + "error_message": "assert target is match for conditions" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode", + "member_name": "testDecoding", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 17, + "end_line": 28, + "column": 2, + "end_column": 3 + }, + "name": "testDecoding", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "e": { + "name": "TestObj", + "elements": [ + [ + "a", + "uint64" + ], + [ + "b", + "byte[]" + ] + ] + } + } + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true + } + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + } +] \ No newline at end of file diff --git a/tests/approvals/out/arc4-struct/StructDemo.approval.teal b/tests/approvals/out/arc4-struct/StructDemo.approval.teal new file mode 100644 index 00000000..e7173b41 --- /dev/null +++ b/tests/approvals/out/arc4-struct/StructDemo.approval.teal @@ -0,0 +1,311 @@ +#pragma version 10 + +tests/approvals/arc4-struct.algo.ts::StructDemo.approvalProgram: + intcblock 0 8 1 + bytecblock 0x 0x0000000000000000 0x151f7c75 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/arc4-struct.algo.ts::StructDemo.constructor() -> void: +constructor: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + proto 0 0 + retsub + + +// tests/approvals/arc4-struct.algo.ts::StructDemo.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@8 + txna ApplicationArgs 0 + pushbytes 0x89388ddd // method "testVectorCreationAndEquality()void" + pushbytes 0xef322d6d // method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)" + pushbytes 0xcb81deb8 // method "implicitCastingAndSpreading((uint64,uint64))void" + pushbytes 0xf79d6c46 // method "toAndFromBytes((uint64,uint64))(uint64,uint64)" + uncover 4 + match __puya_arc4_router___testVectorCreationAndEquality_route@2 __puya_arc4_router___addVectors_route@3 __puya_arc4_router___implicitCastingAndSpreading_route@4 __puya_arc4_router___toAndFromBytes_route@5 + b __puya_arc4_router___switch_case_default@6 + +__puya_arc4_router___testVectorCreationAndEquality_route@2: + // tests/approvals/arc4-struct.algo.ts:10 + // public testVectorCreationAndEquality() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub testVectorCreationAndEquality + intc_2 // 1 + retsub + +__puya_arc4_router___addVectors_route@3: + // tests/approvals/arc4-struct.algo.ts:18 + // public addVectors(v1: Vector, v2: Vector) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + txna ApplicationArgs 1 + txna ApplicationArgs 2 + // tests/approvals/arc4-struct.algo.ts:18 + // public addVectors(v1: Vector, v2: Vector) { + callsub addVectors + bytec_2 // 0x151f7c75 + swap + concat + log + intc_2 // 1 + retsub + +__puya_arc4_router___implicitCastingAndSpreading_route@4: + // tests/approvals/arc4-struct.algo.ts:25 + // public implicitCastingAndSpreading(v1: Vector) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + txna ApplicationArgs 1 + // tests/approvals/arc4-struct.algo.ts:25 + // public implicitCastingAndSpreading(v1: Vector) { + callsub implicitCastingAndSpreading + intc_2 // 1 + retsub + +__puya_arc4_router___toAndFromBytes_route@5: + // tests/approvals/arc4-struct.algo.ts:32 + // public toAndFromBytes(v1: Vector): Vector { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + txna ApplicationArgs 1 + // tests/approvals/arc4-struct.algo.ts:32 + // public toAndFromBytes(v1: Vector): Vector { + callsub toAndFromBytes + bytec_2 // 0x151f7c75 + swap + concat + log + intc_2 // 1 + retsub + +__puya_arc4_router___switch_case_default@6: + b __puya_arc4_router___after_if_else@12 + +__puya_arc4_router___bare_routing@8: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@9 + b __puya_arc4_router___switch_case_default@10 + +__puya_arc4_router_____algots__.defaultCreate@9: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_2 // 1 + retsub + +__puya_arc4_router___switch_case_default@10: + +__puya_arc4_router___after_if_else@12: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/arc4-struct.algo.ts::StructDemo.testVectorCreationAndEquality() -> void: +testVectorCreationAndEquality: + // tests/approvals/arc4-struct.algo.ts:10 + // public testVectorCreationAndEquality() { + proto 0 0 + // tests/approvals/arc4-struct.algo.ts:11 + // const v1 = new Vector({ x: new ARC4Uint64(0), y: new ARC4Uint64(0) }) + bytec_0 // 0x + bytec_1 // 0x0000000000000000 + concat + bytec_1 // 0x0000000000000000 + concat + // tests/approvals/arc4-struct.algo.ts:12 + // log(v1.x) + dup + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds + log + // tests/approvals/arc4-struct.algo.ts:13 + // log(v1.y) + dup + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds + log + // tests/approvals/arc4-struct.algo.ts:14 + // const v2 = new Vector({ y: new ARC4Uint64(0), x: new ARC4Uint64(0) }) + bytec_0 // 0x + bytec_1 // 0x0000000000000000 + concat + bytec_1 // 0x0000000000000000 + concat + // tests/approvals/arc4-struct.algo.ts:15 + // assert(v1 === v2) + == + assert + retsub + + +// tests/approvals/arc4-struct.algo.ts::StructDemo.addVectors(v1: bytes, v2: bytes) -> bytes: +addVectors: + // tests/approvals/arc4-struct.algo.ts:18 + // public addVectors(v1: Vector, v2: Vector) { + proto 2 1 + // tests/approvals/arc4-struct.algo.ts:20 + // x: new ARC4Uint64(v1.x.native + v2.x.native), + frame_dig -2 + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds + btoi + frame_dig -1 + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds + btoi + + + itob + // tests/approvals/arc4-struct.algo.ts:21 + // y: new ARC4Uint64(v1.y.native + v2.y.native), + frame_dig -2 + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds + btoi + frame_dig -1 + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds + btoi + + + itob + // tests/approvals/arc4-struct.algo.ts:19-22 + // return new Vector({ + // x: new ARC4Uint64(v1.x.native + v2.x.native), + // y: new ARC4Uint64(v1.y.native + v2.y.native), + // }) + bytec_0 // 0x + uncover 2 + concat + swap + concat + retsub + + +// tests/approvals/arc4-struct.algo.ts::StructDemo.implicitCastingAndSpreading(v1: bytes) -> void: +implicitCastingAndSpreading: + // tests/approvals/arc4-struct.algo.ts:25 + // public implicitCastingAndSpreading(v1: Vector) { + proto 1 0 + // tests/approvals/arc4-struct.algo.ts:26 + // const v2 = new Vector(v1) + frame_dig -1 + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds + frame_dig -1 + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds + bytec_0 // 0x + uncover 2 + concat + swap + concat + // tests/approvals/arc4-struct.algo.ts:27 + // const v3 = new Vector({ ...v2 }) + dup + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds + swap + dup + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds + bytec_0 // 0x + uncover 3 + concat + swap + concat + // tests/approvals/arc4-struct.algo.ts:28 + // assert(v1.bytes === v2.bytes) + frame_dig -1 + uncover 2 + == + assert + // tests/approvals/arc4-struct.algo.ts:29 + // assert(v3.bytes === v1.bytes) + frame_dig -1 + == + assert + retsub + + +// tests/approvals/arc4-struct.algo.ts::StructDemo.toAndFromBytes(v1: bytes) -> bytes: +toAndFromBytes: + // tests/approvals/arc4-struct.algo.ts:32 + // public toAndFromBytes(v1: Vector): Vector { + proto 1 1 + // tests/approvals/arc4-struct.algo.ts:33 + // const v1_bytes = v1.bytes + frame_dig -1 + // tests/approvals/arc4-struct.algo.ts:34 + // return interpretAsArc4(v1_bytes) + retsub + + +// tests/approvals/arc4-struct.algo.ts::StructDemo.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/arc4-struct/StructDemo.arc32.json b/tests/approvals/out/arc4-struct/StructDemo.arc32.json index b965265a..82a4c0f3 100644 --- a/tests/approvals/out/arc4-struct/StructDemo.arc32.json +++ b/tests/approvals/out/arc4-struct/StructDemo.arc32.json @@ -50,10 +50,63 @@ ] } } + }, + "implicitCastingAndSpreading((uint64,uint64))void": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "v1": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + } + } + }, + "toAndFromBytes((uint64,uint64))(uint64,uint64)": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "v1": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + }, + "output": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + } + } } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwCiAgICBieXRlY2Jsb2NrIDB4MDAwMDAwMDAwMDAwMDAwMAogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6OlN0cnVjdERlbW8uX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQ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ZW1vLnRvQW5kRnJvbUJ5dGVzKHYxOiBieXRlcykgLT4gYnl0ZXM6CnRvQW5kRnJvbUJ5dGVzOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6MzIKICAgIC8vIHB1YmxpYyB0b0FuZEZyb21CeXRlcyh2MTogVmVjdG9yKTogVmVjdG9yIHsKICAgIHByb3RvIDEgMQogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6MzMKICAgIC8vIGNvbnN0IHYxX2J5dGVzID0gdjEuYnl0ZXMKICAgIGZyYW1lX2RpZyAtMQogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6MzQKICAgIC8vIHJldHVybiBpbnRlcnByZXRBc0FyYzQ8VmVjdG9yPih2MV9ieXRlcykKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9hcmM0LXN0cnVjdC5hbGdvLnRzOjpTdHJ1Y3REZW1vLl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hcmM0LXN0cnVjdC5hbGdvLnRzOjkKICAgIC8vIGNsYXNzIFN0cnVjdERlbW8gZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1Ygo=", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { @@ -103,6 +156,32 @@ "returns": { "type": "(uint64,uint64)" } + }, + { + "name": "implicitCastingAndSpreading", + "args": [ + { + "type": "(uint64,uint64)", + "name": "v1" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "toAndFromBytes", + "args": [ + { + "type": "(uint64,uint64)", + "name": "v1" + } + ], + "readonly": false, + "returns": { + "type": "(uint64,uint64)" + } } ], "networks": {} diff --git a/tests/approvals/out/arc4-struct/StructDemo.arc56.json b/tests/approvals/out/arc4-struct/StructDemo.arc56.json new file mode 100644 index 00000000..c95e0ad9 --- /dev/null +++ b/tests/approvals/out/arc4-struct/StructDemo.arc56.json @@ -0,0 +1,195 @@ +{ + "name": "StructDemo", + "structs": { + "Vector": [ + { + "name": "x", + "type": "uint64" + }, + { + "name": "y", + "type": "uint64" + } + ] + }, + "methods": [ + { + "name": "testVectorCreationAndEquality", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "addVectors", + "args": [ + { + "type": "(uint64,uint64)", + "struct": "Vector", + "name": "v1" + }, + { + "type": "(uint64,uint64)", + "struct": "Vector", + "name": "v2" + } + ], + "returns": { + "type": "(uint64,uint64)", + "struct": "Vector" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "implicitCastingAndSpreading", + "args": [ + { + "type": "(uint64,uint64)", + "struct": "Vector", + "name": "v1" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "toAndFromBytes", + "args": [ + { + "type": "(uint64,uint64)", + "struct": "Vector", + "name": "v1" + } + ], + "returns": { + "type": "(uint64,uint64)", + "struct": "Vector" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 208, + 213, + 230, + 236, + 244, + 250, + 268, + 273, + 283, + 288 + ], + "errorMessage": "Index access is out of bounds" + }, + { + "pc": [ + 95, + 110, + 135, + 153 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 189 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 100, + 115, + 140, + 158 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCA4IDEKICAgIGJ5dGVjYmxvY2sgMHggMHgwMDAwMDAwMDAwMDAwMDAwIDB4MTUxZjdjNzUKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6OlN0cnVjdERlbW8uY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hcmM0LXN0cnVjdC5hbGdvLnRzOjkKICAgIC8vIGNsYXNzIFN0cnVjdERlbW8gZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1YgoKCi8vIHRlc3RzL2Fwc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dvLnRzOjkKICAgIC8vIGNsYXNzIFN0cnVjdERlbW8gZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/arc4-struct/StructDemo.clear.teal b/tests/approvals/out/arc4-struct/StructDemo.clear.teal new file mode 100644 index 00000000..a4fb2c83 --- /dev/null +++ b/tests/approvals/out/arc4-struct/StructDemo.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/arc4-struct.algo.ts::StructDemo.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/arc4-struct/StructDemo.ssa.ir b/tests/approvals/out/arc4-struct/StructDemo.ssa.ir new file mode 100644 index 00000000..22185dc2 --- /dev/null +++ b/tests/approvals/out/arc4-struct/StructDemo.ssa.ir @@ -0,0 +1,180 @@ +contract tests/approvals/arc4-struct.algo.ts::StructDemo: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/arc4-struct.algo.ts::StructDemo.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/arc4-struct.algo.ts::StructDemo.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.constructor() -> void: + block@0: // L9 + return + + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.__puya_arc4_router__() -> bool: + block@0: // L9 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@8 + block@1: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "testVectorCreationAndEquality()void" => block@2, method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)" => block@3, method "implicitCastingAndSpreading((uint64,uint64))void" => block@4, method "toAndFromBytes((uint64,uint64))(uint64,uint64)" => block@5, * => block@6} + block@2: // testVectorCreationAndEquality_route_L10 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + tests/approvals/arc4-struct.algo.ts::StructDemo.testVectorCreationAndEquality() + return 1u + block@3: // addVectors_route_L18 + let tmp%7#0: uint64 = (txn OnCompletion) + let tmp%8#0: bool = (== tmp%7#0 NoOp) + (assert tmp%8#0) // OnCompletion is not NoOp + let tmp%9#0: uint64 = (txn ApplicationID) + let tmp%10#0: bool = (!= tmp%9#0 0u) + (assert tmp%10#0) // can only call when not creating + let tmp%11#0: bytes = (txna ApplicationArgs 1) + let tmp%12#0: bytes = (txna ApplicationArgs 2) + let tmp%13#0: bytes = tests/approvals/arc4-struct.algo.ts::StructDemo.addVectors(tmp%11#0, tmp%12#0) + let tmp%14#0: bytes = (concat 0x151f7c75 tmp%13#0) + (log tmp%14#0) + return 1u + block@4: // implicitCastingAndSpreading_route_L25 + let tmp%15#0: uint64 = (txn OnCompletion) + let tmp%16#0: bool = (== tmp%15#0 NoOp) + (assert tmp%16#0) // OnCompletion is not NoOp + let tmp%17#0: uint64 = (txn ApplicationID) + let tmp%18#0: bool = (!= tmp%17#0 0u) + (assert tmp%18#0) // can only call when not creating + let tmp%19#0: bytes = (txna ApplicationArgs 1) + tests/approvals/arc4-struct.algo.ts::StructDemo.implicitCastingAndSpreading(tmp%19#0) + return 1u + block@5: // toAndFromBytes_route_L32 + let tmp%20#0: uint64 = (txn OnCompletion) + let tmp%21#0: bool = (== tmp%20#0 NoOp) + (assert tmp%21#0) // OnCompletion is not NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + let tmp%23#0: bool = (!= tmp%22#0 0u) + (assert tmp%23#0) // can only call when not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + let tmp%25#0: bytes = tests/approvals/arc4-struct.algo.ts::StructDemo.toAndFromBytes(tmp%24#0) + let tmp%26#0: bytes = (concat 0x151f7c75 tmp%25#0) + (log tmp%26#0) + return 1u + block@6: // switch_case_default_L9 + goto block@7 + block@7: // switch_case_next_L9 + goto block@12 + block@8: // bare_routing_L9 + let tmp%27#0: uint64 = (txn OnCompletion) + switch tmp%27#0 {0u => block@9, * => block@10} + block@9: // __algots__.defaultCreate_L9 + let tmp%28#0: uint64 = (txn ApplicationID) + let tmp%29#0: bool = (== tmp%28#0 0u) + (assert tmp%29#0) // can only call when creating + tests/approvals/arc4-struct.algo.ts::StructDemo.__algots__.defaultCreate() + return 1u + block@10: // switch_case_default_L9 + goto block@11 + block@11: // switch_case_next_L9 + goto block@12 + block@12: // after_if_else_L9 + return 0u + + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.testVectorCreationAndEquality() -> void: + block@0: // L10 + let current_tail_offset%0#0: uint64 = 16u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 0x0000000000000000) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 0x0000000000000000) + let v1#0: bytes = encoded_tuple_buffer%2#0 + let tmp%0#0: bytes = (extract3 v1#0 0u 8u) // on error: Index access is out of bounds + (log tmp%0#0) + let tmp%1#0: bytes = (extract3 v1#0 8u 8u) // on error: Index access is out of bounds + (log tmp%1#0) + let current_tail_offset%1#0: uint64 = 16u + let encoded_tuple_buffer%3#0: bytes = 0x + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 0x0000000000000000) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 0x0000000000000000) + let v2#0: bytes = encoded_tuple_buffer%5#0 + let tmp%2#0: bool = (== v1#0 v2#0) + (assert tmp%2#0) + return + + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.addVectors(v1: bytes, v2: bytes) -> bytes: + block@0: // L18 + let tmp%0#0: bytes = (extract3 v1#0 0u 8u) // on error: Index access is out of bounds + let tmp%1#0: uint64 = (btoi tmp%0#0) + let tmp%2#0: bytes = (extract3 v2#0 0u 8u) // on error: Index access is out of bounds + let tmp%3#0: uint64 = (btoi tmp%2#0) + let to_encode%0#0: uint64 = (+ tmp%1#0 tmp%3#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%4#0: bytes = (extract3 v1#0 8u 8u) // on error: Index access is out of bounds + let tmp%5#0: uint64 = (btoi tmp%4#0) + let tmp%6#0: bytes = (extract3 v2#0 8u 8u) // on error: Index access is out of bounds + let tmp%7#0: uint64 = (btoi tmp%6#0) + let to_encode%1#0: uint64 = (+ tmp%5#0 tmp%7#0) + let val_as_bytes%1#0: bytes = (itob to_encode%1#0) + let tmp%8#0: bytes = (extract3 v1#0 0u 8u) // on error: Index access is out of bounds + let tmp%9#0: uint64 = (btoi tmp%8#0) + let tmp%10#0: bytes = (extract3 v2#0 0u 8u) // on error: Index access is out of bounds + let tmp%11#0: uint64 = (btoi tmp%10#0) + let to_encode%2#0: uint64 = (+ tmp%9#0 tmp%11#0) + let val_as_bytes%2#0: bytes = (itob to_encode%2#0) + let tmp%12#0: bytes = (extract3 v1#0 8u 8u) // on error: Index access is out of bounds + let tmp%13#0: uint64 = (btoi tmp%12#0) + let tmp%14#0: bytes = (extract3 v2#0 8u 8u) // on error: Index access is out of bounds + let tmp%15#0: uint64 = (btoi tmp%14#0) + let to_encode%3#0: uint64 = (+ tmp%13#0 tmp%15#0) + let val_as_bytes%3#0: bytes = (itob to_encode%3#0) + let current_tail_offset%0#0: uint64 = 16u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 val_as_bytes%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 val_as_bytes%3#0) + return encoded_tuple_buffer%2#0 + + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.implicitCastingAndSpreading(v1: bytes) -> void: + block@0: // L25 + let item0%0#0: bytes = (extract3 v1#0 0u 8u) // on error: Index access is out of bounds + let item1%0#0: bytes = (extract3 v1#0 8u 8u) // on error: Index access is out of bounds + let item0%1#0: bytes = (extract3 v1#0 0u 8u) // on error: Index access is out of bounds + let item1%1#0: bytes = (extract3 v1#0 8u 8u) // on error: Index access is out of bounds + let current_tail_offset%0#0: uint64 = 16u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 item0%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 item1%1#0) + let v2#0: bytes = encoded_tuple_buffer%2#0 + let tmp%0#0: bytes = (extract3 v2#0 0u 8u) // on error: Index access is out of bounds + let tmp%1#0: bytes = (extract3 v2#0 8u 8u) // on error: Index access is out of bounds + let tmp%2#0: bytes = (extract3 v2#0 0u 8u) // on error: Index access is out of bounds + let tmp%3#0: bytes = (extract3 v2#0 8u 8u) // on error: Index access is out of bounds + let current_tail_offset%1#0: uint64 = 16u + let encoded_tuple_buffer%3#0: bytes = 0x + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 tmp%0#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 tmp%3#0) + let v3#0: bytes = encoded_tuple_buffer%5#0 + let tmp%4#0: bool = (== v1#0 v2#0) + (assert tmp%4#0) + let tmp%5#0: bool = (== v3#0 v1#0) + (assert tmp%5#0) + return + + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.toAndFromBytes(v1: bytes) -> bytes: + block@0: // L32 + let v1_bytes#0: bytes = v1#0 + return v1_bytes#0 + + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.__algots__.defaultCreate() -> void: + block@0: // L9 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst b/tests/approvals/out/arc4-struct/arc4-struct.awst index 567b92e5..5f966ab1 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst @@ -18,7 +18,7 @@ contract StructDemo 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) + v2: Vector = new Vector(x=(#1 = { x: (#2 = { y: 0, x: 0 }).x, y: #2.y }).x, y=#1.y) assert(reinterpret_cast(v1) == reinterpret_cast(v2)) } @@ -27,6 +27,20 @@ contract StructDemo return new Vector(x=(#3 = { x: ARC4_ENCODE(ARC4_DECODE(v1.x) + ARC4_DECODE(v2.x), wtype=arc4.uint64), y: ARC4_ENCODE(ARC4_DECODE(v1.y) + ARC4_DECODE(v2.y), wtype=arc4.uint64) }).x, y=#3.y) } + implicitCastingAndSpreading(): void + { + v2: Vector = new Vector(x=(#4 = ARC4_DECODE(v1)).x, y=#4.y) + v3: Vector = new Vector(x=(#5 = { x: v2.x, y: v2.y }).x, y=#5.y) + assert(reinterpret_cast(v1) == reinterpret_cast(v2)) + assert(reinterpret_cast(v3) == reinterpret_cast(v1)) + } + + toAndFromBytes(): Vector + { + v1_bytes: bytes = reinterpret_cast(v1) + return reinterpret_cast(v1_bytes) + } + constructor(): void { void @@ -34,11 +48,11 @@ contract StructDemo Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst.json b/tests/approvals/out/arc4-struct/arc4-struct.awst.json index acf7b3f7..956b3458 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst.json +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst.json @@ -109,8 +109,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -349,7 +348,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -391,7 +390,8 @@ "column": 10, "end_column": 12 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, @@ -411,7 +411,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -453,7 +453,8 @@ "column": 19, "end_column": 25 }, - "frozen": false + "frozen": false, + "desc": null }, "values": { "x": { @@ -492,7 +493,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -546,7 +547,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -688,7 +689,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -742,7 +743,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -901,7 +902,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 12, "end_line": 12, - "column": 8, + "column": 11, "end_column": 12 }, "wtype": { @@ -936,7 +937,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -978,15 +979,15 @@ "column": 8, "end_column": 10 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, "name": "x" } } - ], - "comment": null + ] } }, { @@ -1039,7 +1040,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 13, "end_line": 13, - "column": 8, + "column": 11, "end_column": 12 }, "wtype": { @@ -1074,7 +1075,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -1116,15 +1117,15 @@ "column": 8, "end_column": 10 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, "name": "y" } } - ], - "comment": null + ] } }, { @@ -1152,7 +1153,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -1194,7 +1195,8 @@ "column": 10, "end_column": 12 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -1214,7 +1216,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -1256,7 +1258,8 @@ "column": 19, "end_column": 25 }, - "frozen": false + "frozen": false, + "desc": null }, "values": { "x": { @@ -1295,7 +1298,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1349,7 +1352,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1429,7 +1432,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1483,7 +1486,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1585,7 +1588,7 @@ } ] }, - "id": "1" + "id": "2" }, "name": "x" }, @@ -1625,7 +1628,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1679,7 +1682,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1781,13 +1784,13 @@ } ] }, - "id": "1" + "id": "2" }, "name": "y" } ] }, - "id": "2" + "id": "1" }, "name": "x" }, @@ -1827,7 +1830,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1881,7 +1884,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1961,7 +1964,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2015,7 +2018,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2117,7 +2120,7 @@ } ] }, - "id": "1" + "id": "2" }, "name": "x" }, @@ -2157,7 +2160,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2211,7 +2214,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2313,13 +2316,13 @@ } ] }, - "id": "1" + "id": "2" }, "name": "y" } ] }, - "id": "2" + "id": "1" }, "name": "y" } @@ -2333,16 +2336,16 @@ "line": 15, "end_line": 15, "column": 4, - "end_column": 25 + "end_column": 21 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 15, "end_line": 15, "column": 4, - "end_column": 25 + "end_column": 21 }, "wtype": { "_type": "WType", @@ -2351,43 +2354,89 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 15, + "end_line": 15, + "column": 11, + "end_column": 20 + }, + "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 + "end_column": 20 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 15, "end_line": 15, "column": 11, - "end_column": 24 + "end_column": 13 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4Struct", + "name": "Vector", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 15, @@ -2395,143 +2444,95 @@ "column": 11, "end_column": 13 }, - "wtype": { - "_type": "ARC4Struct", - "name": "Vector", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64,uint64", - "fields": { - "x": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "y": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - }, - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 15, - "end_line": 15, - "column": 11, - "end_column": 13 - }, - "frozen": false - }, - "name": "v1" - } + "frozen": false, + "desc": null + }, + "name": "v1" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 15, + "end_line": 15, + "column": 11, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 15, "end_line": 15, - "column": 11, - "end_column": 24 + "column": 18, + "end_column": 20 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4Struct", + "name": "Vector", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 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", + "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 }, - "y": { - "_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" - } - }, - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 15, - "end_line": 15, - "column": 21, - "end_column": 23 - }, - "frozen": false + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } }, - "name": "v2" - } + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 15, + "end_line": 15, + "column": 18, + "end_column": 20 + }, + "frozen": false, + "desc": null + }, + "name": "v2" } } - ], - "comment": null + }, + "error_message": null } } ], @@ -2586,7 +2587,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -2628,7 +2629,8 @@ "column": 24, "end_column": 30 }, - "frozen": false + "frozen": false, + "desc": null }, "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", @@ -2648,7 +2650,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -2690,7 +2692,8 @@ "column": 36, "end_column": 42 }, - "frozen": false + "frozen": false, + "desc": null }, "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", @@ -2708,7 +2711,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -2750,7 +2753,8 @@ "column": 2, "end_column": 43 }, - "frozen": false + "frozen": false, + "desc": null }, "body": { "_type": "Block", @@ -2787,7 +2791,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -2829,7 +2833,8 @@ "column": 15, "end_column": 21 }, - "frozen": false + "frozen": false, + "desc": null }, "values": { "x": { @@ -2868,7 +2873,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2922,7 +2927,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3013,7 +3018,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 24, + "column": 29, "end_column": 35 }, "wtype": { @@ -3029,7 +3034,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 24, + "column": 27, "end_column": 28 }, "wtype": { @@ -3064,7 +3069,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -3106,7 +3111,8 @@ "column": 24, "end_column": 26 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, @@ -3120,7 +3126,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 38, + "column": 43, "end_column": 49 }, "wtype": { @@ -3136,7 +3142,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 38, + "column": 41, "end_column": 42 }, "wtype": { @@ -3171,7 +3177,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -3213,7 +3219,8 @@ "column": 38, "end_column": 40 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -3269,7 +3276,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 24, + "column": 29, "end_column": 35 }, "wtype": { @@ -3285,7 +3292,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 24, + "column": 27, "end_column": 28 }, "wtype": { @@ -3320,7 +3327,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -3362,7 +3369,8 @@ "column": 24, "end_column": 26 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, @@ -3376,7 +3384,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 38, + "column": 43, "end_column": 49 }, "wtype": { @@ -3392,7 +3400,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 38, + "column": 41, "end_column": 42 }, "wtype": { @@ -3427,7 +3435,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -3469,7 +3477,8 @@ "column": 38, "end_column": 40 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -3520,7 +3529,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3574,7 +3583,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3665,7 +3674,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 24, + "column": 29, "end_column": 35 }, "wtype": { @@ -3681,7 +3690,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 24, + "column": 27, "end_column": 28 }, "wtype": { @@ -3716,7 +3725,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -3758,7 +3767,8 @@ "column": 24, "end_column": 26 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, @@ -3772,7 +3782,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 38, + "column": 43, "end_column": 49 }, "wtype": { @@ -3788,7 +3798,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 38, + "column": 41, "end_column": 42 }, "wtype": { @@ -3823,7 +3833,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -3865,7 +3875,8 @@ "column": 38, "end_column": 40 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -3921,7 +3932,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 24, + "column": 29, "end_column": 35 }, "wtype": { @@ -3937,7 +3948,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 24, + "column": 27, "end_column": 28 }, "wtype": { @@ -3972,7 +3983,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -4014,7 +4025,8 @@ "column": 24, "end_column": 26 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, @@ -4028,7 +4040,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 38, + "column": 43, "end_column": 49 }, "wtype": { @@ -4044,7 +4056,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 38, + "column": 41, "end_column": 42 }, "wtype": { @@ -4079,7 +4091,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -4121,7 +4133,8 @@ "column": 38, "end_column": 40 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -4215,56 +4228,2201 @@ "_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 + "line": 25, + "end_line": 25, + "column": 2, + "end_column": 48 }, - "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": 9, - "end_line": 9, - "column": 0, - "end_column": 35 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - } - } - } + "args": [ + { + "_type": "SubroutineArgument", + "name": "v1", + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 25, + "end_line": 25, + "column": 41, + "end_column": 47 + }, + "frozen": false, + "desc": null + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 25, + "end_line": 25, + "column": 37, + "end_column": 47 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 25, + "end_line": 30, + "column": 49, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 10, + "end_column": 29 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 10, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 10, + "end_column": 12 + }, + "frozen": false, + "desc": null + }, + "name": "v2" + }, + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 15, + "end_column": 29 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 19, + "end_column": 25 + }, + "frozen": false, + "desc": null + }, + "values": { + "x": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 15, + "end_column": 29 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "frozen": false, + "desc": null + }, + "name": "v1" + } + }, + "id": "4" + }, + "name": "x" + }, + "y": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 15, + "end_column": 29 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "frozen": false, + "desc": null + }, + "name": "v1" + } + }, + "id": "4" + }, + "name": "y" + } + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 10, + "end_column": 36 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 10, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 10, + "end_column": 12 + }, + "frozen": false, + "desc": null + }, + "name": "v3" + }, + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 15, + "end_column": 36 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 19, + "end_column": 25 + }, + "frozen": false, + "desc": null + }, + "values": { + "x": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 15, + "end_column": 36 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "items": [ + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "frozen": false, + "desc": null + }, + "name": "v2" + }, + "name": "x" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "frozen": false, + "desc": null + }, + "name": "v2" + }, + "name": "y" + } + ] + }, + "id": "5" + }, + "name": "x" + }, + "y": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 15, + "end_column": 36 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "items": [ + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "frozen": false, + "desc": null + }, + "name": "v2" + }, + "name": "x" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "frozen": false, + "desc": null + }, + "name": "v2" + }, + "name": "y" + } + ] + }, + "id": "5" + }, + "name": "y" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 4, + "end_column": 33 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 4, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 11, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 14, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 11, + "end_column": 13 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 11, + "end_column": 13 + }, + "frozen": false, + "desc": null + }, + "name": "v1" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 27, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 24, + "end_column": 26 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 24, + "end_column": 26 + }, + "frozen": false, + "desc": null + }, + "name": "v2" + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 33 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 14, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 13 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 13 + }, + "frozen": false, + "desc": null + }, + "name": "v3" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 27, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 24, + "end_column": 26 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 24, + "end_column": 26 + }, + "frozen": false, + "desc": null + }, + "name": "v1" + } + } + }, + "error_message": null + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-struct.algo.ts::StructDemo", + "member_name": "implicitCastingAndSpreading", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 25, + "end_line": 25, + "column": 2, + "end_column": 48 + }, + "name": "implicitCastingAndSpreading", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "v1": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + } + } + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 32, + "end_line": 32, + "column": 2, + "end_column": 43 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "v1", + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 32, + "end_line": 32, + "column": 28, + "end_column": 34 + }, + "frozen": false, + "desc": null + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 32, + "end_line": 32, + "column": 24, + "end_column": 34 + } + } + ], + "return_type": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 32, + "end_line": 32, + "column": 2, + "end_column": 43 + }, + "frozen": false, + "desc": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 32, + "end_line": 35, + "column": 44, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 33, + "end_line": 33, + "column": 10, + "end_column": 29 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 33, + "end_line": 33, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "v1_bytes" + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 33, + "end_line": 33, + "column": 24, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 33, + "end_line": 33, + "column": 21, + "end_column": 23 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 33, + "end_line": 33, + "column": 21, + "end_column": 23 + }, + "frozen": false, + "desc": null + }, + "name": "v1" + } + } + }, + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 44 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 34, + "end_line": 34, + "column": 11, + "end_column": 44 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 34, + "end_line": 34, + "column": 11, + "end_column": 44 + }, + "frozen": false, + "desc": null + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 34, + "end_line": 34, + "column": 35, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "v1_bytes" + } + } + } ], "label": null, "comment": null @@ -4276,18 +6434,62 @@ "returns": null }, "cref": "tests/approvals/arc4-struct.algo.ts::StructDemo", - "member_name": "constructor", - "arc4_method_config": null + "member_name": "toAndFromBytes", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 32, + "end_line": 32, + "column": 2, + "end_column": 43 + }, + "name": "toAndFromBytes", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "v1": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + }, + "output": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + } + } + } }, { "_type": "ContractMethod", "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 9, + "end_line": 9, "column": 0, - "end_column": 1 + "end_column": 35 }, "args": [], "return_type": { @@ -4300,14 +6502,41 @@ "body": { "_type": "Block", "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 9, + "end_line": 9, "column": 0, - "end_column": 1 + "end_column": 35 }, - "body": [], + "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": 9, + "end_line": 9, + "column": 0, + "end_column": 35 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], "label": null, "comment": null }, @@ -4317,7 +6546,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "tests/approvals/arc4-struct.algo.ts::StructDemo", "member_name": "constructor", "arc4_method_config": null }, @@ -4398,6 +6627,48 @@ "member_name": "constructor", "arc4_method_config": null }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + }, { "_type": "ContractMethod", "source_location": { @@ -4460,6 +6731,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal new file mode 100644 index 00000000..f21ef48a --- /dev/null +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal @@ -0,0 +1,463 @@ +#pragma version 10 + +tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.approvalProgram: + intcblock 0 1 8 2 + bytecblock 0x 0x0000 0x00 base32(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) 0x000548656c6c6f + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/arc4-types.algo.ts:140 + // testStr() + callsub testStr + // tests/approvals/arc4-types.algo.ts:141 + // testUintN(1, 2n, new UintN<256>(4)) + intc_1 // 1 + pushbytes 0x02 + pushbytes 0x0000000000000000000000000000000000000000000000000000000000000004 + callsub testUintN + // tests/approvals/arc4-types.algo.ts:142 + // testUFixed() + callsub testUFixed + // tests/approvals/arc4-types.algo.ts:143 + // testByte() + callsub testByte + // tests/approvals/arc4-types.algo.ts:144 + // testArrays(new UintN<64>(65)) + pushbytes 0x0000000000000041 + callsub testArrays + // tests/approvals/arc4-types.algo.ts:145 + // testAddress() + callsub testAddress + // tests/approvals/arc4-types.algo.ts:146 + // testTuple() + callsub testTuple + // tests/approvals/arc4-types.algo.ts:147 + // testUFixed() + callsub testUFixed + // tests/approvals/arc4-types.algo.ts:148 + // testDynamicBytes(Bytes('hmmmmmmmmm')) + pushbytes "hmmmmmmmmm" + callsub testDynamicBytes + // tests/approvals/arc4-types.algo.ts:149 + // testStaticBytes() + callsub testStaticBytes + // tests/approvals/arc4-types.algo.ts:150 + // const result = new arc4.DynamicArray>() + bytec_1 // 0x0000 + bytec_0 // 0x + concat + // tests/approvals/arc4-types.algo.ts:151 + // assert(result.length === 0) + intc_0 // 0 + extract_uint16 + intc_0 // 0 + == + assert + // tests/approvals/arc4-types.algo.ts:152 + // return true + intc_1 // 1 + return + + +// tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.constructor() -> void: +constructor: + // tests/approvals/arc4-types.algo.ts:133 + // export class Arc4TypesTestContract extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/arc4-types.algo.ts::testStr() -> void: +testStr: + // tests/approvals/arc4-types.algo.ts:62 + // function testStr() { + proto 0 0 + // tests/approvals/arc4-types.algo.ts:63 + // const s1 = new Str() + bytec_1 // 0x0000 + // tests/approvals/arc4-types.algo.ts:64 + // assert(s1.bytes === new UintN<16>(0).bytes, 'Empty string should equal the uint16 length prefix') + dup + == + assert // Empty string should equal the uint16 length prefix + // tests/approvals/arc4-types.algo.ts:65 + // const s2 = new Str('Hello') + bytec 4 // 0x000548656c6c6f + // tests/approvals/arc4-types.algo.ts:66 + // assert(s2.native === 'Hello') + extract 2 0 + pushbytes "Hello" + == + assert + // tests/approvals/arc4-types.algo.ts:65 + // const s2 = new Str('Hello') + bytec 4 // 0x000548656c6c6f + dup + // tests/approvals/arc4-types.algo.ts:72 + // assert(s2 === s2_from_bytes) + == + assert + retsub + + +// tests/approvals/arc4-types.algo.ts::testUintN(n: uint64, b: bytes, c: bytes) -> void: +testUintN: + // tests/approvals/arc4-types.algo.ts:27 + // function testUintN(n: uint64, b: biguint, c: UintN<256>) { + proto 3 0 + // tests/approvals/arc4-types.algo.ts:28 + // const x = new UintN<8>(4) + pushbytes 0x04 + // tests/approvals/arc4-types.algo.ts:29 + // assert(x.bytes.length === 1) + len + intc_1 // 1 + == + assert + // tests/approvals/arc4-types.algo.ts:30 + // const x2 = new UintN<8>(255n) + pushbytes 0xff + // tests/approvals/arc4-types.algo.ts:31 + // assert(x2.bytes === Bytes.fromHex('ff')) + dup + == + assert + // tests/approvals/arc4-types.algo.ts:33 + // const y = new UintN<16>() + bytec_1 // 0x0000 + // tests/approvals/arc4-types.algo.ts:34 + // assert(y.bytes.length === 2) + len + intc_3 // 2 + == + assert + // tests/approvals/arc4-types.algo.ts:35 + // const z = new UintN<8>(n) + frame_dig -3 + itob + extract 7 1 + // tests/approvals/arc4-types.algo.ts:36 + // const z_native = z.native + btoi + // tests/approvals/arc4-types.algo.ts:37 + // assert(z_native === n) + frame_dig -3 + == + assert + // tests/approvals/arc4-types.algo.ts:40 + // const a = new UintN<128>(b) + frame_dig -2 + len + pushint 16 // 16 + <= + assert // overflow + pushint 16 // 16 + bzero + frame_dig -2 + b| + // tests/approvals/arc4-types.algo.ts:41 + // const a_native = a.native + dup + // tests/approvals/arc4-types.algo.ts:42 + // assert(a_native === b) + frame_dig -2 + b== + assert + // tests/approvals/arc4-types.algo.ts:44 + // assert(c.bytes.length === 256 / 8) + frame_dig -1 + len + pushint 32 // 32 + == + assert + // tests/approvals/arc4-types.algo.ts:46 + // const a_bytes = a.bytes + dup + // tests/approvals/arc4-types.algo.ts:49 + // assert(a_from_bytes === a) + == + assert + // tests/approvals/arc4-types.algo.ts:51 + // const aliased64 = new UintN64(12) + pushbytes 0x000000000000000c + // tests/approvals/arc4-types.algo.ts:53 + // assert(aliased64.native === 12) + btoi + pushint 12 // 12 + == + assert + // tests/approvals/arc4-types.algo.ts:54 + // const aliased32 = new UintN32(50545) + pushbytes 0x0000c571 + // tests/approvals/arc4-types.algo.ts:55 + // assert(BigUint(aliased32.bytes) === 50545n) + pushbytes 0xc571 + b== + assert + // tests/approvals/arc4-types.algo.ts:57 + // const byte = new Byte(255) + pushbytes 0xff + // tests/approvals/arc4-types.algo.ts:59 + // assert(byte.bytes.bitwiseInvert() === Bytes.fromHex('00')) + b~ + bytec_2 // 0x00 + == + assert + retsub + + +// tests/approvals/arc4-types.algo.ts::testUFixed() -> void: +testUFixed: + // tests/approvals/arc4-types.algo.ts:20 + // function testUFixed() { + proto 0 0 + // tests/approvals/arc4-types.algo.ts:21 + // const a = new UFixedNxM<32, 4>('1.244') + pushbytes 0x000004dc + // tests/approvals/arc4-types.algo.ts:22 + // const c = new UFixedNxM<32, 4>('1.244') + dup + // tests/approvals/arc4-types.algo.ts:24 + // assert(a === c) + == + assert + retsub + + +// tests/approvals/arc4-types.algo.ts::testByte() -> void: +testByte: + // tests/approvals/arc4-types.algo.ts:109 + // function testByte() { + proto 0 0 + // tests/approvals/arc4-types.algo.ts:110 + // const b = new Byte() + bytec_2 // 0x00 + // tests/approvals/arc4-types.algo.ts:111 + // const b2 = new Byte(0) + dup + // tests/approvals/arc4-types.algo.ts:112 + // assert(b === b2) + == + assert + retsub + + +// tests/approvals/arc4-types.algo.ts::testArrays(n: bytes) -> void: +testArrays: + // tests/approvals/arc4-types.algo.ts:95 + // function testArrays(n: ARC4Uint64) { + proto 1 0 + // tests/approvals/arc4-types.algo.ts:96 + // const myArray = new DynamicArray(n, n, n) + bytec_0 // 0x + frame_dig -1 + concat + frame_dig -1 + concat + frame_dig -1 + concat + pushbytes 0x0003 + swap + concat + // tests/approvals/arc4-types.algo.ts:98 + // myArray.push(n) + extract 2 0 + bytec_0 // 0x + frame_dig -1 + concat + concat + dup + len + intc_2 // 8 + / + itob + extract 6 2 + swap + concat + // tests/approvals/arc4-types.algo.ts:100 + // const myStatic = new StaticArray(n, n) + bytec_0 // 0x + frame_dig -1 + concat + frame_dig -1 + concat + bytec_0 // 0x + swap + concat + // tests/approvals/arc4-types.algo.ts:102 + // assert(myStatic[0] === myArray.pop()) + intc_0 // 0 + intc_2 // 8 + * + intc_2 // 8 + extract3 // on error: Index access is out of bounds + swap + intc_2 // 8 + callsub dynamic_array_pop_fixed_size + pop + == + assert + retsub + + +// tests/approvals/arc4-types.algo.ts::testAddress() -> void: +testAddress: + // tests/approvals/arc4-types.algo.ts:115 + // function testAddress() { + proto 0 0 + // tests/approvals/arc4-types.algo.ts:117 + // const b = new Address(Txn.sender) + txn Sender + // tests/approvals/arc4-types.algo.ts:116 + // const a = new Address() + bytec_3 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + // tests/approvals/arc4-types.algo.ts:119 + // assert(a !== b, 'Zero address should not match sender') + != + assert // Zero address should not match sender + // tests/approvals/arc4-types.algo.ts:116 + // const a = new Address() + bytec_3 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + // tests/approvals/arc4-types.algo.ts:120 + // assert(a === new Address(), 'Two zero addresses should match') + dup + == + assert // Two zero addresses should match + // tests/approvals/arc4-types.algo.ts:121 + // assert(a[0] === new Byte(), 'Zero address should start with zero byte') + intc_0 // 0 + intc_1 // 1 + * + // tests/approvals/arc4-types.algo.ts:116 + // const a = new Address() + bytec_3 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + // tests/approvals/arc4-types.algo.ts:121 + // assert(a[0] === new Byte(), 'Zero address should start with zero byte') + swap + intc_1 // 1 + extract3 // on error: Index access is out of bounds + bytec_2 // 0x00 + == + assert // Zero address should start with zero byte + retsub + + +// tests/approvals/arc4-types.algo.ts::testTuple() -> void: +testTuple: + // tests/approvals/arc4-types.algo.ts:124 + // function testTuple() { + proto 0 0 + // tests/approvals/arc4-types.algo.ts:125 + // const t = new Tuple(new ARC4Uint64(34)) + bytec_0 // 0x + pushbytes 0x0000000000000022 + concat + // tests/approvals/arc4-types.algo.ts:126 + // const firstItem = t.at(0) + dup + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + swap + // tests/approvals/arc4-types.algo.ts:127 + // const firstItemIndexer = t.native[0] + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + // tests/approvals/arc4-types.algo.ts:128 + // assert(firstItem === firstItemIndexer) + == + assert + // tests/approvals/arc4-types.algo.ts:130 + // assert(t1.length === 2) + intc_3 // 2 + dup + == + assert + retsub + + +// tests/approvals/arc4-types.algo.ts::testDynamicBytes(someBytes: bytes) -> void: +testDynamicBytes: + // tests/approvals/arc4-types.algo.ts:75 + // function testDynamicBytes(someBytes: bytes) { + proto 1 0 + // tests/approvals/arc4-types.algo.ts:76 + // const db1 = new DynamicBytes() + bytec_1 // 0x0000 + // tests/approvals/arc4-types.algo.ts:77 + // assert(db1.native === Bytes(), 'No args should give empty bytes') + extract 2 0 + bytec_0 // 0x + == + assert // No args should give empty bytes + // tests/approvals/arc4-types.algo.ts:76 + // const db1 = new DynamicBytes() + bytec_1 // 0x0000 + // tests/approvals/arc4-types.algo.ts:78 + // assert(db1.bytes === new UintN<16>(0).bytes, 'bytes prop should return length header (of 0)') + dup + == + assert // bytes prop should return length header (of 0) + // tests/approvals/arc4-types.algo.ts:79 + // const db2 = new DynamicBytes(someBytes) + frame_dig -1 + len + itob + extract 6 2 + frame_dig -1 + concat + // tests/approvals/arc4-types.algo.ts:80 + // assert(db2.native === someBytes) + extract 2 0 + frame_dig -1 + == + assert + // tests/approvals/arc4-types.algo.ts:82 + // const db3 = new DynamicBytes('hello') + pushbytes 0x000568656c6c6f + // tests/approvals/arc4-types.algo.ts:83 + // assert(db3.native === Bytes('hello')) + extract 2 0 + pushbytes "hello" + == + assert + retsub + + +// tests/approvals/arc4-types.algo.ts::testStaticBytes() -> void: +testStaticBytes: + // tests/approvals/arc4-types.algo.ts:86 + // function testStaticBytes() { + proto 0 0 + retsub + + +// _puya_lib.arc4.dynamic_array_pop_fixed_size(array: bytes, fixed_byte_size: uint64) -> bytes, bytes: +dynamic_array_pop_fixed_size: + proto 2 2 + frame_dig -2 + intc_0 // 0 + extract_uint16 + intc_1 // 1 + - + itob + extract 6 0 + frame_dig -2 + swap + replace2 0 + dup + len + frame_dig -1 + - + dup2 + frame_dig -1 + extract3 + cover 2 + swap + intc_0 // 0 + uncover 2 + substring3 + retsub diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.clear.teal b/tests/approvals/out/arc4-types/Arc4TypesTestContract.clear.teal new file mode 100644 index 00000000..eac7fd54 --- /dev/null +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir index 2a53d1f9..35dda988 100644 --- a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir @@ -1,7 +1,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: program approval: subroutine tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.approvalProgram() -> bool: - block@0: // L83 + block@0: // L138 let reinterpret_bool%0#0: bool = (txn ApplicationID) goto reinterpret_bool%0#0 ? block@2 : block@1 block@1: // if_body_L1 @@ -10,30 +10,43 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: block@2: // after_if_else_L1 let x#0: bytes = 0x0000000000000000 tests/approvals/arc4-types.algo.ts::testStr() - tests/approvals/arc4-types.algo.ts::test(1u, 2b, 0x0000000000000000000000000000000000000000000000000000000000000004) + tests/approvals/arc4-types.algo.ts::testUintN(1u, 2b, 0x0000000000000000000000000000000000000000000000000000000000000004) + tests/approvals/arc4-types.algo.ts::testUFixed() tests/approvals/arc4-types.algo.ts::testByte() tests/approvals/arc4-types.algo.ts::testArrays(0x0000000000000041) tests/approvals/arc4-types.algo.ts::testAddress() tests/approvals/arc4-types.algo.ts::testTuple() + tests/approvals/arc4-types.algo.ts::testUFixed() + tests/approvals/arc4-types.algo.ts::testDynamicBytes("hmmmmmmmmm") + tests/approvals/arc4-types.algo.ts::testStaticBytes() + let array_data%0#0: bytes = (concat 0x0000 0x) + let result#0: bytes = array_data%0#0 + let tmp%0#0: uint64 = (extract_uint16 result#0 0u) + let tmp%1#0: bool = (== tmp%0#0 0u) + (assert tmp%1#0) return 1u subroutine tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.constructor() -> void: - block@0: // L78 + block@0: // L133 return subroutine tests/approvals/arc4-types.algo.ts::testStr() -> void: - block@0: // L30 - let s1#0: bytes = "\x00\x00" + block@0: // L62 + let s1#0: bytes = 0x0000 let tmp%0#0: bool = (== s1#0 0x0000) (assert tmp%0#0) // Empty string should equal the uint16 length prefix - let s2#0: bytes = "\x00\x05Hello" + let s2#0: bytes = 0x000548656c6c6f let tmp%1#0: bytes = ((extract 2 0) s2#0) let tmp%2#0: bool = (== tmp%1#0 "Hello") (assert tmp%2#0) + let s2_bytes#0: bytes = s2#0 + let s2_from_bytes#0: bytes = s2_bytes#0 + let tmp%3#0: bool = (== s2#0 s2_from_bytes#0) + (assert tmp%3#0) return - subroutine tests/approvals/arc4-types.algo.ts::test(n: uint64, b: biguint, c: bytes) -> void: - block@0: // L12 + subroutine tests/approvals/arc4-types.algo.ts::testUintN(n: uint64, b: biguint, c: bytes) -> void: + block@0: // L27 let x#0: bytes = 0x04 let tmp%0#0: uint64 = (len x#0) let tmp%1#0: bool = (== tmp%0#0 1u) @@ -50,6 +63,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: let z_native#0: uint64 = (btoi z#0) let tmp%5#0: bool = (== z_native#0 n#0) (assert tmp%5#0) + let big128#0: bytes = 0x00000010000000000000000000000000 let len_%0#0: uint64 = (len b#0) let no_overflow%0#0: bool = (<= len_%0#0 16u) (assert no_overflow%0#0) // overflow @@ -61,10 +75,34 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: let tmp%7#0: uint64 = (len c#0) let tmp%8#0: bool = (== tmp%7#0 32u) (assert tmp%8#0) + let a_bytes#0: bytes = a#0 + let a_from_bytes#0: bytes = a_bytes#0 + let tmp%9#0: bool = (== a_from_bytes#0 a#0) + (assert tmp%9#0) + let aliased64#0: bytes = 0x000000000000000c + let tmp%10#0: uint64 = (btoi aliased64#0) + let tmp%11#0: bool = (== tmp%10#0 12u) + (assert tmp%11#0) + let aliased32#0: bytes = 0x0000c571 + let reinterpret_biguint%0#0: biguint = aliased32#0 + let tmp%12#0: bool = (b== reinterpret_biguint%0#0 50545b) + (assert tmp%12#0) + let byte#0: bytes = 0xff + let tmp%13#0: bytes = (b~ byte#0) + let tmp%14#0: bool = (== tmp%13#0 0x00) + (assert tmp%14#0) + return + + subroutine tests/approvals/arc4-types.algo.ts::testUFixed() -> void: + block@0: // L20 + let a#0: bytes = 0x000004dc + let c#0: bytes = 0x000004dc + let tmp%0#0: bool = (== a#0 c#0) + (assert tmp%0#0) return subroutine tests/approvals/arc4-types.algo.ts::testByte() -> void: - block@0: // L54 + block@0: // L109 let b#0: bytes = 0x00 let b2#0: bytes = 0x00 let tmp%0#0: bool = (== b#0 b2#0) @@ -72,7 +110,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testArrays(n: bytes) -> void: - block@0: // L40 + block@0: // L95 let result%0#0: bytes = (concat 0x n#0) let result%1#0: bytes = (concat result%0#0 n#0) let result%2#0: bytes = (concat result%1#0 n#0) @@ -101,26 +139,30 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: let assigned_value%0#0: bytes = 0x0000000000000032 let updated_target%0#0: bytes = (replace3 myStatic#0 8u assigned_value%0#0) let myStatic#1: bytes = updated_target%0#0 + let result%5#0: bytes = (concat 0x n#0) + let result%6#0: bytes = (concat result%5#0 n#0) + let result%7#0: bytes = (concat result%6#0 n#0) + let array_data%2#0: bytes = (concat 0x result%7#0) + let myStatic2#0: bytes = array_data%2#0 return subroutine tests/approvals/arc4-types.algo.ts::testAddress() -> void: - block@0: // L60 + block@0: // L115 let a#0: bytes = addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ let b#0: bytes = (txn Sender) - let tmp%0#0: bool = (== a#0 b#0) - let tmp%1#0: bool = (! tmp%0#0) - (assert tmp%1#0) // Zero address should not match sender - let tmp%2#0: bool = (== a#0 addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ) - (assert tmp%2#0) // Two zero addresses should match + let tmp%0#0: bool = (!= a#0 b#0) + (assert tmp%0#0) // Zero address should not match sender + let tmp%1#0: bool = (== a#0 addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ) + (assert tmp%1#0) // Two zero addresses should match let array_head_and_tail%0#0: bytes = a#0 let item_offset%0#0: uint64 = (* 0u 1u) - let tmp%3#0: bytes = (extract3 array_head_and_tail%0#0 item_offset%0#0 1u) // on error: Index access is out of bounds - let tmp%4#0: bool = (== tmp%3#0 0x00) - (assert tmp%4#0) // Zero address should start with zero byte + let tmp%2#0: bytes = (extract3 array_head_and_tail%0#0 item_offset%0#0 1u) // on error: Index access is out of bounds + let tmp%3#0: bool = (== tmp%2#0 0x00) + (assert tmp%3#0) // Zero address should start with zero byte return subroutine tests/approvals/arc4-types.algo.ts::testTuple() -> void: - block@0: // L69 + block@0: // L124 let current_tail_offset%0#0: uint64 = 8u let encoded_tuple_buffer%0#0: bytes = 0x let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 0x0000000000000022) @@ -139,6 +181,35 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: (assert tmp%1#0) return + subroutine tests/approvals/arc4-types.algo.ts::testDynamicBytes(someBytes: bytes) -> void: + block@0: // L75 + let db1#0: bytes = 0x0000 + let tmp%0#0: bytes = ((extract 2 0) db1#0) + let tmp%1#0: bool = (== tmp%0#0 0x) + (assert tmp%1#0) // No args should give empty bytes + let tmp%2#0: bool = (== db1#0 0x0000) + (assert tmp%2#0) // bytes prop should return length header (of 0) + let length%0#0: uint64 = (len someBytes#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 someBytes#0) + let db2#0: bytes = encoded_value%0#0 + let tmp%3#0: bytes = ((extract 2 0) db2#0) + let tmp%4#0: bool = (== tmp%3#0 someBytes#0) + (assert tmp%4#0) + let db3#0: bytes = 0x000568656c6c6f + let tmp%5#0: bytes = ((extract 2 0) db3#0) + let tmp%6#0: bool = (== tmp%5#0 "hello") + (assert tmp%6#0) + return + + subroutine tests/approvals/arc4-types.algo.ts::testStaticBytes() -> void: + block@0: // L86 + let s1#0: bytes = 0x + let s2#0: bytes = 0x00000000 + let s3#0: bytes = 0xaabbccddee + return + subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size(array: bytes, fixed_byte_size: uint64) -> : block@0: // L44 let array_length#0: uint64 = (extract_uint16 array#0 0u) diff --git a/tests/approvals/out/arc4-types/arc4-types.awst b/tests/approvals/out/arc4-types/arc4-types.awst index dfe0b36a..a7111212 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst +++ b/tests/approvals/out/arc4-types/arc4-types.awst @@ -4,28 +4,57 @@ subroutine testUFixed(): void c: arc4.ufixed32x4 = 1.244m assert(reinterpret_cast(a) == reinterpret_cast(c)) } -subroutine test(n: uint64, b: biguint, c: arc4.uint256): void +subroutine testUintN(n: uint64, b: biguint, c: arc4.uint256): void { x: arc4.uint8 = 4 assert(len(reinterpret_cast(x)) == 1) - x2: arc4.uint8 = 0xff + x2: arc4.uint8 = 255 assert(reinterpret_cast(x2) == 0xff) y: arc4.uint16 = 0 assert(len(reinterpret_cast(y)) == 2) z: arc4.uint8 = ARC4_ENCODE(n, wtype=arc4.uint8) z_native: uint64 = ARC4_DECODE(z) assert(z_native == n) + big128: arc4.uint128 = 1267650600228229401496703205376 a: arc4.uint128 = ARC4_ENCODE(b, wtype=arc4.uint128) a_native: biguint = ARC4_DECODE(a) assert(a_native == b) assert(len(reinterpret_cast(c)) == 32) + a_bytes: bytes = reinterpret_cast(a) + a_from_bytes: arc4.uint128 = reinterpret_cast(a_bytes) + assert(reinterpret_cast(a_from_bytes) == reinterpret_cast(a)) + aliased64: arc4.uint64 = 12 + assert(ARC4_DECODE(aliased64) == 12) + aliased32: arc4.uint32 = 50545 + assert(reinterpret_cast(reinterpret_cast(aliased32)) == 50545) + byte: arc4.byte = 255 + assert(~reinterpret_cast(byte) == 0x00) } subroutine testStr(): void { s1: arc4.dynamic_array = "" - assert(reinterpret_cast(s1) == reinterpret_cast(0)) + assert(reinterpret_cast(s1) == reinterpret_cast(0), comment=Empty string should equal the uint16 length prefix) s2: arc4.dynamic_array = "Hello" assert(ARC4_DECODE(s2) == "Hello") + s2_bytes: bytes = reinterpret_cast(s2) + s2_from_bytes: arc4.dynamic_array = reinterpret_cast>(s2_bytes) + assert(reinterpret_cast(s2) == reinterpret_cast(s2_from_bytes)) +} +subroutine testDynamicBytes(someBytes: bytes): void +{ + db1: arc4.dynamic_array = 0x0000 + assert(ARC4_DECODE(db1) == 0x, comment=No args should give empty bytes) + assert(reinterpret_cast(db1) == reinterpret_cast(0), comment=bytes prop should return length header (of 0)) + db2: arc4.dynamic_array = ARC4_ENCODE(someBytes, wtype=arc4.dynamic_array) + assert(ARC4_DECODE(db2) == someBytes) + db3: arc4.dynamic_array = 0x000568656c6c6f + assert(ARC4_DECODE(db3) == "hello") +} +subroutine testStaticBytes(): void +{ + s1: arc4.static_array = 0x + s2: arc4.static_array = 0x00000000 + s3: arc4.static_array = 0xaabbccddee } subroutine testArrays(n: arc4.uint64): void { @@ -34,6 +63,7 @@ subroutine testArrays(n: arc4.uint64): void myStatic: arc4.static_array = new arc4.static_array(n, n) assert(reinterpret_cast(myStatic[0]) == reinterpret_cast(myArray.pop())) myStatic[1]: arc4.uint64 = 50 + myStatic2: arc4.static_array = new arc4.static_array(n, n, n) } subroutine testByte(): void { @@ -45,9 +75,9 @@ subroutine testAddress(): void { a: arc4.static_array = Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ") b: arc4.static_array = reinterpret_cast>(txn()) - assert(!reinterpret_cast(a) == reinterpret_cast(b)) - assert(reinterpret_cast(a) == reinterpret_cast(Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"))) - assert(reinterpret_cast(a[0]) == reinterpret_cast(0)) + assert(reinterpret_cast(a) != reinterpret_cast(b), comment=Zero address should not match sender) + assert(reinterpret_cast(a) == reinterpret_cast(Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ")), comment=Two zero addresses should match) + assert(reinterpret_cast(a[0]) == reinterpret_cast(0), comment=Zero address should start with zero byte) } subroutine testTuple(): void { @@ -67,11 +97,17 @@ contract Arc4TypesTestContract } x: arc4.uint64 = 0 tests/approvals/arc4-types.algo.ts::testStr() - tests/approvals/arc4-types.algo.ts::test(1, 2, 4) + tests/approvals/arc4-types.algo.ts::testUintN(1, 2, 4) + tests/approvals/arc4-types.algo.ts::testUFixed() tests/approvals/arc4-types.algo.ts::testByte() tests/approvals/arc4-types.algo.ts::testArrays(65) tests/approvals/arc4-types.algo.ts::testAddress() tests/approvals/arc4-types.algo.ts::testTuple() + tests/approvals/arc4-types.algo.ts::testUFixed() + tests/approvals/arc4-types.algo.ts::testDynamicBytes("hmmmmmmmmm") + tests/approvals/arc4-types.algo.ts::testStaticBytes() + result: arc4.dynamic_array = new arc4.dynamic_array() + assert(extract_uint16(result, 0) == 0) return True } @@ -90,9 +126,8 @@ contract Arc4TypesTestContract void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/arc4-types/arc4-types.awst.json b/tests/approvals/out/arc4-types/arc4-types.awst.json index 7f4dc407..8f3df182 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst.json +++ b/tests/approvals/out/arc4-types/arc4-types.awst.json @@ -3,8 +3,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 5, - "end_line": 5, + "line": 20, + "end_line": 20, "column": 0, "end_column": 21 }, @@ -20,8 +20,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 5, - "end_line": 10, + "line": 20, + "end_line": 25, "column": 22, "end_column": 1 }, @@ -30,8 +30,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 6, - "end_line": 6, + "line": 21, + "end_line": 21, "column": 8, "end_column": 41 }, @@ -39,8 +39,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 6, - "end_line": 6, + "line": 21, + "end_line": 21, "column": 8, "end_column": 9 }, @@ -67,10 +67,10 @@ "_type": "DecimalConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 6, - "end_line": 6, - "column": 26, - "end_column": 33 + "line": 21, + "end_line": 21, + "column": 33, + "end_column": 40 }, "wtype": { "_type": "ARC4UFixedNxM", @@ -96,8 +96,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 7, - "end_line": 7, + "line": 22, + "end_line": 22, "column": 8, "end_column": 41 }, @@ -105,8 +105,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 7, - "end_line": 7, + "line": 22, + "end_line": 22, "column": 8, "end_column": 9 }, @@ -133,8 +133,8 @@ "_type": "DecimalConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 7, - "end_line": 7, + "line": 22, + "end_line": 22, "column": 33, "end_column": 40 }, @@ -162,19 +162,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, + "line": 24, + "end_line": 24, "column": 2, - "end_column": 21 + "end_column": 17 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, + "line": 24, + "end_line": 24, "column": 2, - "end_column": 21 + "end_column": 17 }, "wtype": { "_type": "WType", @@ -183,119 +183,115 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 24, + "end_line": 24, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, + "line": 24, + "end_line": 24, "column": 9, - "end_column": 20 + "end_column": 16 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, + "line": 24, + "end_line": 24, "column": 9, - "end_column": 20 + "end_column": 10 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UFixedNxM", + "name": "arc4.ufixed32x4", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "ARC4UFixedNxM", - "name": "arc4.ufixed32x4", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "ufixed32x4", - "n": "32", - "m": "4" + "scalar_type": 2 }, - "name": "a" - } + "arc4_name": "ufixed32x4", + "n": "32", + "m": "4" + }, + "name": "a" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 24, + "end_line": 24, + "column": 9, + "end_column": 16 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, - "column": 9, - "end_column": 20 + "line": 24, + "end_line": 24, + "column": 15, + "end_column": 16 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UFixedNxM", + "name": "arc4.ufixed32x4", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, - "column": 18, - "end_column": 19 - }, - "wtype": { - "_type": "ARC4UFixedNxM", - "name": "arc4.ufixed32x4", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "ufixed32x4", - "n": "32", - "m": "4" + "scalar_type": 2 }, - "name": "c" - } + "arc4_name": "ufixed32x4", + "n": "32", + "m": "4" + }, + "name": "c" } } - ], - "comment": null + }, + "error_message": null } } ], @@ -315,10 +311,10 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 12, - "end_line": 12, + "line": 27, + "end_line": 27, "column": 0, - "end_column": 51 + "end_column": 56 }, "args": [ { @@ -333,10 +329,10 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 12, - "end_line": 12, - "column": 14, - "end_column": 23 + "line": 27, + "end_line": 27, + "column": 19, + "end_column": 28 } }, { @@ -351,10 +347,10 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 12, - "end_line": 12, - "column": 25, - "end_column": 35 + "line": 27, + "end_line": 27, + "column": 30, + "end_column": 40 } }, { @@ -378,10 +374,10 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 12, - "end_line": 12, - "column": 37, - "end_column": 50 + "line": 27, + "end_line": 27, + "column": 42, + "end_column": 55 } } ], @@ -396,9 +392,9 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 12, - "end_line": 28, - "column": 52, + "line": 27, + "end_line": 60, + "column": 57, "end_column": 1 }, "body": [ @@ -406,8 +402,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 13, - "end_line": 13, + "line": 28, + "end_line": 28, "column": 8, "end_column": 27 }, @@ -415,8 +411,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 13, - "end_line": 13, + "line": 28, + "end_line": 28, "column": 8, "end_column": 9 }, @@ -442,8 +438,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 13, - "end_line": 13, + "line": 28, + "end_line": 28, "column": 12, "end_column": 27 }, @@ -471,17 +467,17 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, + "line": 29, + "end_line": 29, "column": 2, "end_column": 30 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, + "line": 29, + "end_line": 29, "column": 2, "end_column": 30 }, @@ -492,122 +488,117 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 29, + "end_line": 29, + "column": 9, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, - "column": 9, - "end_column": 29 + "line": 29, + "end_line": 29, + "column": 17, + "end_column": 23 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, - "column": 9, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, + "line": 29, + "end_line": 29, "column": 9, - "end_column": 16 + "end_column": 10 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint8", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint8", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint8", - "n": "8" + "scalar_type": 2 }, - "name": "x" - } + "arc4_name": "uint8", + "n": "8" + }, + "name": "x" } - ], - "comment": null + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 29, + "end_line": 29, + "column": 28, + "end_column": 29 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, - "column": 28, - "end_column": 29 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "1", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null } - ], - "comment": null + }, + "error_message": null } }, { "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 15, - "end_line": 15, + "line": 30, + "end_line": 30, "column": 8, "end_column": 31 }, @@ -615,8 +606,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 15, - "end_line": 15, + "line": 30, + "end_line": 30, "column": 8, "end_column": 10 }, @@ -639,11 +630,11 @@ "name": "x2" }, "value": { - "_type": "BytesConstant", + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 15, - "end_line": 15, + "line": 30, + "end_line": 30, "column": 13, "end_column": 31 }, @@ -663,25 +654,25 @@ "arc4_name": "uint8", "n": "8" }, - "value": "{{", - "encoding": "unknown" + "value": "255", + "teal_alias": null } }, { "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 16, + "line": 31, + "end_line": 31, "column": 2, "end_column": 42 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 16, + "line": 31, + "end_line": 31, "column": 2, "end_column": 42 }, @@ -692,100 +683,96 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 31, + "end_line": 31, + "column": 9, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 16, - "column": 9, - "end_column": 41 + "line": 31, + "end_line": 31, + "column": 12, + "end_column": 17 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 16, + "line": 31, + "end_line": 31, "column": 9, - "end_column": 17 + "end_column": 11 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint8", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 16, - "column": 9, - "end_column": 11 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint8", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint8", - "n": "8" + "scalar_type": 2 }, - "name": "x2" - } - }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 16, - "column": 22, - "end_column": 41 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "arc4_name": "uint8", + "n": "8" }, - "value": "{{", - "encoding": "base16" + "name": "x2" } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 31, + "end_line": 31, + "column": 22, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "{{", + "encoding": "base16" } - ], - "comment": null + }, + "error_message": null } }, { "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 18, - "end_line": 18, + "line": 33, + "end_line": 33, "column": 8, "end_column": 27 }, @@ -793,8 +780,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 18, - "end_line": 18, + "line": 33, + "end_line": 33, "column": 8, "end_column": 9 }, @@ -820,8 +807,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 18, - "end_line": 18, + "line": 33, + "end_line": 33, "column": 12, "end_column": 27 }, @@ -849,17 +836,17 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, + "line": 34, + "end_line": 34, "column": 2, "end_column": 30 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, + "line": 34, + "end_line": 34, "column": 2, "end_column": 30 }, @@ -870,122 +857,117 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 34, + "end_line": 34, + "column": 9, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, - "column": 9, - "end_column": 29 + "line": 34, + "end_line": 34, + "column": 17, + "end_column": 23 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, - "column": 9, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 34, + "end_line": 34, + "column": 11, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, + "line": 34, + "end_line": 34, "column": 9, - "end_column": 16 + "end_column": 10 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint16", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint16", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint16", - "n": "16" + "scalar_type": 2 }, - "name": "y" - } + "arc4_name": "uint16", + "n": "16" + }, + "name": "y" } - ], - "comment": null + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 34, + "end_line": 34, + "column": 28, + "end_column": 29 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, - "column": 28, - "end_column": 29 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "2", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "2", + "teal_alias": null } - ], - "comment": null + }, + "error_message": null } }, { "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 35, + "end_line": 35, "column": 8, "end_column": 27 }, @@ -993,8 +975,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 35, + "end_line": 35, "column": 8, "end_column": 9 }, @@ -1020,8 +1002,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 35, + "end_line": 35, "column": 12, "end_column": 27 }, @@ -1045,8 +1027,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 35, + "end_line": 35, "column": 25, "end_column": 26 }, @@ -1065,8 +1047,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 36, + "end_line": 36, "column": 8, "end_column": 27 }, @@ -1074,8 +1056,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 36, + "end_line": 36, "column": 8, "end_column": 16 }, @@ -1092,9 +1074,9 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 21, - "end_line": 21, - "column": 19, + "line": 36, + "end_line": 36, + "column": 21, "end_column": 27 }, "wtype": { @@ -1108,8 +1090,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 36, + "end_line": 36, "column": 19, "end_column": 20 }, @@ -1137,17 +1119,17 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 22, - "end_line": 22, + "line": 37, + "end_line": 37, "column": 2, "end_column": 24 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 22, - "end_line": 22, + "line": 37, + "end_line": 37, "column": 2, "end_column": 24 }, @@ -1158,84 +1140,80 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 22, - "end_line": 22, + "line": 37, + "end_line": 37, "column": 9, - "end_column": 23 + "end_column": 17 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 22, - "end_line": 22, - "column": 9, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "z_native" + "name": "z_native" + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 22, + "end_column": 23 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 22, - "end_line": 22, - "column": 22, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "n" - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "n" } - ], - "comment": null + }, + "error_message": null } }, { "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 38, + "end_line": 38, "column": 8, - "end_column": 29 + "end_column": 41 }, "target": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 38, + "end_line": 38, "column": 8, - "end_column": 9 + "end_column": 14 }, "wtype": { "_type": "ARC4UIntN", @@ -1253,16 +1231,16 @@ "arc4_name": "uint128", "n": "128" }, - "name": "a" + "name": "big128" }, "value": { - "_type": "ARC4Encode", + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, - "column": 12, - "end_column": 29 + "line": 38, + "end_line": 38, + "column": 17, + "end_column": 41 }, "wtype": { "_type": "ARC4UIntN", @@ -1280,12 +1258,77 @@ "arc4_name": "uint128", "n": "128" }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "value": "1267650600228229401496703205376", + "teal_alias": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 40, + "end_line": 40, + "column": 8, + "end_column": 29 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 40, + "end_line": 40, + "column": 8, + "end_column": 9 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint128", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint128", + "n": "128" + }, + "name": "a" + }, + "value": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 40, + "end_line": 40, + "column": 12, + "end_column": 29 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint128", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint128", + "n": "128" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 40, + "end_line": 40, "column": 27, "end_column": 28 }, @@ -1304,8 +1347,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 41, + "end_line": 41, "column": 8, "end_column": 27 }, @@ -1313,8 +1356,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 41, + "end_line": 41, "column": 8, "end_column": 16 }, @@ -1331,9 +1374,9 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 24, - "end_line": 24, - "column": 19, + "line": 41, + "end_line": 41, + "column": 21, "end_column": 27 }, "wtype": { @@ -1347,8 +1390,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 41, + "end_line": 41, "column": 19, "end_column": 20 }, @@ -1376,17 +1419,17 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 42, + "end_line": 42, "column": 2, "end_column": 24 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 42, + "end_line": 42, "column": 2, "end_column": 24 }, @@ -1397,82 +1440,78 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 42, + "end_line": 42, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 42, + "end_line": 42, "column": 9, - "end_column": 23 + "end_column": 17 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, - "column": 9, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "a_native" + "name": "a_native" + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 42, + "end_line": 42, + "column": 22, + "end_column": 23 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, - "column": 22, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "b" - } + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "b" } - ], - "comment": null + }, + "error_message": null } }, { "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 44, + "end_line": 44, "column": 2, "end_column": 36 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 44, + "end_line": 44, "column": 2, "end_column": 36 }, @@ -1483,269 +1522,281 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 44, + "end_line": 44, + "column": 9, + "end_column": 35 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, - "column": 9, - "end_column": 35 + "line": 44, + "end_line": 44, + "column": 17, + "end_column": 23 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, - "column": 9, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 44, + "end_line": 44, + "column": 11, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 44, + "end_line": 44, "column": 9, - "end_column": 16 + "end_column": 10 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint256", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint256", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "uint256", - "n": "256" + "scalar_type": 1 }, - "name": "c" - } + "arc4_name": "uint256", + "n": "256" + }, + "name": "c" } - ], - "comment": null + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 44, + "end_line": 44, + "column": 28, + "end_column": 35 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, - "column": 28, - "end_column": 35 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "32", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "32", + "teal_alias": null } - ], - "comment": null + }, + "error_message": null } - } - ], - "label": null, - "comment": null - }, - "documentation": { - "_type": "MethodDocumentation", - "description": null, - "args": {}, - "returns": null - }, - "id": "tests/approvals/arc4-types.algo.ts::test", - "name": "test" - }, - { - "_type": "Subroutine", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, - "column": 0, - "end_column": 18 - }, - "args": [], - "return_type": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "body": { - "_type": "Block", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 35, - "column": 19, - "end_column": 1 - }, - "body": [ + }, { "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 31, - "end_line": 31, + "line": 46, + "end_line": 46, "column": 8, - "end_column": 22 + "end_column": 25 }, "target": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 31, - "end_line": 31, + "line": 46, + "end_line": 46, "column": 8, - "end_column": 10 + "end_column": 15 }, "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "_type": "WType", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "scalar_type": 1 + }, + "name": "a_bytes" + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 46, + "end_line": 46, + "column": 20, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 46, + "end_line": 46, + "column": 18, + "end_column": 19 }, - "arc4_name": "string", - "element_type": { + "wtype": { "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "arc4.uint128", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "uint64", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "arc4_name": "byte", - "n": "8" + "arc4_name": "uint128", + "n": "128" }, - "source_location": null + "name": "a" + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 47, + "end_line": 47, + "column": 8, + "end_column": 59 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 47, + "end_line": 47, + "column": 8, + "end_column": 20 }, - "name": "s1" + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint128", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint128", + "n": "128" + }, + "name": "a_from_bytes" }, "value": { - "_type": "StringConstant", + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 31, - "end_line": 31, - "column": 13, - "end_column": 22 + "line": 47, + "end_line": 47, + "column": 23, + "end_column": 59 }, "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "_type": "ARC4UIntN", + "name": "arc4.uint128", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "string", + "name": "biguint", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "arc4_name": "string", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "arc4_name": "uint128", + "n": "128" + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 47, + "end_line": 47, + "column": 51, + "end_column": 58 + }, + "wtype": { + "_type": "WType", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 1 }, - "source_location": null - }, - "value": "" + "name": "a_bytes" + } } }, { "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 49, + "end_line": 49, "column": 2, - "end_column": 99 + "end_column": 28 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 49, + "end_line": 49, "column": 2, - "end_column": 99 + "end_column": 28 }, "wtype": { "_type": "WType", @@ -1754,249 +1805,371 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 49, + "end_line": 49, + "column": 9, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 49, + "end_line": 49, "column": 9, - "end_column": 44 + "end_column": 27 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 49, + "end_line": 49, "column": 9, - "end_column": 17 + "end_column": 21 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint128", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, - "column": 9, - "end_column": 11 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "string", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null + "scalar_type": 1 }, - "name": "s1" - } + "arc4_name": "uint128", + "n": "128" + }, + "name": "a_from_bytes" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 49, + "end_line": 49, + "column": 9, + "end_column": 27 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, - "column": 22, - "end_column": 44 + "line": 49, + "end_line": 49, + "column": 26, + "end_column": 27 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint128", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint128", + "n": "128" }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, - "column": 22, - "end_column": 38 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint16", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint16", - "n": "16" - }, - "value": "0", - "teal_alias": null - } + "name": "a" } } - ], - "comment": "Empty string should equal the uint16 length prefix" + }, + "error_message": null } }, { "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 51, + "end_line": 51, "column": 8, - "end_column": 29 + "end_column": 35 }, "target": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 51, + "end_line": 51, "column": 8, - "end_column": 10 + "end_column": 17 }, "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "string", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "arc4_name": "string", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "arc4_name": "uint64", + "n": "64" + }, + "name": "aliased64" + }, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 51, + "end_line": 51, + "column": 20, + "end_column": 35 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": "12", + "teal_alias": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 2, + "end_column": 33 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 2, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 9, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 19, + "end_column": 25 + }, + "wtype": { "_type": "WType", "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "arc4_name": "byte", - "n": "8" + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 9, + "end_column": 18 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "name": "aliased64" + } }, - "source_location": null + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 30, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "12", + "teal_alias": null + } }, - "name": "s2" + "error_message": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 54, + "end_line": 54, + "column": 8, + "end_column": 38 }, - "value": { - "_type": "StringConstant", + "target": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, - "column": 13, - "end_column": 29 + "line": 54, + "end_line": 54, + "column": 8, + "end_column": 17 }, "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "_type": "ARC4UIntN", + "name": "arc4.uint32", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "string", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "arc4_name": "string", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "arc4_name": "uint32", + "n": "32" + }, + "name": "aliased32" + }, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 54, + "end_line": 54, + "column": 20, + "end_column": 38 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint32", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null + "arc4_name": "uint32", + "n": "32" }, - "value": "Hello" + "value": "50545", + "teal_alias": null } }, { "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 55, + "end_line": 55, "column": 2, - "end_column": 31 + "end_column": 45 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 55, + "end_line": 55, "column": 2, - "end_column": 31 + "end_column": 45 }, "wtype": { "_type": "WType", @@ -2005,107 +2178,297 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 55, + "end_line": 55, + "column": 9, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 55, + "end_line": 55, "column": 9, - "end_column": 30 + "end_column": 33 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ARC4Decode", + "expr": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, - "column": 9, - "end_column": 18 + "line": 55, + "end_line": 55, + "column": 27, + "end_column": 32 }, "wtype": { "_type": "WType", - "name": "string", + "name": "bytes", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "value": { + "expr": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, - "column": 9, - "end_column": 11 + "line": 55, + "end_line": 55, + "column": 17, + "end_column": 26 }, "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "_type": "ARC4UIntN", + "name": "arc4.uint32", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "string", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "arc4_name": "string", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null + "arc4_name": "uint32", + "n": "32" }, - "name": "s2" + "name": "aliased32" } + } + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 55, + "end_line": 55, + "column": 38, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "50545", + "teal_alias": null + } + }, + "error_message": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 57, + "end_line": 57, + "column": 8, + "end_column": 28 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 57, + "end_line": 57, + "column": 8, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "name": "byte" + }, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 57, + "end_line": 57, + "column": 15, + "end_column": 28 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "value": "255", + "teal_alias": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 59, + "end_line": 59, + "column": 2, + "end_column": 60 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 59, + "end_line": 59, + "column": 2, + "end_column": 60 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 59, + "end_line": 59, + "column": 9, + "end_column": 59 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesUnaryOperation", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 59, + "end_line": 59, + "column": 9, + "end_column": 35 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "operator": "==", - "rhs": { - "_type": "StringConstant", + "op": "~", + "expr": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, - "column": 23, - "end_column": 30 + "line": 59, + "end_line": 59, + "column": 14, + "end_column": 19 }, "wtype": { "_type": "WType", - "name": "string", + "name": "bytes", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "value": "Hello" + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 59, + "end_line": 59, + "column": 9, + "end_column": 13 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "name": "byte" + } } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 59, + "end_line": 59, + "column": 40, + "end_column": 59 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "00", + "encoding": "base16" } - ], - "comment": null + }, + "error_message": null } } ], @@ -2118,47 +2481,19 @@ "args": {}, "returns": null }, - "id": "tests/approvals/arc4-types.algo.ts::testStr", - "name": "testStr" + "id": "tests/approvals/arc4-types.algo.ts::testUintN", + "name": "testUintN" }, { "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 40, - "end_line": 40, + "line": 62, + "end_line": 62, "column": 0, - "end_column": 34 + "end_column": 18 }, - "args": [ - { - "_type": "SubroutineArgument", - "name": "n", - "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" - }, - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 40, - "end_line": 40, - "column": 20, - "end_column": 33 - } - } - ], + "args": [], "return_type": { "_type": "WType", "name": "void", @@ -2170,9 +2505,9 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 40, - "end_line": 52, - "column": 35, + "line": 62, + "end_line": 73, + "column": 19, "end_column": 1 }, "body": [ @@ -2180,31 +2515,37 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 63, + "end_line": 63, "column": 8, - "end_column": 43 + "end_column": 22 }, "target": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 63, + "end_line": 63, "column": 8, - "end_column": 15 + "end_column": 10 }, "wtype": { "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": false, + "name": "arc4.dynamic_array", + "immutable": true, "ephemeral": false, "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64[]", + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", "element_type": { "_type": "ARC4UIntN", - "name": "arc4.uint64", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, @@ -2215,33 +2556,2157 @@ "ephemeral": false, "scalar_type": 2 }, - "arc4_name": "uint64", - "n": "64" + "arc4_name": "byte", + "n": "8" }, "source_location": null }, - "name": "myArray" + "name": "s1" }, "value": { - "_type": "NewArray", + "_type": "StringConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, - "column": 18, - "end_column": 43 + "line": 63, + "end_line": 63, + "column": 13, + "end_column": 22 }, "wtype": { "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": false, + "name": "arc4.dynamic_array", + "immutable": true, "ephemeral": false, "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": "" + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 64, + "end_line": 64, + "column": 2, + "end_column": 99 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 64, + "end_line": 64, + "column": 2, + "end_column": 99 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 64, + "end_line": 64, + "column": 9, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 64, + "end_line": 64, + "column": 12, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 64, + "end_line": 64, + "column": 9, + "end_column": 11 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "s1" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 64, + "end_line": 64, + "column": 39, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 64, + "end_line": 64, + "column": 22, + "end_column": 38 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint16", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint16", + "n": "16" + }, + "value": "0", + "teal_alias": null + } + } + }, + "error_message": "Empty string should equal the uint16 length prefix" + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 65, + "end_line": 65, + "column": 8, + "end_column": 29 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 65, + "end_line": 65, + "column": 8, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "s2" + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 65, + "end_line": 65, + "column": 13, + "end_column": 29 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": "Hello" + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 66, + "end_line": 66, + "column": 2, + "end_column": 31 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 66, + "end_line": 66, + "column": 2, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 66, + "end_line": 66, + "column": 9, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 66, + "end_line": 66, + "column": 12, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 66, + "end_line": 66, + "column": 9, + "end_column": 11 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "s2" + } + }, + "operator": "==", + "rhs": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 66, + "end_line": 66, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Hello" + } + }, + "error_message": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 68, + "end_line": 68, + "column": 8, + "end_column": 27 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 68, + "end_line": 68, + "column": 8, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "s2_bytes" + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 68, + "end_line": 68, + "column": 22, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 68, + "end_line": 68, + "column": 19, + "end_column": 21 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "s2" + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 70, + "end_line": 70, + "column": 8, + "end_column": 54 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 70, + "end_line": 70, + "column": 8, + "end_column": 21 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "s2_from_bytes" + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 70, + "end_line": 70, + "column": 24, + "end_column": 54 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 70, + "end_line": 70, + "column": 45, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "s2_bytes" + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 72, + "end_line": 72, + "column": 2, + "end_column": 30 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 72, + "end_line": 72, + "column": 2, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 72, + "end_line": 72, + "column": 9, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 72, + "end_line": 72, + "column": 9, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 72, + "end_line": 72, + "column": 9, + "end_column": 11 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "s2" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 72, + "end_line": 72, + "column": 9, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 72, + "end_line": 72, + "column": 16, + "end_column": 29 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "s2_from_bytes" + } + } + }, + "error_message": null + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/arc4-types.algo.ts::testStr", + "name": "testStr" + }, + { + "_type": "Subroutine", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 75, + "end_line": 75, + "column": 0, + "end_column": 43 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "someBytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 75, + "end_line": 75, + "column": 26, + "end_column": 42 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 75, + "end_line": 84, + "column": 44, + "end_column": 1 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 76, + "end_line": 76, + "column": 8, + "end_column": 32 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 76, + "end_line": 76, + "column": 8, + "end_column": 11 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db1" + }, + "value": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 76, + "end_line": 76, + "column": 14, + "end_column": 32 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": "000", + "encoding": "unknown" + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 77, + "end_line": 77, + "column": 2, + "end_column": 67 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 77, + "end_line": 77, + "column": 2, + "end_column": 67 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 77, + "end_line": 77, + "column": 9, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 77, + "end_line": 77, + "column": 13, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 77, + "end_line": 77, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db1" + } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 77, + "end_line": 77, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "", + "encoding": "unknown" + } + }, + "error_message": "No args should give empty bytes" + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 78, + "end_line": 78, + "column": 2, + "end_column": 95 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 78, + "end_line": 78, + "column": 2, + "end_column": 95 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 78, + "end_line": 78, + "column": 9, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 78, + "end_line": 78, + "column": 13, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 78, + "end_line": 78, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db1" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 78, + "end_line": 78, + "column": 40, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 78, + "end_line": 78, + "column": 23, + "end_column": 39 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint16", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint16", + "n": "16" + }, + "value": "0", + "teal_alias": null + } + } + }, + "error_message": "bytes prop should return length header (of 0)" + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 79, + "end_line": 79, + "column": 8, + "end_column": 41 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 79, + "end_line": 79, + "column": 8, + "end_column": 11 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db2" + }, + "value": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 79, + "end_line": 79, + "column": 14, + "end_column": 41 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 79, + "end_line": 79, + "column": 31, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "someBytes" + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 80, + "end_line": 80, + "column": 2, + "end_column": 34 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 80, + "end_line": 80, + "column": 2, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 80, + "end_line": 80, + "column": 9, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 80, + "end_line": 80, + "column": 13, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 80, + "end_line": 80, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db2" + } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 80, + "end_line": 80, + "column": 24, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "someBytes" + } + }, + "error_message": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 82, + "end_line": 82, + "column": 8, + "end_column": 39 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 82, + "end_line": 82, + "column": 8, + "end_column": 11 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db3" + }, + "value": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 82, + "end_line": 82, + "column": 14, + "end_column": 39 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": "00n4eY;11", + "encoding": "unknown" + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 83, + "end_line": 83, + "column": 2, + "end_column": 39 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 83, + "end_line": 83, + "column": 2, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 83, + "end_line": 83, + "column": 9, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 83, + "end_line": 83, + "column": 13, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 83, + "end_line": 83, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db3" + } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 83, + "end_line": 83, + "column": 30, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Xk~0{Zv", + "encoding": "utf8" + } + }, + "error_message": null + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/arc4-types.algo.ts::testDynamicBytes", + "name": "testDynamicBytes" + }, + { + "_type": "Subroutine", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 86, + "end_line": 86, + "column": 0, + "end_column": 26 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 86, + "end_line": 90, + "column": 27, + "end_column": 1 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 87, + "end_line": 87, + "column": 8, + "end_column": 30 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 87, + "end_line": 87, + "column": 8, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[0]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "0" + }, + "name": "s1" + }, + "value": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 87, + "end_line": 87, + "column": 13, + "end_column": 30 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[0]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "0" + }, + "value": "", + "encoding": "unknown" + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 88, + "end_line": 88, + "column": 8, + "end_column": 33 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 88, + "end_line": 88, + "column": 8, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[4]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "4" + }, + "name": "s2" + }, + "value": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 88, + "end_line": 88, + "column": 13, + "end_column": 33 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[4]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "4" + }, + "value": "00000", + "encoding": "unknown" + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 89, + "end_line": 89, + "column": 8, + "end_column": 60 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 89, + "end_line": 89, + "column": 8, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[5]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "5" + }, + "name": "s3" + }, + "value": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 89, + "end_line": 89, + "column": 13, + "end_column": 60 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[5]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "5" + }, + "value": "s=LhH?f", + "encoding": "unknown" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/arc4-types.algo.ts::testStaticBytes", + "name": "testStaticBytes" + }, + { + "_type": "Subroutine", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 95, + "end_line": 95, + "column": 0, + "end_column": 34 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "n", + "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" + }, + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 95, + "end_line": 95, + "column": 20, + "end_column": 33 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 95, + "end_line": 107, + "column": 35, + "end_column": 1 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 96, + "end_line": 96, + "column": 8, + "end_column": 43 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 96, + "end_line": 96, + "column": 8, + "end_column": 15 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null + }, + "name": "myArray" + }, + "value": { + "_type": "NewArray", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 96, + "end_line": 96, + "column": 18, + "end_column": 43 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, "scalar_type": 1, @@ -2257,8 +4722,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 96, + "end_line": 96, "column": 18, "end_column": 43 } @@ -2268,8 +4733,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 96, + "end_line": 96, "column": 35, "end_column": 36 }, @@ -2295,8 +4760,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 96, + "end_line": 96, "column": 38, "end_column": 39 }, @@ -2322,8 +4787,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 96, + "end_line": 96, "column": 41, "end_column": 42 }, @@ -2352,8 +4817,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 98, + "end_line": 98, "column": 2, "end_column": 17 }, @@ -2361,8 +4826,8 @@ "_type": "ArrayExtend", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 98, + "end_line": 98, "column": 2, "end_column": 17 }, @@ -2396,8 +4861,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 98, + "end_line": 98, "column": 2, "end_column": 9 }, @@ -2433,8 +4898,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 98, + "end_line": 98, "column": 2, "end_column": 17 }, @@ -2468,8 +4933,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 98, + "end_line": 98, "column": 15, "end_column": 16 }, @@ -2499,8 +4964,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 100, + "end_line": 100, "column": 8, "end_column": 40 }, @@ -2508,8 +4973,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 100, + "end_line": 100, "column": 8, "end_column": 16 }, @@ -2546,8 +5011,8 @@ "_type": "NewArray", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 100, + "end_line": 100, "column": 19, "end_column": 40 }, @@ -2583,8 +5048,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 100, + "end_line": 100, "column": 35, "end_column": 36 }, @@ -2610,8 +5075,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 100, + "end_line": 100, "column": 38, "end_column": 39 }, @@ -2640,19 +5105,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 102, + "end_line": 102, "column": 2, - "end_column": 43 + "end_column": 39 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 102, + "end_line": 102, "column": 2, - "end_column": 43 + "end_column": 39 }, "wtype": { "_type": "WType", @@ -2661,217 +5126,213 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 102, + "end_line": 102, + "column": 9, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 102, + "end_line": 102, "column": 9, - "end_column": 42 + "end_column": 38 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 102, + "end_line": 102, "column": 9, - "end_column": 42 + "end_column": 20 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "expr": { - "_type": "IndexExpression", + "base": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 102, + "end_line": 102, "column": 9, - "end_column": 20 + "end_column": 17 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, "ephemeral": false, "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + "native_type": null, + "arc4_name": "uint64[2]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "base": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, - "column": 9, - "end_column": 17 - }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", - "immutable": false, - "ephemeral": false, "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64[2]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" + "scalar_type": 2 }, - "source_location": null, - "array_size": "2" + "arc4_name": "uint64", + "n": "64" }, - "name": "myStatic" + "source_location": null, + "array_size": "2" }, - "index": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, - "column": 18, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } + "name": "myStatic" + }, + "index": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 102, + "end_line": 102, + "column": 18, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 102, + "end_line": 102, + "column": 9, + "end_column": 38 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ArrayPop", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, - "column": 9, - "end_column": 42 + "line": 102, + "end_line": 102, + "column": 25, + "end_column": 38 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "expr": { - "_type": "ArrayPop", + "base": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, - "column": 28, - "end_column": 41 + "line": 102, + "end_line": 102, + "column": 25, + "end_column": 32 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": false, "ephemeral": false, "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + "native_type": null, + "arc4_name": "uint64[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "base": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, - "column": 28, - "end_column": 35 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": false, - "ephemeral": false, "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" + "scalar_type": 2 }, - "source_location": null + "arc4_name": "uint64", + "n": "64" }, - "name": "myArray" - } + "source_location": null + }, + "name": "myArray" } } } - ], - "comment": null + }, + "error_message": null } }, { "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 104, + "end_line": 104, "column": 2, "end_column": 33 }, @@ -2879,8 +5340,8 @@ "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 104, + "end_line": 104, "column": 2, "end_column": 13 }, @@ -2904,8 +5365,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 104, + "end_line": 104, "column": 2, "end_column": 10 }, @@ -2942,8 +5403,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 104, + "end_line": 104, "column": 11, "end_column": 12 }, @@ -2962,8 +5423,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 104, + "end_line": 104, "column": 16, "end_column": 33 }, @@ -2980,11 +5441,179 @@ "ephemeral": false, "scalar_type": 2 }, - "arc4_name": "uint64", - "n": "64" - }, - "value": "50", - "teal_alias": null + "arc4_name": "uint64", + "n": "64" + }, + "value": "50", + "teal_alias": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 106, + "end_line": 106, + "column": 8, + "end_column": 59 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 106, + "end_line": 106, + "column": 8, + "end_column": 17 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[3]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "3" + }, + "name": "myStatic2" + }, + "value": { + "_type": "NewArray", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 106, + "end_line": 106, + "column": 20, + "end_column": 59 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[3]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "3" + }, + "values": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 106, + "end_line": 106, + "column": 51, + "end_column": 52 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "name": "n" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 106, + "end_line": 106, + "column": 54, + "end_column": 55 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "name": "n" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 106, + "end_line": 106, + "column": 57, + "end_column": 58 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "name": "n" + } + ] } } ], @@ -3004,8 +5633,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 54, - "end_line": 54, + "line": 109, + "end_line": 109, "column": 0, "end_column": 19 }, @@ -3021,8 +5650,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 54, - "end_line": 58, + "line": 109, + "end_line": 113, "column": 20, "end_column": 1 }, @@ -3031,8 +5660,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 55, - "end_line": 55, + "line": 110, + "end_line": 110, "column": 8, "end_column": 22 }, @@ -3040,8 +5669,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 55, - "end_line": 55, + "line": 110, + "end_line": 110, "column": 8, "end_column": 9 }, @@ -3067,8 +5696,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 55, - "end_line": 55, + "line": 110, + "end_line": 110, "column": 12, "end_column": 22 }, @@ -3096,8 +5725,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 111, + "end_line": 111, "column": 8, "end_column": 24 }, @@ -3105,8 +5734,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 111, + "end_line": 111, "column": 8, "end_column": 10 }, @@ -3132,8 +5761,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 111, + "end_line": 111, "column": 13, "end_column": 24 }, @@ -3161,19 +5790,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, + "line": 112, + "end_line": 112, "column": 2, - "end_column": 22 + "end_column": 18 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, + "line": 112, + "end_line": 112, "column": 2, - "end_column": 22 + "end_column": 18 }, "wtype": { "_type": "WType", @@ -3182,117 +5811,113 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 112, + "end_line": 112, + "column": 9, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, + "line": 112, + "end_line": 112, "column": 9, - "end_column": 21 + "end_column": 17 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, + "line": 112, + "end_line": 112, "column": 9, - "end_column": 21 + "end_column": 10 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "name": "b" - } + "arc4_name": "byte", + "n": "8" + }, + "name": "b" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 112, + "end_line": 112, + "column": 9, + "end_column": 17 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, - "column": 9, - "end_column": 21 + "line": 112, + "end_line": 112, + "column": 15, + "end_column": 17 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, - "column": 18, - "end_column": 20 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "name": "b2" - } + "arc4_name": "byte", + "n": "8" + }, + "name": "b2" } } - ], - "comment": null + }, + "error_message": null } } ], @@ -3312,8 +5937,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 60, - "end_line": 60, + "line": 115, + "end_line": 115, "column": 0, "end_column": 22 }, @@ -3329,8 +5954,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 60, - "end_line": 67, + "line": 115, + "end_line": 122, "column": 23, "end_column": 1 }, @@ -3339,8 +5964,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 116, + "end_line": 116, "column": 8, "end_column": 25 }, @@ -3348,8 +5973,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 116, + "end_line": 116, "column": 8, "end_column": 9 }, @@ -3392,8 +6017,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 116, + "end_line": 116, "column": 12, "end_column": 25 }, @@ -3437,8 +6062,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, + "line": 117, + "end_line": 117, "column": 8, "end_column": 35 }, @@ -3446,8 +6071,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, + "line": 117, + "end_line": 117, "column": 8, "end_column": 9 }, @@ -3490,8 +6115,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, + "line": 117, + "end_line": 117, "column": 12, "end_column": 35 }, @@ -3532,9 +6157,9 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, - "column": 24, + "line": 117, + "end_line": 117, + "column": 28, "end_column": 34 }, "wtype": { @@ -3548,8 +6173,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -3557,19 +6181,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, + "line": 119, + "end_line": 119, "column": 2, - "end_column": 62 + "end_column": 57 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, + "line": 119, + "end_line": 119, "column": 2, - "end_column": 62 + "end_column": 57 }, "wtype": { "_type": "WType", @@ -3578,187 +6202,166 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 119, + "end_line": 119, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, + "line": 119, + "end_line": 119, "column": 9, - "end_column": 21 + "end_column": 16 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 119, + "end_line": 119, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "address", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "32" + }, + "name": "a" + } + }, + "operator": "!=", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 119, + "end_line": 119, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, "expr": { - "_type": "BytesComparisonExpression", + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, - "column": 10, - "end_column": 21 + "line": 119, + "end_line": 119, + "column": 15, + "end_column": 16 }, "wtype": { - "_type": "WType", - "name": "bool", + "_type": "ARC4StaticArray", + "name": "arc4.static_array", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, - "column": 10, - "end_column": 21 - }, - "wtype": { + "scalar_type": 1, + "native_type": { "_type": "WType", - "name": "bytes", + "name": "account", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, - "column": 10, - "end_column": 11 - }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "address", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null, - "array_size": "32" - }, - "name": "a" - } - }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, - "column": 10, - "end_column": 21 - }, - "wtype": { - "_type": "WType", - "name": "bytes", + "arc4_name": "address", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, - "column": 19, - "end_column": 20 - }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "address", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null, - "array_size": "32" + "scalar_type": 2 }, - "name": "b" - } - } + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "32" + }, + "name": "b" } } - ], - "comment": "Zero address should not match sender" + }, + "error_message": "Zero address should not match sender" } }, { "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 120, + "end_line": 120, "column": 2, - "end_column": 68 + "end_column": 64 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 120, + "end_line": 120, "column": 2, - "end_column": 68 + "end_column": 64 }, "wtype": { "_type": "WType", @@ -3767,170 +6370,166 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 120, + "end_line": 120, + "column": 9, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 120, + "end_line": 120, "column": 9, - "end_column": 32 + "end_column": 28 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 120, + "end_line": 120, "column": 9, - "end_column": 32 + "end_column": 10 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4StaticArray", + "name": "arc4.static_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, - "column": 9, - "end_column": 10 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", + "arc4_name": "address", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "address", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null, - "array_size": "32" + "arc4_name": "byte", + "n": "8" }, - "name": "a" - } + "source_location": null, + "array_size": "32" + }, + "name": "a" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 120, + "end_line": 120, + "column": 9, + "end_column": 28 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, - "column": 9, - "end_column": 32 + "line": 120, + "end_line": 120, + "column": 15, + "end_column": 28 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4StaticArray", + "name": "arc4.static_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "AddressConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, - "column": 18, - "end_column": 31 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", + "arc4_name": "address", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "address", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null, - "array_size": "32" + "arc4_name": "byte", + "n": "8" }, - "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ" - } + "source_location": null, + "array_size": "32" + }, + "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ" } } - ], - "comment": "Two zero addresses should match" + }, + "error_message": "Two zero addresses should match" } }, { "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 121, + "end_line": 121, "column": 2, - "end_column": 77 + "end_column": 73 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 121, + "end_line": 121, "column": 2, - "end_column": 77 + "end_column": 73 }, "wtype": { "_type": "WType", @@ -3939,180 +6538,176 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 121, + "end_line": 121, + "column": 9, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 121, + "end_line": 121, "column": 9, - "end_column": 32 + "end_column": 28 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 121, + "end_line": 121, "column": 9, - "end_column": 32 + "end_column": 13 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" }, - "expr": { - "_type": "IndexExpression", + "base": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 121, + "end_line": 121, "column": 9, - "end_column": 13 + "end_column": 10 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "_type": "ARC4StaticArray", + "name": "arc4.static_array", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "uint64", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "base": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, - "column": 9, - "end_column": 10 + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", + "arc4_name": "address", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "address", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null, - "array_size": "32" + "arc4_name": "byte", + "n": "8" }, - "name": "a" + "source_location": null, + "array_size": "32" }, - "index": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, - "column": 11, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } - } - }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, - "column": 9, - "end_column": 32 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "name": "a" }, - "expr": { + "index": { "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, - "column": 21, - "end_column": 31 + "line": 121, + "end_line": 121, + "column": 11, + "end_column": 12 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, "value": "0", "teal_alias": null } } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 121, + "end_line": 121, + "column": 9, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 121, + "end_line": 121, + "column": 18, + "end_column": 28 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "value": "0", + "teal_alias": null + } } - ], - "comment": "Zero address should start with zero byte" + }, + "error_message": "Zero address should start with zero byte" } } ], @@ -4132,8 +6727,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 124, + "end_line": 124, "column": 0, "end_column": 20 }, @@ -4149,8 +6744,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 76, + "line": 124, + "end_line": 131, "column": 21, "end_column": 1 }, @@ -4159,8 +6754,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 70, - "end_line": 70, + "line": 125, + "end_line": 125, "column": 8, "end_column": 41 }, @@ -4168,8 +6763,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 70, - "end_line": 70, + "line": 125, + "end_line": 125, "column": 8, "end_column": 9 }, @@ -4207,8 +6802,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 70, - "end_line": 70, + "line": 125, + "end_line": 125, "column": 12, "end_column": 41 }, @@ -4240,8 +6835,8 @@ ], "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 70, - "end_line": 70, + "line": 125, + "end_line": 125, "column": 12, "end_column": 41 } @@ -4250,8 +6845,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 70, - "end_line": 70, + "line": 125, + "end_line": 125, "column": 12, "end_column": 41 }, @@ -4285,8 +6880,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 70, - "end_line": 70, + "line": 125, + "end_line": 125, "column": 22, "end_column": 40 }, @@ -4317,8 +6912,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 71, - "end_line": 71, + "line": 126, + "end_line": 126, "column": 8, "end_column": 27 }, @@ -4326,8 +6921,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 71, - "end_line": 71, + "line": 126, + "end_line": 126, "column": 8, "end_column": 17 }, @@ -4353,8 +6948,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 71, - "end_line": 71, + "line": 126, + "end_line": 126, "column": 20, "end_column": 27 }, @@ -4378,8 +6973,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 71, - "end_line": 71, + "line": 126, + "end_line": 126, "column": 20, "end_column": 21 }, @@ -4420,8 +7015,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 72, - "end_line": 72, + "line": 127, + "end_line": 127, "column": 8, "end_column": 38 }, @@ -4429,8 +7024,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 72, - "end_line": 72, + "line": 127, + "end_line": 127, "column": 8, "end_column": 24 }, @@ -4456,8 +7051,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 72, - "end_line": 72, + "line": 127, + "end_line": 127, "column": 27, "end_column": 38 }, @@ -4481,9 +7076,9 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 72, - "end_line": 72, - "column": 27, + "line": 127, + "end_line": 127, + "column": 29, "end_column": 35 }, "wtype": { @@ -4515,8 +7110,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 72, - "end_line": 72, + "line": 127, + "end_line": 127, "column": 27, "end_column": 28 }, @@ -4558,19 +7153,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 128, + "end_line": 128, "column": 2, - "end_column": 44 + "end_column": 40 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 128, + "end_line": 128, "column": 2, - "end_column": 44 + "end_column": 40 }, "wtype": { "_type": "WType", @@ -4579,125 +7174,121 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 128, + "end_line": 128, + "column": 9, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 128, + "end_line": 128, + "column": 9, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 128, + "end_line": 128, + "column": 9, + "end_column": 18 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "name": "firstItem" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 128, + "end_line": 128, "column": 9, - "end_column": 43 + "end_column": 39 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, - "column": 9, - "end_column": 43 + "line": 128, + "end_line": 128, + "column": 23, + "end_column": 39 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, - "column": 9, - "end_column": 18 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" + "scalar_type": 2 }, - "name": "firstItem" - } - }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, - "column": 9, - "end_column": 43 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "arc4_name": "uint64", + "n": "64" }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, - "column": 26, - "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" - }, - "name": "firstItemIndexer" - } + "name": "firstItemIndexer" } } - ], - "comment": null + }, + "error_message": null } }, { "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 129, + "end_line": 129, "column": 8, "end_column": 49 }, @@ -4705,8 +7296,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 129, + "end_line": 129, "column": 8, "end_column": 10 }, @@ -4777,8 +7368,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 129, + "end_line": 129, "column": 13, "end_column": 49 }, @@ -4843,8 +7434,8 @@ ], "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 129, + "end_line": 129, "column": 13, "end_column": 49 } @@ -4853,8 +7444,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 129, + "end_line": 129, "column": 13, "end_column": 49 }, @@ -4921,8 +7512,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 129, + "end_line": 129, "column": 23, "end_column": 36 }, @@ -4965,8 +7556,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 129, + "end_line": 129, "column": 38, "end_column": 48 }, @@ -4997,17 +7588,17 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 130, + "end_line": 130, "column": 2, "end_column": 25 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 130, + "end_line": 130, "column": 2, "end_column": 25 }, @@ -5018,67 +7609,63 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 130, + "end_line": 130, + "column": 9, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, - "column": 9, - "end_column": 24 + "line": 130, + "end_line": 130, + "column": 12, + "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, - "column": 9, - "end_column": 18 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "2", - "teal_alias": null + "value": "2", + "teal_alias": null + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 130, + "end_line": 130, + "column": 23, + "end_column": 24 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, - "column": 23, - "end_column": 24 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "2", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "2", + "teal_alias": null } - ], - "comment": null + }, + "error_message": null } } ], @@ -5098,8 +7685,8 @@ "_type": "Contract", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 78, - "end_line": 78, + "line": 133, + "end_line": 133, "column": 0, "end_column": 57 }, @@ -5113,8 +7700,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 83, - "end_line": 83, + "line": 138, + "end_line": 138, "column": 2, "end_column": 35 }, @@ -5202,8 +7789,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -5262,8 +7848,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 83, - "end_line": 92, + "line": 138, + "end_line": 153, "column": 36, "end_column": 3 }, @@ -5272,8 +7858,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 84, - "end_line": 84, + "line": 139, + "end_line": 139, "column": 10, "end_column": 30 }, @@ -5281,8 +7867,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 84, - "end_line": 84, + "line": 139, + "end_line": 139, "column": 10, "end_column": 11 }, @@ -5308,8 +7894,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 84, - "end_line": 84, + "line": 139, + "end_line": 139, "column": 14, "end_column": 30 }, @@ -5337,8 +7923,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, + "line": 140, + "end_line": 140, "column": 4, "end_column": 13 }, @@ -5346,8 +7932,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, + "line": 140, + "end_line": 140, "column": 4, "end_column": 13 }, @@ -5369,19 +7955,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 86, - "end_line": 86, + "line": 141, + "end_line": 141, "column": 4, - "end_column": 34 + "end_column": 39 }, "expr": { "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 86, - "end_line": 86, + "line": 141, + "end_line": 141, "column": 4, - "end_column": 34 + "end_column": 39 }, "wtype": { "_type": "WType", @@ -5392,7 +7978,7 @@ }, "target": { "_type": "SubroutineID", - "target": "tests/approvals/arc4-types.algo.ts::test" + "target": "tests/approvals/arc4-types.algo.ts::testUintN" }, "args": [ { @@ -5402,10 +7988,10 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 86, - "end_line": 86, - "column": 9, - "end_column": 10 + "line": 141, + "end_line": 141, + "column": 14, + "end_column": 15 }, "wtype": { "_type": "WType", @@ -5425,10 +8011,10 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 86, - "end_line": 86, - "column": 12, - "end_column": 14 + "line": 141, + "end_line": 141, + "column": 17, + "end_column": 19 }, "wtype": { "_type": "WType", @@ -5448,10 +8034,10 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 86, - "end_line": 86, - "column": 16, - "end_column": 33 + "line": 141, + "end_line": 141, + "column": 21, + "end_column": 38 }, "wtype": { "_type": "ARC4UIntN", @@ -5464,12 +8050,141 @@ "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 1 + }, + "arc4_name": "uint256", + "n": "256" + }, + "value": "4", + "teal_alias": null + } + } + ] + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 142, + "end_line": 142, + "column": 4, + "end_column": 16 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 142, + "end_line": 142, + "column": 4, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/arc4-types.algo.ts::testUFixed" + }, + "args": [] + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 143, + "end_line": 143, + "column": 4, + "end_column": 14 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 143, + "end_line": 143, + "column": 4, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/arc4-types.algo.ts::testByte" + }, + "args": [] + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 144, + "end_line": 144, + "column": 4, + "end_column": 33 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 144, + "end_line": 144, + "column": 4, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/arc4-types.algo.ts::testArrays" + }, + "args": [ + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 144, + "end_line": 144, + "column": 15, + "end_column": 32 + }, + "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": "uint256", - "n": "256" + "arc4_name": "uint64", + "n": "64" }, - "value": "4", + "value": "65", "teal_alias": null } } @@ -5480,19 +8195,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 87, - "end_line": 87, + "line": 145, + "end_line": 145, "column": 4, - "end_column": 14 + "end_column": 17 }, "expr": { "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 87, - "end_line": 87, + "line": 145, + "end_line": 145, "column": 4, - "end_column": 14 + "end_column": 17 }, "wtype": { "_type": "WType", @@ -5503,7 +8218,7 @@ }, "target": { "_type": "SubroutineID", - "target": "tests/approvals/arc4-types.algo.ts::testByte" + "target": "tests/approvals/arc4-types.algo.ts::testAddress" }, "args": [] } @@ -5512,19 +8227,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 88, - "end_line": 88, + "line": 146, + "end_line": 146, "column": 4, - "end_column": 33 + "end_column": 15 }, "expr": { "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 88, - "end_line": 88, + "line": 146, + "end_line": 146, "column": 4, - "end_column": 33 + "end_column": 15 }, "wtype": { "_type": "WType", @@ -5535,39 +8250,94 @@ }, "target": { "_type": "SubroutineID", - "target": "tests/approvals/arc4-types.algo.ts::testArrays" + "target": "tests/approvals/arc4-types.algo.ts::testTuple" + }, + "args": [] + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 147, + "end_line": 147, + "column": 4, + "end_column": 16 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 147, + "end_line": 147, + "column": 4, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/arc4-types.algo.ts::testUFixed" + }, + "args": [] + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 148, + "end_line": 148, + "column": 4, + "end_column": 41 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 148, + "end_line": 148, + "column": 4, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/arc4-types.algo.ts::testDynamicBytes" }, "args": [ { "_type": "CallArg", "name": null, "value": { - "_type": "IntegerConstant", + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 88, - "end_line": 88, - "column": 15, - "end_column": 32 + "line": 148, + "end_line": 148, + "column": 27, + "end_column": 39 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "WType", + "name": "bytes", "immutable": 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": 1 }, - "value": "65", - "teal_alias": null + "value": "Xl-q6ZEbCBZEX", + "encoding": "utf8" } } ] @@ -5577,19 +8347,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 89, - "end_line": 89, + "line": 149, + "end_line": 149, "column": 4, - "end_column": 17 + "end_column": 21 }, "expr": { "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 89, - "end_line": 89, + "line": 149, + "end_line": 149, "column": 4, - "end_column": 17 + "end_column": 21 }, "wtype": { "_type": "WType", @@ -5600,28 +8370,118 @@ }, "target": { "_type": "SubroutineID", - "target": "tests/approvals/arc4-types.algo.ts::testAddress" + "target": "tests/approvals/arc4-types.algo.ts::testStaticBytes" }, "args": [] } }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 150, + "end_line": 150, + "column": 10, + "end_column": 58 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 150, + "end_line": 150, + "column": 10, + "end_column": 16 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null + }, + "name": "result" + }, + "value": { + "_type": "NewArray", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 150, + "end_line": 150, + "column": 19, + "end_column": 58 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 150, + "end_line": 150, + "column": 19, + "end_column": 58 + } + }, + "values": [] + } + }, { "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 90, - "end_line": 90, + "line": 151, + "end_line": 151, "column": 4, - "end_column": 15 + "end_column": 31 }, "expr": { - "_type": "SubroutineCallExpression", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 90, - "end_line": 90, + "line": 151, + "end_line": 151, "column": 4, - "end_column": 15 + "end_column": 31 }, "wtype": { "_type": "WType", @@ -5630,19 +8490,129 @@ "ephemeral": false, "scalar_type": null }, - "target": { - "_type": "SubroutineID", - "target": "tests/approvals/arc4-types.algo.ts::testTuple" + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 151, + "end_line": 151, + "column": 11, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 151, + "end_line": 151, + "column": 18, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "extract_uint16", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 151, + "end_line": 151, + "column": 11, + "end_column": 17 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null + }, + "name": "result" + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 151, + "end_line": 151, + "column": 18, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 151, + "end_line": 151, + "column": 29, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + } }, - "args": [] + "error_message": null } }, { "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 91, - "end_line": 91, + "line": 152, + "end_line": 152, "column": 4, "end_column": 15 }, @@ -5650,8 +8620,8 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 91, - "end_line": 91, + "line": 152, + "end_line": 152, "column": 11, "end_column": 15 }, @@ -5761,8 +8731,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 79, - "end_line": 79, + "line": 134, + "end_line": 134, "column": 2, "end_column": 51 }, @@ -5845,8 +8815,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 79, - "end_line": 81, + "line": 134, + "end_line": 136, "column": 52, "end_column": 3 }, @@ -5855,8 +8825,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 135, + "end_line": 135, "column": 4, "end_column": 54 }, @@ -5864,8 +8834,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 135, + "end_line": 135, "column": 11, "end_column": 54 }, @@ -5948,8 +8918,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 135, + "end_line": 135, "column": 12, "end_column": 22 }, @@ -5976,8 +8946,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 135, + "end_line": 135, "column": 24, "end_column": 38 }, @@ -6004,8 +8974,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 135, + "end_line": 135, "column": 40, "end_column": 53 }, @@ -6065,8 +9035,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 78, - "end_line": 78, + "line": 133, + "end_line": 133, "column": 0, "end_column": 57 }, @@ -6082,8 +9052,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 78, - "end_line": 78, + "line": 133, + "end_line": 133, "column": 0, "end_column": 57 }, @@ -6092,8 +9062,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 78, - "end_line": 78, + "line": 133, + "end_line": 133, "column": 0, "end_column": 57 }, @@ -6101,8 +9071,8 @@ "_type": "VoidConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 78, - "end_line": 78, + "line": 133, + "end_line": 133, "column": 0, "end_column": 57 }, @@ -6157,42 +9127,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -6202,7 +9137,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -6214,6 +9149,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/array-destructuring/array-destructuring.awst.json b/tests/approvals/out/array-destructuring/array-destructuring.awst.json index 1d67bb78..24e2da40 100644 --- a/tests/approvals/out/array-destructuring/array-destructuring.awst.json +++ b/tests/approvals/out/array-destructuring/array-destructuring.awst.json @@ -1728,7 +1728,7 @@ "end_column": 17 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/array-destructuring.algo.ts", "line": 27, @@ -1743,65 +1743,61 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/array-destructuring.algo.ts", + "line": 27, + "end_line": 27, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/array-destructuring.algo.ts", "line": 27, "end_line": 27, "column": 9, - "end_column": 16 + "end_column": 10 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/array-destructuring.algo.ts", - "line": 27, - "end_line": 27, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "x" + "name": "x" + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/array-destructuring.algo.ts", + "line": 27, + "end_line": 27, + "column": 15, + "end_column": 16 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/array-destructuring.algo.ts", - "line": 27, - "end_line": 27, - "column": 15, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "b" - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" } - ], - "comment": null + }, + "error_message": null } }, { @@ -1814,7 +1810,7 @@ "end_column": 17 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/array-destructuring.algo.ts", "line": 28, @@ -1829,65 +1825,61 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/array-destructuring.algo.ts", + "line": 28, + "end_line": 28, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/array-destructuring.algo.ts", "line": 28, "end_line": 28, "column": 9, - "end_column": 16 + "end_column": 10 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/array-destructuring.algo.ts", - "line": 28, - "end_line": 28, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "y" + "name": "y" + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/array-destructuring.algo.ts", + "line": 28, + "end_line": 28, + "column": 15, + "end_column": 16 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/array-destructuring.algo.ts", - "line": 28, - "end_line": 28, - "column": 15, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" } - ], - "comment": null + }, + "error_message": null } } ], diff --git a/tests/approvals/out/assert-match/AssertMatchContract.approval.teal b/tests/approvals/out/assert-match/AssertMatchContract.approval.teal new file mode 100644 index 00000000..350f7b67 --- /dev/null +++ b/tests/approvals/out/assert-match/AssertMatchContract.approval.teal @@ -0,0 +1,173 @@ +#pragma version 10 + +tests/approvals/assert-match.algo.ts::AssertMatchContract.approvalProgram: + intcblock 1 0 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/assert-match.algo.ts:22 + // const txn = gtxn.PaymentTxn(1) + intc_0 // 1 + // tests/approvals/assert-match.algo.ts:23 + // test(txn) + callsub test + // tests/approvals/assert-match.algo.ts:24 + // return true + intc_0 // 1 + return + + +// tests/approvals/assert-match.algo.ts::AssertMatchContract.constructor() -> void: +constructor: + // tests/approvals/assert-match.algo.ts:20 + // export class AssertMatchContract extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/assert-match.algo.ts::test(x: uint64) -> void: +test: + // tests/approvals/assert-match.algo.ts:9 + // function test(x: gtxn.PaymentTxn) { + proto 1 0 + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + frame_dig -1 + gtxns Amount + // tests/approvals/assert-match.algo.ts:11 + // amount: { between: [0, 50000] }, + pushint 50000 // 50000 + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + <= + bz test_bool_false@8 + frame_dig -1 + gtxns Amount + // tests/approvals/assert-match.algo.ts:11 + // amount: { between: [0, 50000] }, + intc_1 // 0 + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + >= + bz test_bool_false@8 + frame_dig -1 + gtxns Sender + // tests/approvals/assert-match.algo.ts:12 + // sender: Txn.sender, + txn Sender + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + == + bz test_bool_false@8 + frame_dig -1 + gtxns Receiver + // tests/approvals/assert-match.algo.ts:13 + // receiver: Global.currentApplicationAddress, + global CurrentApplicationAddress + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + == + bz test_bool_false@8 + frame_dig -1 + gtxns CloseRemainderTo + // tests/approvals/assert-match.algo.ts:14 + // closeRemainderTo: Global.zeroAddress, + global ZeroAddress + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + == + bz test_bool_false@8 + frame_dig -1 + gtxns FirstValid + // tests/approvals/assert-match.algo.ts:15 + // firstValid: { greaterThan: 1 }, + intc_0 // 1 + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + > + bz test_bool_false@8 + frame_dig -1 + gtxns LastValid + // tests/approvals/assert-match.algo.ts:16 + // lastValid: { lessThan: 2 ** 40 }, + pushint 1099511627776 // 1099511627776 + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + < + bz test_bool_false@8 + intc_0 // 1 + b test_bool_merge@9 + +test_bool_false@8: + intc_1 // 0 + +test_bool_merge@9: + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + assert // assert target is match for conditions + retsub diff --git a/tests/approvals/out/assert-match/AssertMatchContract.clear.teal b/tests/approvals/out/assert-match/AssertMatchContract.clear.teal new file mode 100644 index 00000000..54c7e9df --- /dev/null +++ b/tests/approvals/out/assert-match/AssertMatchContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/assert-match.algo.ts::AssertMatchContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/assert-match/assert-match.awst b/tests/approvals/out/assert-match/assert-match.awst index a981a9f7..1587d9ed 100644 --- a/tests/approvals/out/assert-match/assert-match.awst +++ b/tests/approvals/out/assert-match/assert-match.awst @@ -1,10 +1,10 @@ subroutine testSelf(): void { - assert(txn() == global()) + assert(txn() == global(), comment=assert target is match for conditions) } subroutine test(x: group_transaction_pay): void { - assert(gtxns(x) <= 50000 and gtxns(x) >= 0 and gtxns(x) == txn() and gtxns(x) == global() and gtxns(x) == global() and gtxns(x) > 1 and gtxns(x) < 1099511627776) + assert(gtxns(x) <= 50000 and gtxns(x) >= 0 and gtxns(x) == txn() and gtxns(x) == global() and gtxns(x) == global() and gtxns(x) > 1 and gtxns(x) < 1099511627776, comment=assert target is match for conditions) } contract AssertMatchContract { @@ -28,9 +28,8 @@ contract AssertMatchContract void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/assert-match/assert-match.awst.json b/tests/approvals/out/assert-match/assert-match.awst.json index 1f880809..f8da9c6b 100644 --- a/tests/approvals/out/assert-match/assert-match.awst.json +++ b/tests/approvals/out/assert-match/assert-match.awst.json @@ -36,7 +36,7 @@ "end_column": 4 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 4, @@ -51,11 +51,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 4, + "end_line": 6, + "column": 2, + "end_column": 4 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 4, @@ -65,61 +78,42 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 4, - "end_line": 6, - "column": 2, - "end_column": 4 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "txn", - "immediates": [ - "Receiver" - ], - "stack_args": [], - "comment": null + "op_code": "txn", + "immediates": [ + "Receiver" + ], + "stack_args": [] + }, + "operator": "==", + "rhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 5, + "end_line": 5, + "column": 21, + "end_column": 46 }, - "operator": "==", - "rhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 5, - "end_line": 5, - "column": 14, - "end_column": 46 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "global", - "immediates": [ - "CurrentApplicationAddress" - ], - "stack_args": [], - "comment": null - } + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationAddress" + ], + "stack_args": [] } - ], - "comment": "assert target is match for conditions" + }, + "error_message": "assert target is match for conditions" } } ], @@ -192,7 +186,7 @@ "end_column": 4 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 10, @@ -207,10 +201,23 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 10, + "end_line": 17, + "column": 2, + "end_column": 4 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { "_type": "BooleanBinaryOperation", "source_location": { "file": "tests/approvals/assert-match.algo.ts", @@ -291,7 +298,7 @@ "scalar_type": 2 }, "left": { - "_type": "BooleanBinaryOperation", + "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 10, @@ -306,8 +313,8 @@ "ephemeral": false, "scalar_type": 2 }, - "left": { - "_type": "NumericComparisonExpression", + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 10, @@ -317,160 +324,61 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 10, - "end_line": 17, - "column": 2, - "end_column": 4 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "gtxns", - "immediates": [ - "Amount" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 10, - "end_line": 10, - "column": 14, - "end_column": 15 - }, - "wtype": { - "_type": "WGroupTransaction", - "name": "group_transaction_pay", - "immutable": true, - "ephemeral": false, - "scalar_type": 2, - "transaction_type": 1 - }, - "name": "x" - } - ], - "comment": null - }, - "operator": "<=", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 11, - "end_line": 11, - "column": 27, - "end_column": 32 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "50000", - "teal_alias": null - } + "op_code": "gtxns", + "immediates": [ + "Amount" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 10, + "end_line": 10, + "column": 14, + "end_column": 15 + }, + "wtype": { + "_type": "WGroupTransaction", + "name": "group_transaction_pay", + "immutable": true, + "ephemeral": false, + "scalar_type": 2, + "transaction_type": 1 + }, + "name": "x" + } + ] }, - "op": "and", - "right": { - "_type": "NumericComparisonExpression", + "operator": "<=", + "rhs": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/assert-match.algo.ts", - "line": 10, - "end_line": 17, - "column": 2, - "end_column": 4 + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 32 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 10, - "end_line": 17, - "column": 2, - "end_column": 4 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "gtxns", - "immediates": [ - "Amount" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 10, - "end_line": 10, - "column": 14, - "end_column": 15 - }, - "wtype": { - "_type": "WGroupTransaction", - "name": "group_transaction_pay", - "immutable": true, - "ephemeral": false, - "scalar_type": 2, - "transaction_type": 1 - }, - "name": "x" - } - ], - "comment": null - }, - "operator": ">=", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 11, - "end_line": 11, - "column": 24, - "end_column": 25 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } + "value": "50000", + "teal_alias": null } }, "op": "and", "right": { - "_type": "BytesComparisonExpression", + "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 10, @@ -496,14 +404,14 @@ }, "wtype": { "_type": "WType", - "name": "account", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, "op_code": "gtxns", "immediates": [ - "Sender" + "Amount" ], "stack_args": [ { @@ -525,32 +433,27 @@ }, "name": "x" } - ], - "comment": null + ] }, - "operator": "==", + "operator": ">=", "rhs": { - "_type": "IntrinsicCall", + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/assert-match.algo.ts", - "line": 12, - "end_line": 12, - "column": 12, - "end_column": 22 + "line": 11, + "end_line": 11, + "column": 24, + "end_column": 25 }, "wtype": { "_type": "WType", - "name": "account", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "op_code": "txn", - "immediates": [ - "Sender" - ], - "stack_args": [], - "comment": null + "value": "0", + "teal_alias": null } } }, @@ -589,7 +492,7 @@ }, "op_code": "gtxns", "immediates": [ - "Receiver" + "Sender" ], "stack_args": [ { @@ -611,18 +514,17 @@ }, "name": "x" } - ], - "comment": null + ] }, "operator": "==", "rhs": { "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/assert-match.algo.ts", - "line": 13, - "end_line": 13, - "column": 14, - "end_column": 46 + "line": 12, + "end_line": 12, + "column": 16, + "end_column": 22 }, "wtype": { "_type": "WType", @@ -631,12 +533,11 @@ "ephemeral": false, "scalar_type": 1 }, - "op_code": "global", + "op_code": "txn", "immediates": [ - "CurrentApplicationAddress" + "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -675,7 +576,7 @@ }, "op_code": "gtxns", "immediates": [ - "CloseRemainderTo" + "Receiver" ], "stack_args": [ { @@ -697,18 +598,17 @@ }, "name": "x" } - ], - "comment": null + ] }, "operator": "==", "rhs": { "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/assert-match.algo.ts", - "line": 14, - "end_line": 14, - "column": 22, - "end_column": 40 + "line": 13, + "end_line": 13, + "column": 21, + "end_column": 46 }, "wtype": { "_type": "WType", @@ -719,16 +619,15 @@ }, "op_code": "global", "immediates": [ - "ZeroAddress" + "CurrentApplicationAddress" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, "op": "and", "right": { - "_type": "NumericComparisonExpression", + "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 10, @@ -754,14 +653,14 @@ }, "wtype": { "_type": "WType", - "name": "uint64", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, "op_code": "gtxns", "immediates": [ - "FirstValid" + "CloseRemainderTo" ], "stack_args": [ { @@ -783,28 +682,30 @@ }, "name": "x" } - ], - "comment": null + ] }, - "operator": ">", + "operator": "==", "rhs": { - "_type": "IntegerConstant", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/assert-match.algo.ts", - "line": 15, - "end_line": 15, - "column": 31, - "end_column": 32 + "line": 14, + "end_line": 14, + "column": 29, + "end_column": 40 }, "wtype": { "_type": "WType", - "name": "uint64", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "value": "1", - "teal_alias": null + "op_code": "global", + "immediates": [ + "ZeroAddress" + ], + "stack_args": [] } } }, @@ -843,7 +744,7 @@ }, "op_code": "gtxns", "immediates": [ - "LastValid" + "FirstValid" ], "stack_args": [ { @@ -865,18 +766,17 @@ }, "name": "x" } - ], - "comment": null + ] }, - "operator": "<", + "operator": ">", "rhs": { "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/assert-match.algo.ts", - "line": 16, - "end_line": 16, - "column": 27, - "end_column": 34 + "line": 15, + "end_line": 15, + "column": 31, + "end_column": 32 }, "wtype": { "_type": "WType", @@ -885,13 +785,93 @@ "ephemeral": false, "scalar_type": 2 }, - "value": "1099511627776", + "value": "1", "teal_alias": null } } + }, + "op": "and", + "right": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 10, + "end_line": 17, + "column": 2, + "end_column": 4 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 10, + "end_line": 17, + "column": 2, + "end_column": 4 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "gtxns", + "immediates": [ + "LastValid" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 10, + "end_line": 10, + "column": 14, + "end_column": 15 + }, + "wtype": { + "_type": "WGroupTransaction", + "name": "group_transaction_pay", + "immutable": true, + "ephemeral": false, + "scalar_type": 2, + "transaction_type": 1 + }, + "name": "x" + } + ] + }, + "operator": "<", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 16, + "end_line": 16, + "column": 27, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1099511627776", + "teal_alias": null + } } - ], - "comment": "assert target is match for conditions" + }, + "error_message": "assert target is match for conditions" } } ], @@ -1015,8 +995,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -1419,42 +1398,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1464,7 +1408,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -1476,6 +1420,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/biguint-expressions/DemoContract.approval.teal b/tests/approvals/out/biguint-expressions/DemoContract.approval.teal new file mode 100644 index 00000000..3d1b5b87 --- /dev/null +++ b/tests/approvals/out/biguint-expressions/DemoContract.approval.teal @@ -0,0 +1,89 @@ +#pragma version 10 + +tests/approvals/biguint-expressions.algo.ts::DemoContract.approvalProgram: + intcblock 4 1 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/biguint-expressions.algo.ts:32 + // testConstructor(1, false, itob(4)) + intc_0 // 4 + itob + intc_1 // 1 + pushint 0 // 0 + uncover 2 + callsub testConstructor + // tests/approvals/biguint-expressions.algo.ts:33 + // testOps(500n, 1000n) + pushbytes 0x01f4 + pushbytes 0x03e8 + callsub testOps + // tests/approvals/biguint-expressions.algo.ts:34 + // return true + intc_1 // 1 + return + + +// tests/approvals/biguint-expressions.algo.ts::DemoContract.constructor() -> void: +constructor: + // tests/approvals/biguint-expressions.algo.ts:30 + // class DemoContract extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/biguint-expressions.algo.ts::testConstructor(a: uint64, b: uint64, c: bytes) -> void: +testConstructor: + // tests/approvals/biguint-expressions.algo.ts:5 + // function testConstructor(a: uint64, b: boolean, c: bytes) { + proto 3 0 + retsub + + +// tests/approvals/biguint-expressions.algo.ts::testOps(smaller: bytes, larger: bytes) -> void: +testOps: + // tests/approvals/biguint-expressions.algo.ts:21 + // function testOps(smaller: biguint, larger: biguint) { + proto 2 0 + // tests/approvals/biguint-expressions.algo.ts:22 + // assert(smaller < larger) + frame_dig -2 + frame_dig -1 + b< + assert + // tests/approvals/biguint-expressions.algo.ts:23 + // assert(smaller <= smaller) + frame_dig -2 + dup + b<= + assert + // tests/approvals/biguint-expressions.algo.ts:24 + // assert(larger > smaller) + frame_dig -1 + frame_dig -2 + b> + assert + // tests/approvals/biguint-expressions.algo.ts:25 + // assert(larger >= larger) + frame_dig -1 + dup + b>= + assert + // tests/approvals/biguint-expressions.algo.ts:26 + // assert(smaller === BigUint(smaller)) + frame_dig -2 + dup + b== + assert + // tests/approvals/biguint-expressions.algo.ts:27 + // assert(smaller === BigUint(op.bzero(4).concat(Bytes(smaller))), 'Leading zeros should be ignored in equality') + intc_0 // 4 + bzero + frame_dig -2 + concat + frame_dig -2 + b== + assert // Leading zeros should be ignored in equality + retsub diff --git a/tests/approvals/out/biguint-expressions/DemoContract.clear.teal b/tests/approvals/out/biguint-expressions/DemoContract.clear.teal new file mode 100644 index 00000000..02d4c3c7 --- /dev/null +++ b/tests/approvals/out/biguint-expressions/DemoContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/biguint-expressions.algo.ts::DemoContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir b/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir new file mode 100644 index 00000000..cf95a8ad --- /dev/null +++ b/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir @@ -0,0 +1,53 @@ +contract tests/approvals/biguint-expressions.algo.ts::DemoContract: + program approval: + subroutine tests/approvals/biguint-expressions.algo.ts::DemoContract.approvalProgram() -> bool: + block@0: // L31 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/biguint-expressions.algo.ts::DemoContract.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bytes = (itob 4u) + tests/approvals/biguint-expressions.algo.ts::testConstructor(1u, 0u, tmp%0#0) + tests/approvals/biguint-expressions.algo.ts::testOps(500b, 1000b) + return 1u + + subroutine tests/approvals/biguint-expressions.algo.ts::DemoContract.constructor() -> void: + block@0: // L30 + return + + subroutine tests/approvals/biguint-expressions.algo.ts::testConstructor(a: uint64, b: bool, c: bytes) -> void: + block@0: // L5 + let reinterpret_biguint%0#0: biguint = (itob 1u) + let reinterpret_biguint%1#0: biguint = (itob 0u) + let reinterpret_biguint%2#0: biguint = (itob a#0) + let tmp%0#0: uint64 = (* a#0 a#0) + let reinterpret_biguint%3#0: biguint = (itob tmp%0#0) + let reinterpret_biguint%4#0: biguint = (itob b#0) + let reinterpret_biguint%5#0: biguint = c#0 + return + + subroutine tests/approvals/biguint-expressions.algo.ts::testOps(smaller: biguint, larger: biguint) -> void: + block@0: // L21 + let tmp%0#0: bool = (b< smaller#0 larger#0) + (assert tmp%0#0) + let tmp%1#0: bool = (b<= smaller#0 smaller#0) + (assert tmp%1#0) + let tmp%2#0: bool = (b> larger#0 smaller#0) + (assert tmp%2#0) + let tmp%3#0: bool = (b>= larger#0 larger#0) + (assert tmp%3#0) + let tmp%4#0: bool = (b== smaller#0 smaller#0) + (assert tmp%4#0) + let tmp%5#0: bytes = (bzero 4u) + let reinterpret_bytes%0#0: bytes = smaller#0 + let reinterpret_biguint%0#0: biguint = (concat tmp%5#0 reinterpret_bytes%0#0) + let tmp%6#0: bool = (b== smaller#0 reinterpret_biguint%0#0) + (assert tmp%6#0) // Leading zeros should be ignored in equality + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/biguint-expressions/biguint-expressions.awst b/tests/approvals/out/biguint-expressions/biguint-expressions.awst index fae2298c..cb78a98b 100644 --- a/tests/approvals/out/biguint-expressions/biguint-expressions.awst +++ b/tests/approvals/out/biguint-expressions/biguint-expressions.awst @@ -1,4 +1,4 @@ -subroutine test(a: uint64, b: bool, c: bytes): void +subroutine testConstructor(a: uint64, b: bool, c: bytes): void { 0 reinterpret_cast(itob(True)) @@ -13,4 +13,40 @@ subroutine test(a: uint64, b: bool, c: bytes): void reinterpret_cast(itob(a * a)) reinterpret_cast(itob(b)) reinterpret_cast(c) +} +subroutine testOps(smaller: biguint, larger: biguint): void +{ + assert(smaller < larger) + assert(smaller <= smaller) + assert(larger > smaller) + assert(larger >= larger) + assert(smaller == smaller) + assert(smaller == reinterpret_cast(concat(bzero(4), reinterpret_cast(smaller))), comment=Leading zeros should be ignored in equality) +} +contract DemoContract +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + tests/approvals/biguint-expressions.algo.ts::testConstructor(1, False, itob(4)) + tests/approvals/biguint-expressions.algo.ts::testOps(500, 1000) + return True + } + + clearProgram(): bool + { + return True + } + + constructor(): void + { + void + } + + BaseContract::constructor(): void + { + } + } \ No newline at end of file diff --git a/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json b/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json index 3f5b05a6..a5bdd2a6 100644 --- a/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json +++ b/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json @@ -3,10 +3,10 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 4, - "end_line": 4, + "line": 5, + "end_line": 5, "column": 0, - "end_column": 46 + "end_column": 57 }, "args": [ { @@ -21,10 +21,10 @@ }, "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 4, - "end_line": 4, - "column": 14, - "end_column": 23 + "line": 5, + "end_line": 5, + "column": 25, + "end_column": 34 } }, { @@ -39,10 +39,10 @@ }, "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 4, - "end_line": 4, - "column": 25, - "end_column": 35 + "line": 5, + "end_line": 5, + "column": 36, + "end_column": 46 } }, { @@ -57,10 +57,10 @@ }, "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 4, - "end_line": 4, - "column": 37, - "end_column": 45 + "line": 5, + "end_line": 5, + "column": 48, + "end_column": 56 } } ], @@ -75,9 +75,9 @@ "_type": "Block", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 4, - "end_line": 18, - "column": 47, + "line": 5, + "end_line": 19, + "column": 58, "end_column": 1 }, "body": [ @@ -85,8 +85,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 5, - "end_line": 5, + "line": 6, + "end_line": 6, "column": 2, "end_column": 11 }, @@ -94,8 +94,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 5, - "end_line": 5, + "line": 6, + "end_line": 6, "column": 2, "end_column": 11 }, @@ -114,8 +114,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 6, - "end_line": 6, + "line": 7, + "end_line": 7, "column": 2, "end_column": 15 }, @@ -123,8 +123,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 6, - "end_line": 6, + "line": 7, + "end_line": 7, "column": 2, "end_column": 15 }, @@ -139,8 +139,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 6, - "end_line": 6, + "line": 7, + "end_line": 7, "column": 2, "end_column": 15 }, @@ -158,8 +158,8 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 6, - "end_line": 6, + "line": 7, + "end_line": 7, "column": 10, "end_column": 14 }, @@ -172,8 +172,7 @@ }, "value": true } - ], - "comment": null + ] } } }, @@ -181,8 +180,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 2, "end_column": 16 }, @@ -190,8 +189,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 2, "end_column": 16 }, @@ -206,8 +205,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 2, "end_column": 16 }, @@ -225,8 +224,8 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 10, "end_column": 15 }, @@ -239,8 +238,7 @@ }, "value": false } - ], - "comment": null + ] } } }, @@ -248,19 +246,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 8, - "end_line": 8, - "column": 2, - "end_column": 12 + "line": 9, + "end_line": 9, + "column": 10, + "end_column": 11 }, "expr": { "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 8, - "end_line": 8, - "column": 2, - "end_column": 12 + "line": 9, + "end_line": 9, + "column": 10, + "end_column": 11 }, "wtype": { "_type": "WType", @@ -277,19 +275,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 9, - "end_line": 9, - "column": 2, - "end_column": 12 + "line": 10, + "end_line": 10, + "column": 10, + "end_column": 11 }, "expr": { "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 9, - "end_line": 9, - "column": 2, - "end_column": 12 + "line": 10, + "end_line": 10, + "column": 10, + "end_column": 11 }, "wtype": { "_type": "WType", @@ -306,8 +304,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 10, "end_column": 12 }, @@ -315,8 +313,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 10, "end_column": 12 }, @@ -335,8 +333,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 10, "end_column": 12 }, @@ -344,8 +342,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 10, "end_column": 12 }, @@ -364,8 +362,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 10, "end_column": 25 }, @@ -373,8 +371,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 10, "end_column": 25 }, @@ -393,8 +391,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 2, "end_column": 29 }, @@ -402,8 +400,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 2, "end_column": 29 }, @@ -422,8 +420,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 2, "end_column": 12 }, @@ -431,8 +429,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 2, "end_column": 12 }, @@ -447,8 +445,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 2, "end_column": 12 }, @@ -466,8 +464,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 10, "end_column": 11 }, @@ -480,8 +478,7 @@ }, "name": "a" } - ], - "comment": null + ] } } }, @@ -489,8 +486,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 2, "end_column": 16 }, @@ -498,8 +495,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 2, "end_column": 16 }, @@ -514,8 +511,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 2, "end_column": 16 }, @@ -533,8 +530,8 @@ "_type": "UInt64BinaryOperation", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 10, "end_column": 15 }, @@ -549,8 +546,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 10, "end_column": 11 }, @@ -568,8 +565,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 14, "end_column": 15 }, @@ -583,8 +580,7 @@ "name": "a" } } - ], - "comment": null + ] } } }, @@ -592,8 +588,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 2, "end_column": 12 }, @@ -601,8 +597,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 2, "end_column": 12 }, @@ -617,8 +613,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 2, "end_column": 12 }, @@ -636,8 +632,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 10, "end_column": 11 }, @@ -650,8 +646,7 @@ }, "name": "b" } - ], - "comment": null + ] } } }, @@ -659,8 +654,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 2, "end_column": 12 }, @@ -668,8 +663,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 2, "end_column": 12 }, @@ -684,8 +679,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 10, "end_column": 11 }, @@ -710,7 +705,1286 @@ "args": {}, "returns": null }, - "id": "tests/approvals/biguint-expressions.algo.ts::test", - "name": "test" + "id": "tests/approvals/biguint-expressions.algo.ts::testConstructor", + "name": "testConstructor" + }, + { + "_type": "Subroutine", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 21, + "end_line": 21, + "column": 0, + "end_column": 51 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "smaller", + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 21, + "end_line": 21, + "column": 17, + "end_column": 33 + } + }, + { + "_type": "SubroutineArgument", + "name": "larger", + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 21, + "end_line": 21, + "column": 35, + "end_column": 50 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 21, + "end_line": 28, + "column": 52, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 22, + "column": 2, + "end_column": 26 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 22, + "column": 2, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 22, + "column": 9, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 22, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + }, + "operator": "<", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 22, + "column": 19, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "larger" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 2, + "end_column": 28 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 2, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 9, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + }, + "operator": "<=", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 2, + "end_column": 26 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 2, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 9, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 9, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "larger" + }, + "operator": ">", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 25, + "end_line": 25, + "column": 2, + "end_column": 26 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 25, + "end_line": 25, + "column": 2, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 25, + "end_line": 25, + "column": 9, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 25, + "end_line": 25, + "column": 9, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "larger" + }, + "operator": ">=", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "larger" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 26, + "end_line": 26, + "column": 2, + "end_column": 38 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 26, + "end_line": 26, + "column": 2, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 26, + "end_line": 26, + "column": 9, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 26, + "end_line": 26, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 26, + "end_line": 26, + "column": 29, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 2, + "end_column": 112 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 2, + "end_column": 112 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 9, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 21, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 29, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 29, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "bzero", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 38, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "4", + "teal_alias": null + } + ] + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 48, + "end_column": 62 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 54, + "end_column": 61 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + } + } + ] + } + } + }, + "error_message": "Leading zeros should be ignored in equality" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/biguint-expressions.algo.ts::testOps", + "name": "testOps" + }, + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 30, + "end_line": 30, + "column": 0, + "end_column": 41 + }, + "id": "tests/approvals/biguint-expressions.algo.ts::DemoContract", + "name": "DemoContract", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 31, + "end_line": 31, + "column": 2, + "end_column": 26 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 31, + "end_line": 35, + "column": 27, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 32, + "end_line": 32, + "column": 4, + "end_column": 38 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 32, + "end_line": 32, + "column": 4, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/biguint-expressions.algo.ts::testConstructor" + }, + "args": [ + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 32, + "end_line": 32, + "column": 20, + "end_column": 21 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + } + }, + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "BoolConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 32, + "end_line": 32, + "column": 23, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": false + } + }, + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 32, + "end_line": 32, + "column": 30, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "itob", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 32, + "end_line": 32, + "column": 35, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "4", + "teal_alias": null + } + ] + } + } + ] + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 33, + "end_line": 33, + "column": 4, + "end_column": 24 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 33, + "end_line": 33, + "column": 4, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/biguint-expressions.algo.ts::testOps" + }, + "args": [ + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 33, + "end_line": 33, + "column": 12, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "500", + "teal_alias": null + } + }, + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 33, + "end_line": 33, + "column": 18, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "1000", + "teal_alias": null + } + } + ] + } + }, + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 15 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 34, + "end_line": 34, + "column": 11, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/biguint-expressions.algo.ts::DemoContract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 30, + "end_line": 30, + "column": 0, + "end_column": 41 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 30, + "end_line": 30, + "column": 0, + "end_column": 41 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 30, + "end_line": 30, + "column": 0, + "end_column": 41 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 30, + "end_line": 30, + "column": 0, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/biguint-expressions.algo.ts::DemoContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/boolean-conversions/boolean-conversions.awst b/tests/approvals/out/boolean-conversions/boolean-conversions.awst index ec33a1bd..2a930b1e 100644 --- a/tests/approvals/out/boolean-conversions/boolean-conversions.awst +++ b/tests/approvals/out/boolean-conversions/boolean-conversions.awst @@ -1,18 +1,18 @@ subroutine test_truthyness(a: uint64, b: uint64, c: string, d: bytes, e: uint64): void { - assert(True) - assert(True) - assert(!Boolean(0)) - assert(Boolean(1)) - assert(!Boolean(bitlen(0))) - assert(Boolean(bitlen(1))) - assert(!Boolean(len(0x))) - assert(Boolean(len("abc"))) + assert(True, comment=Zero is falsy) + assert(True, comment=Non zero is truthy) + assert(!Boolean(0), comment=Zero is falsy) + assert(Boolean(1), comment=Non zero is truthy) + assert(!Boolean(bitlen(0)), comment=Zero is falsy) + assert(Boolean(bitlen(1)), comment=Non zero is truthy) + assert(!Boolean(len(0x)), comment=Empty is falsy) + assert(Boolean(len("abc")), comment=Non empty is truthy) empty: string = "" - assert(!Boolean(len(empty))) - assert(Boolean(len("abc"))) - assert(!False) - assert(True) + assert(!Boolean(len(empty)), comment=Empty is falsy) + assert(Boolean(len("abc")), comment=Non empty is truthy) + assert(!False, comment=False is falsy) + assert(True, comment=True is truthy) } subroutine test_booleans_are_equal(): void { diff --git a/tests/approvals/out/boolean-conversions/boolean-conversions.awst.json b/tests/approvals/out/boolean-conversions/boolean-conversions.awst.json index 49589682..32b1b2d3 100644 --- a/tests/approvals/out/boolean-conversions/boolean-conversions.awst.json +++ b/tests/approvals/out/boolean-conversions/boolean-conversions.awst.json @@ -127,7 +127,7 @@ "end_column": 29 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 5, @@ -142,29 +142,25 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BoolConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 5, - "end_line": 5, - "column": 9, - "end_column": 11 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": true - } - ], - "comment": "Zero is falsy" + "condition": { + "_type": "BoolConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 5, + "end_line": 5, + "column": 9, + "end_column": 11 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + }, + "error_message": "Zero is falsy" } }, { @@ -177,7 +173,7 @@ "end_column": 33 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 6, @@ -192,29 +188,25 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BoolConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 6, - "end_line": 6, - "column": 2, - "end_column": 33 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": true - } - ], - "comment": "Non zero is truthy" + "condition": { + "_type": "BoolConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 6, + "end_line": 6, + "column": 2, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + }, + "error_message": "Non zero is truthy" } }, { @@ -227,7 +219,7 @@ "end_column": 37 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 7, @@ -242,11 +234,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 7, + "end_line": 7, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 7, @@ -262,44 +267,27 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 7, "end_line": 7, - "column": 9, - "end_column": 19 + "column": 17, + "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 7, - "end_line": 7, - "column": 17, - "end_column": 18 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } + "value": "0", + "teal_alias": null } } - ], - "comment": "Zero is falsy" + }, + "error_message": "Zero is falsy" } }, { @@ -312,7 +300,7 @@ "end_column": 41 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 8, @@ -327,47 +315,43 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 8, + "end_line": 8, + "column": 2, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 8, "end_line": 8, - "column": 2, - "end_column": 41 + "column": 16, + "end_column": 17 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 8, - "end_line": 8, - "column": 16, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "1", - "teal_alias": null - } + "value": "1", + "teal_alias": null } - ], - "comment": "Non zero is truthy" + }, + "error_message": "Non zero is truthy" } }, { @@ -380,7 +364,7 @@ "end_column": 38 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 9, @@ -395,11 +379,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 9, + "end_line": 9, + "column": 9, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 9, @@ -415,7 +412,7 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 9, @@ -425,56 +422,38 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 9, - "end_line": 9, - "column": 9, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "bitlen", - "immediates": [], - "stack_args": [ - { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 9, - "end_line": 9, - "column": 10, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "0", - "teal_alias": null - } - ], - "comment": null - } + "op_code": "bitlen", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "0", + "teal_alias": null + } + ] } } - ], - "comment": "Zero is falsy" + }, + "error_message": "Zero is falsy" } }, { @@ -487,7 +466,7 @@ "end_column": 42 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 10, @@ -502,11 +481,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 10, + "end_line": 10, + "column": 2, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 10, @@ -516,55 +508,37 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 10, - "end_line": 10, - "column": 2, - "end_column": 42 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "bitlen", - "immediates": [], - "stack_args": [ - { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 10, - "end_line": 10, - "column": 9, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "1", - "teal_alias": null - } - ], - "comment": null - } + "op_code": "bitlen", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 10, + "end_line": 10, + "column": 17, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "1", + "teal_alias": null + } + ] } - ], - "comment": "Non zero is truthy" + }, + "error_message": "Non zero is truthy" } }, { @@ -577,7 +551,7 @@ "end_column": 36 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 11, @@ -592,11 +566,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 11, + "end_line": 11, + "column": 9, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 11, @@ -612,7 +599,7 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 11, @@ -622,56 +609,38 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 11, - "end_line": 11, - "column": 9, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 11, - "end_line": 11, - "column": 10, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "unknown" - } - ], - "comment": null - } + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 11, + "end_line": 11, + "column": 10, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "", + "encoding": "unknown" + } + ] } } - ], - "comment": "Empty is falsy" + }, + "error_message": "Empty is falsy" } }, { @@ -684,7 +653,7 @@ "end_column": 45 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 12, @@ -699,11 +668,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 12, @@ -713,55 +695,37 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 12, - "end_line": 12, - "column": 2, - "end_column": 45 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 12, - "end_line": 12, - "column": 15, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "VPaz", - "encoding": "utf8" - } - ], - "comment": null - } + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 12, + "end_line": 12, + "column": 15, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "VPaz", + "encoding": "utf8" + } + ] } - ], - "comment": "Non empty is truthy" + }, + "error_message": "Non empty is truthy" } }, { @@ -820,7 +784,7 @@ "end_column": 34 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 14, @@ -835,11 +799,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 14, + "end_line": 14, + "column": 9, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 14, @@ -855,7 +832,7 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 14, @@ -865,55 +842,37 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 14, - "end_line": 14, - "column": 9, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 14, - "end_line": 14, - "column": 10, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "empty" - } - ], - "comment": null - } + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 14, + "end_line": 14, + "column": 10, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "empty" + } + ] } } - ], - "comment": "Empty is falsy" + }, + "error_message": "Empty is falsy" } }, { @@ -926,7 +885,7 @@ "end_column": 38 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 15, @@ -941,11 +900,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 15, + "end_line": 15, + "column": 2, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 15, @@ -955,54 +927,36 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 15, - "end_line": 15, - "column": 2, - "end_column": 38 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "StringConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 15, - "end_line": 15, - "column": 9, - "end_column": 14 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "abc" - } - ], - "comment": null - } + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 15, + "end_line": 15, + "column": 9, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "abc" + } + ] } - ], - "comment": "Non empty is truthy" + }, + "error_message": "Non empty is truthy" } }, { @@ -1015,7 +969,7 @@ "end_column": 34 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 16, @@ -1030,16 +984,29 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 16, + "end_line": 16, + "column": 9, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "BoolConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 16, "end_line": 16, - "column": 9, + "column": 10, "end_column": 15 }, "wtype": { @@ -1049,27 +1016,10 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "BoolConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 16, - "end_line": 16, - "column": 10, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": false - } + "value": false } - ], - "comment": "False is falsy" + }, + "error_message": "False is falsy" } }, { @@ -1082,7 +1032,7 @@ "end_column": 32 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 17, @@ -1097,29 +1047,25 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BoolConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 17, - "end_line": 17, - "column": 9, - "end_column": 13 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": true - } - ], - "comment": "True is truthy" + "condition": { + "_type": "BoolConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 17, + "end_line": 17, + "column": 9, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + }, + "error_message": "True is truthy" } } ], @@ -1172,7 +1118,7 @@ "end_column": 35 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 22, @@ -1187,17 +1133,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 22, + "end_line": 22, + "column": 9, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 22, "end_line": 22, "column": 9, - "end_column": 34 + "end_column": 19 }, "wtype": { "_type": "WType", @@ -1206,7 +1165,7 @@ "ephemeral": false, "scalar_type": 2 }, - "lhs": { + "expr": { "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", @@ -1223,7 +1182,7 @@ "scalar_type": 2 }, "expr": { - "_type": "Not", + "_type": "BoolConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 22, @@ -1238,28 +1197,28 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "BoolConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 22, - "end_line": 22, - "column": 9, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": true - } + "value": true } + } + }, + "operator": "==", + "rhs": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 22, + "end_line": 22, + "column": 24, + "end_column": 34 }, - "operator": "==", - "rhs": { + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", @@ -1276,7 +1235,7 @@ "scalar_type": 2 }, "expr": { - "_type": "Not", + "_type": "BoolConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 22, @@ -1290,30 +1249,13 @@ "immutable": true, "ephemeral": false, "scalar_type": 2 - }, - "expr": { - "_type": "BoolConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 22, - "end_line": 22, - "column": 24, - "end_column": 34 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": true - } + }, + "value": true } } } - ], - "comment": null + }, + "error_message": null } }, { @@ -1326,7 +1268,7 @@ "end_column": 51 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 23, @@ -1341,17 +1283,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 23, + "end_line": 23, + "column": 9, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 23, "end_line": 23, "column": 9, - "end_column": 50 + "end_column": 27 }, "wtype": { "_type": "WType", @@ -1360,7 +1315,7 @@ "ephemeral": false, "scalar_type": 2 }, - "lhs": { + "expr": { "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", @@ -1377,7 +1332,7 @@ "scalar_type": 2 }, "expr": { - "_type": "Not", + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 23, @@ -1393,45 +1348,45 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 23, "end_line": 23, - "column": 9, - "end_column": 27 + "column": 24, + "end_column": 25 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 23, - "end_line": 23, - "column": 24, - "end_column": 25 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "1", - "teal_alias": null - } + "value": "1", + "teal_alias": null } } + } + }, + "operator": "==", + "rhs": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 23, + "end_line": 23, + "column": 32, + "end_column": 50 }, - "operator": "==", - "rhs": { + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", @@ -1448,7 +1403,7 @@ "scalar_type": 2 }, "expr": { - "_type": "Not", + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 23, @@ -1464,46 +1419,29 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 23, "end_line": 23, - "column": 32, - "end_column": 50 + "column": 47, + "end_column": 48 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 23, - "end_line": 23, - "column": 47, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "5", - "teal_alias": null - } + "value": "5", + "teal_alias": null } } } } - ], - "comment": null + }, + "error_message": null } }, { @@ -1516,7 +1454,7 @@ "end_column": 53 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, @@ -1531,17 +1469,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 24, + "end_line": 24, + "column": 9, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, "end_line": 24, "column": 9, - "end_column": 52 + "end_column": 28 }, "wtype": { "_type": "WType", @@ -1550,7 +1501,7 @@ "ephemeral": false, "scalar_type": 2 }, - "lhs": { + "expr": { "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", @@ -1567,7 +1518,7 @@ "scalar_type": 2 }, "expr": { - "_type": "Not", + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, @@ -1583,7 +1534,7 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, @@ -1593,57 +1544,56 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 24, - "end_line": 24, - "column": 9, - "end_column": 28 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "bitlen", - "immediates": [], - "stack_args": [ - { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 24, - "end_line": 24, - "column": 17, - "end_column": 27 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "1", - "teal_alias": null - } - ], - "comment": null - } + "op_code": "bitlen", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 24, + "end_line": 24, + "column": 25, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "1", + "teal_alias": null + } + ] } } + } + }, + "operator": "==", + "rhs": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 24, + "end_line": 24, + "column": 33, + "end_column": 52 }, - "operator": "==", - "rhs": { + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", @@ -1660,7 +1610,7 @@ "scalar_type": 2 }, "expr": { - "_type": "Not", + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, @@ -1676,7 +1626,7 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, @@ -1686,58 +1636,40 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 24, - "end_line": 24, - "column": 33, - "end_column": 52 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "bitlen", - "immediates": [], - "stack_args": [ - { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 24, - "end_line": 24, - "column": 41, - "end_column": 51 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "5", - "teal_alias": null - } - ], - "comment": null - } + "op_code": "bitlen", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 24, + "end_line": 24, + "column": 49, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "5", + "teal_alias": null + } + ] } } } } - ], - "comment": null + }, + "error_message": null } }, { @@ -1750,7 +1682,7 @@ "end_column": 60 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 25, @@ -1765,17 +1697,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 25, + "end_line": 25, + "column": 9, + "end_column": 59 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 25, "end_line": 25, "column": 9, - "end_column": 59 + "end_column": 30 }, "wtype": { "_type": "WType", @@ -1785,7 +1730,27 @@ "scalar_type": 2 }, "lhs": { - "_type": "BytesComparisonExpression", + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 25, + "end_line": 25, + "column": 23, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "VPaz", + "encoding": "utf8" + }, + "operator": "!=", + "rhs": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 25, @@ -1795,54 +1760,54 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 25, - "end_line": 25, - "column": 23, - "end_column": 28 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "VPaz", - "encoding": "utf8" + "value": "", + "encoding": "unknown" + } + }, + "operator": "==", + "rhs": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 25, + "end_line": 25, + "column": 35, + "end_column": 59 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 25, + "end_line": 25, + "column": 49, + "end_column": 57 }, - "operator": "!=", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 25, - "end_line": 25, - "column": 9, - "end_column": 30 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "unknown" - } + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "VPa!sWo7", + "encoding": "utf8" }, - "operator": "==", + "operator": "!=", "rhs": { - "_type": "BytesComparisonExpression", + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 25, @@ -1852,54 +1817,17 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 25, - "end_line": 25, - "column": 49, - "end_column": 57 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "VPa!sWo7", - "encoding": "utf8" + "scalar_type": 1 }, - "operator": "!=", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 25, - "end_line": 25, - "column": 35, - "end_column": 59 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "unknown" - } + "value": "", + "encoding": "unknown" } } - ], - "comment": null + }, + "error_message": null } }, { @@ -1912,7 +1840,7 @@ "end_column": 46 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 27, @@ -1927,17 +1855,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 27, + "end_line": 27, + "column": 9, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 27, "end_line": 27, "column": 9, - "end_column": 45 + "end_column": 23 }, "wtype": { "_type": "WType", @@ -1947,7 +1888,27 @@ "scalar_type": 2 }, "lhs": { - "_type": "BytesComparisonExpression", + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 27, + "end_line": 27, + "column": 17, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "VPaz", + "encoding": "utf8" + }, + "operator": "!=", + "rhs": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 27, @@ -1957,54 +1918,54 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 27, - "end_line": 27, - "column": 17, - "end_column": 22 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "VPaz", - "encoding": "utf8" + "value": "", + "encoding": "unknown" + } + }, + "operator": "==", + "rhs": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 27, + "end_line": 27, + "column": 28, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 27, + "end_line": 27, + "column": 36, + "end_column": 44 }, - "operator": "!=", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 27, - "end_line": 27, - "column": 9, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "unknown" - } + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "VPa!sWo7", + "encoding": "utf8" }, - "operator": "==", + "operator": "!=", "rhs": { - "_type": "BytesComparisonExpression", + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 27, @@ -2014,54 +1975,17 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 27, - "end_line": 27, - "column": 36, - "end_column": 44 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "VPa!sWo7", - "encoding": "utf8" + "scalar_type": 1 }, - "operator": "!=", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 27, - "end_line": 27, - "column": 28, - "end_column": 45 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "unknown" - } + "value": "", + "encoding": "unknown" } } - ], - "comment": null + }, + "error_message": null } }, { @@ -2120,7 +2044,7 @@ "end_column": 21 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 30, @@ -2135,16 +2059,29 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 30, + "end_line": 30, + "column": 9, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 30, "end_line": 30, - "column": 9, + "column": 10, "end_column": 20 }, "wtype": { @@ -2154,27 +2091,10 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 30, - "end_line": 30, - "column": 10, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "boolNoArgs" - } + "name": "boolNoArgs" } - ], - "comment": null + }, + "error_message": null } } ], diff --git a/tests/approvals/out/boolean-expressions/boolean-expressions.awst b/tests/approvals/out/boolean-expressions/boolean-expressions.awst index a13ee8b3..98c99c5d 100644 --- a/tests/approvals/out/boolean-expressions/boolean-expressions.awst +++ b/tests/approvals/out/boolean-expressions/boolean-expressions.awst @@ -1,7 +1,7 @@ subroutine test(a: uint64, b: uint64, c: string, d: bytes, e: uint64): bool { - x: uint64 = (Boolean((#12 = (Boolean(a) ? a : b))) ? #12 : e) - assert(Boolean((Boolean((#13 = (Boolean(a) ? b : a))) ? e : #13))) + x: uint64 = (Boolean((#0 = (Boolean(a) ? a : b))) ? #0 : e) + assert(Boolean((Boolean((#1 = (Boolean(a) ? b : a))) ? e : #1)), comment=a or b) y: uint64 = (Boolean(a) ? b : a) z: uint64 = (Boolean(a) and Boolean(len(d)) or Boolean(y) ? (Boolean(x) ? x : y) : (Boolean(x) ? y : x)) if (Boolean(a) or Boolean(len(c)) and Boolean(len(d))) { diff --git a/tests/approvals/out/boolean-expressions/boolean-expressions.awst.json b/tests/approvals/out/boolean-expressions/boolean-expressions.awst.json index 4d8248d6..e8163d00 100644 --- a/tests/approvals/out/boolean-expressions/boolean-expressions.awst.json +++ b/tests/approvals/out/boolean-expressions/boolean-expressions.awst.json @@ -280,7 +280,7 @@ "name": "b" } }, - "id": "12" + "id": "0" } }, "true_expr": { @@ -387,7 +387,7 @@ "name": "b" } }, - "id": "12" + "id": "0" }, "false_expr": { "_type": "VarExpression", @@ -419,7 +419,7 @@ "end_column": 31 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-expressions.algo.ts", "line": 6, @@ -434,183 +434,55 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 2, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ConditionalExpression", "source_location": { "file": "tests/approvals/boolean-expressions.algo.ts", "line": 6, "end_line": 6, - "column": 2, - "end_column": 31 + "column": 9, + "end_column": 20 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "ConditionalExpression", + "condition": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-expressions.algo.ts", "line": 6, "end_line": 6, "column": 9, - "end_column": 20 + "end_column": 15 }, "wtype": { "_type": "WType", - "name": "uint64", + "name": "bool", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "condition": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "SingleEvaluation", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "source": { - "_type": "ConditionalExpression", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "condition": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - }, - "true_expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 14, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "b" - }, - "false_expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - }, - "id": "13" - } - }, - "true_expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 19, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "e" - }, - "false_expr": { + "expr": { "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/boolean-expressions.algo.ts", @@ -714,12 +586,136 @@ "name": "a" } }, - "id": "13" + "id": "1" } + }, + "true_expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 19, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "e" + }, + "false_expr": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 9, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source": { + "_type": "ConditionalExpression", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 9, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + }, + "true_expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 14, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + }, + "false_expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + }, + "id": "1" } } - ], - "comment": "a or b" + }, + "error_message": "a or b" } }, { @@ -1002,8 +998,7 @@ }, "name": "d" } - ], - "comment": null + ] } } }, @@ -1352,8 +1347,7 @@ }, "name": "c" } - ], - "comment": null + ] } }, "op": "and", @@ -1410,8 +1404,7 @@ }, "name": "d" } - ], - "comment": null + ] } } } diff --git a/tests/approvals/out/box-proxies/box-proxies.awst.json b/tests/approvals/out/box-proxies/box-proxies.awst.json index 4b456160..e5d74460 100644 --- a/tests/approvals/out/box-proxies/box-proxies.awst.json +++ b/tests/approvals/out/box-proxies/box-proxies.awst.json @@ -78,7 +78,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 6, "end_line": 6, - "column": 2, + "column": 6, "end_column": 11 }, "wtype": { @@ -142,7 +142,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 7, "end_line": 7, - "column": 2, + "column": 7, "end_column": 12 }, "wtype": { @@ -202,7 +202,7 @@ "end_column": 34 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 9, @@ -217,102 +217,98 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 9, + "end_line": 9, + "column": 9, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 9, "end_line": 9, - "column": 9, - "end_column": 33 + "column": 13, + "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BoxValueExpression", + "key": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 9, "end_line": 9, "column": 9, - "end_column": 18 + "end_column": 12 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 9, - "end_line": 9, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" - }, - "exists_assertion_message": "Box must have value" + "name": "box" }, - "operator": "==", - "rhs": { - "_type": "BoxValueExpression", + "exists_assertion_message": "Box must have value" + }, + "operator": "==", + "rhs": { + "_type": "BoxValueExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 9, + "end_line": 9, + "column": 28, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", - "line": 9, - "end_line": 9, - "column": 23, - "end_column": 33 + "line": 4, + "end_line": 4, + "column": 38, + "end_column": 41 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 4, - "end_line": 4, - "column": 38, - "end_column": 41 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K>", - "encoding": "utf8" - }, - "exists_assertion_message": "Box must have value" - } + "value": "K>", + "encoding": "utf8" + }, + "exists_assertion_message": "Box must have value" } - ], - "comment": null + }, + "error_message": null } }, { @@ -325,7 +321,7 @@ "end_column": 35 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 11, @@ -340,17 +336,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BooleanBinaryOperation", + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 11, + "end_line": 11, + "column": 9, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "StateExists", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 11, "end_line": 11, - "column": 9, - "end_column": 34 + "column": 13, + "end_column": 19 }, "wtype": { "_type": "WType", @@ -359,117 +368,100 @@ "ephemeral": false, "scalar_type": 2 }, - "left": { - "_type": "StateExists", + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 11, "end_line": 11, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 11, "end_line": 11, "column": 9, - "end_column": 19 + "end_column": 12 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 11, - "end_line": 11, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" - }, - "exists_assertion_message": "Box must have value" - } + "name": "box" + }, + "exists_assertion_message": "Box must have value" + } + }, + "op": "and", + "right": { + "_type": "StateExists", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 11, + "end_line": 11, + "column": 28, + "end_column": 34 }, - "op": "and", - "right": { - "_type": "StateExists", + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 11, "end_line": 11, - "column": 23, + "column": 28, "end_column": 34 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", - "line": 11, - "end_line": 11, - "column": 23, - "end_column": 34 + "line": 4, + "end_line": 4, + "column": 38, + "end_column": 41 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 4, - "end_line": 4, - "column": 38, - "end_column": 41 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K>", - "encoding": "utf8" - }, - "exists_assertion_message": "Box must have value" - } + "value": "K>", + "encoding": "utf8" + }, + "exists_assertion_message": "Box must have value" } } - ], - "comment": null + }, + "error_message": null } }, { @@ -482,7 +474,7 @@ "end_column": 20 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 13, @@ -497,120 +489,115 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 13, + "end_line": 13, + "column": 2, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 13, "end_line": 13, - "column": 2, - "end_column": 20 + "column": 13, + "end_column": 19 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, "expr": { - "_type": "CheckedMaybe", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 13, "end_line": 13, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { - "_type": "WType", - "name": "uint64", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 13, - "end_line": 13, - "column": 9, - "end_column": 19 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "box_len", - "immediates": [], - "stack_args": [ + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, { - "_type": "BoxValueExpression", + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "box_len", + "immediates": [], + "stack_args": [ + { + "_type": "BoxValueExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 13, + "end_line": 13, + "column": 13, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 13, "end_line": 13, "column": 9, - "end_column": 19 + "end_column": 12 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 13, - "end_line": 13, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" - }, - "exists_assertion_message": "Box must have value" - } - ], - "comment": null - }, - "comment": "Box must exist" - } + "name": "box" + }, + "exists_assertion_message": "Box must have value" + } + ] + }, + "comment": "Box must exist" } - ], - "comment": null + }, + "error_message": null } }, { @@ -619,7 +606,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 15, "end_line": 15, - "column": 2, + "column": 6, "end_column": 12 }, "expr": { @@ -628,7 +615,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 15, "end_line": 15, - "column": 2, + "column": 6, "end_column": 12 }, "wtype": { @@ -644,7 +631,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 15, "end_line": 15, - "column": 2, + "column": 6, "end_column": 12 }, "wtype": { @@ -682,7 +669,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 16, "end_line": 16, - "column": 2, + "column": 7, "end_column": 13 }, "expr": { @@ -691,7 +678,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 16, "end_line": 16, - "column": 2, + "column": 7, "end_column": 13 }, "wtype": { @@ -707,7 +694,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 16, "end_line": 16, - "column": 2, + "column": 7, "end_column": 13 }, "wtype": { @@ -750,7 +737,7 @@ "end_column": 37 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, @@ -765,17 +752,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BooleanBinaryOperation", + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 17, + "end_line": 17, + "column": 9, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "Not", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, "column": 9, - "end_column": 36 + "end_column": 20 }, "wtype": { "_type": "WType", @@ -784,13 +784,13 @@ "ephemeral": false, "scalar_type": 2 }, - "left": { - "_type": "Not", + "expr": { + "_type": "StateExists", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, - "column": 9, + "column": 14, "end_column": 20 }, "wtype": { @@ -800,68 +800,68 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "StateExists", + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, - "column": 10, + "column": 14, "end_column": 20 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, "column": 10, - "end_column": 20 + "end_column": 13 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 17, - "end_line": 17, - "column": 10, - "end_column": 13 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" - }, - "exists_assertion_message": "Box must have value" - } + "name": "box" + }, + "exists_assertion_message": "Box must have value" } + } + }, + "op": "and", + "right": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 17, + "end_line": 17, + "column": 24, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 }, - "op": "and", - "right": { - "_type": "Not", + "expr": { + "_type": "StateExists", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, - "column": 24, + "column": 30, "end_column": 36 }, "wtype": { @@ -871,64 +871,47 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "StateExists", + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, - "column": 25, + "column": 30, "end_column": 36 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", - "line": 17, - "end_line": 17, - "column": 25, - "end_column": 36 + "line": 4, + "end_line": 4, + "column": 38, + "end_column": 41 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 4, - "end_line": 4, - "column": 38, - "end_column": 41 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K>", - "encoding": "utf8" - }, - "exists_assertion_message": "Box must have value" - } + "value": "K>", + "encoding": "utf8" + }, + "exists_assertion_message": "Box must have value" } } } - ], - "comment": null + }, + "error_message": null } }, { @@ -987,7 +970,7 @@ "end_column": 80 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 20, @@ -1002,33 +985,46 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 20, + "end_line": 20, + "column": 9, + "end_column": 79 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "StateGet", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 20, "end_line": 20, "column": 9, - "end_column": 79 + "end_column": 42 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "StateGet", + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 20, "end_line": 20, - "column": 9, - "end_column": 42 + "column": 14, + "end_column": 17 }, "wtype": { "_type": "WType", @@ -1037,71 +1033,35 @@ "ephemeral": false, "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", - "line": 20, - "end_line": 20, - "column": 9, - "end_column": 17 + "line": 4, + "end_line": 4, + "column": 38, + "end_column": 41 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 4, - "end_line": 4, - "column": 38, - "end_column": 41 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K>", - "encoding": "utf8" - }, - "exists_assertion_message": "Box must have value" + "value": "K>", + "encoding": "utf8" }, - "default": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 20, - "end_line": 20, - "column": 29, - "end_column": 39 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "defaultVal" - } + "exists_assertion_message": "Box must have value" }, - "operator": "==", - "rhs": { - "_type": "StateGet", + "default": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 20, "end_line": 20, - "column": 47, - "end_column": 79 + "column": 29, + "end_column": 39 }, "wtype": { "_type": "WType", @@ -1110,64 +1070,83 @@ "ephemeral": false, "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 20, - "end_line": 20, - "column": 47, - "end_column": 54 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "key": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 20, - "end_line": 20, - "column": 47, - "end_column": 50 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" - }, - "exists_assertion_message": "Box must have value" + "name": "defaultVal" + } + }, + "operator": "==", + "rhs": { + "_type": "StateGet", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 20, + "end_line": 20, + "column": 47, + "end_column": 79 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "field": { + "_type": "BoxValueExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 20, + "end_line": 20, + "column": 51, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "default": { + "key": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 20, "end_line": 20, - "column": 66, - "end_column": 76 + "column": 47, + "end_column": 50 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "name": "defaultVal" - } + "name": "box" + }, + "exists_assertion_message": "Box must have value" + }, + "default": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 20, + "end_line": 20, + "column": 66, + "end_column": 76 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "defaultVal" } } - ], - "comment": null + }, + "error_message": null } }, { @@ -1288,7 +1267,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 22, "end_line": 22, - "column": 14, + "column": 18, "end_column": 23 }, "wtype": { @@ -1330,7 +1309,7 @@ "end_column": 12 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 23, @@ -1345,16 +1324,29 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 23, + "end_line": 23, + "column": 9, + "end_column": 11 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 23, "end_line": 23, - "column": 9, + "column": 10, "end_column": 11 }, "wtype": { @@ -1364,27 +1356,10 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 23, - "end_line": 23, - "column": 10, - "end_column": 11 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "e" - } + "name": "e" } - ], - "comment": null + }, + "error_message": null } }, { @@ -1402,7 +1377,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 24, "end_line": 24, - "column": 2, + "column": 6, "end_column": 11 }, "wtype": { @@ -1569,7 +1544,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 25, "end_line": 25, - "column": 11, + "column": 15, "end_column": 20 }, "wtype": { @@ -1611,7 +1586,7 @@ "end_column": 11 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 26, @@ -1626,29 +1601,25 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 26, - "end_line": 26, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "e" - } - ], - "comment": null + "condition": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 26, + "end_line": 26, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "e" + }, + "error_message": null } } ], @@ -1761,7 +1732,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 32, "end_line": 32, - "column": 2, + "column": 6, "end_column": 9 }, "wtype": { @@ -1777,7 +1748,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 32, "end_line": 32, - "column": 2, + "column": 6, "end_column": 9 }, "wtype": { @@ -1814,7 +1785,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 32, "end_line": 32, - "column": 2, + "column": 6, "end_column": 9 }, "wtype": { @@ -1843,8 +1814,7 @@ "name": "key" } } - ], - "comment": null + ] }, "exists_assertion_message": "Box must have value" }, @@ -1882,7 +1852,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 33, "end_line": 33, - "column": 2, + "column": 9, "end_column": 12 }, "wtype": { @@ -1898,7 +1868,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 33, "end_line": 33, - "column": 2, + "column": 9, "end_column": 12 }, "wtype": { @@ -1936,7 +1906,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 33, "end_line": 33, - "column": 2, + "column": 9, "end_column": 12 }, "wtype": { @@ -1965,8 +1935,7 @@ "name": "key" } } - ], - "comment": null + ] }, "exists_assertion_message": "Box must have value" }, @@ -1999,7 +1968,7 @@ "end_column": 25 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 35, @@ -2014,27 +1983,40 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 35, + "end_line": 35, + "column": 2, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 35, "end_line": 35, - "column": 2, - "end_column": 25 + "column": 9, + "end_column": 24 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, "expr": { - "_type": "CheckedMaybe", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 35, @@ -2043,148 +2025,129 @@ "end_column": 24 }, "wtype": { - "_type": "WType", - "name": "uint64", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 35, - "end_line": 35, - "column": 9, - "end_column": 24 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "box_len", - "immediates": [], - "stack_args": [ + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, { - "_type": "BoxValueExpression", + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "box_len", + "immediates": [], + "stack_args": [ + { + "_type": "BoxValueExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 35, + "end_line": 35, + "column": 13, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 35, "end_line": 35, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 35, - "end_line": 35, - "column": 9, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 35, + "end_line": 35, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "box_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "box" }, - "op_code": "concat", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 35, - "end_line": 35, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 35, + "end_line": 35, + "column": 13, + "end_column": 19 }, - { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 35, "end_line": 35, - "column": 9, - "end_column": 19 + "column": 20, + "end_column": 23 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 35, - "end_line": 35, - "column": 20, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "key" - } + "name": "key" } - ], - "comment": null - }, - "exists_assertion_message": "Box must have value" - } - ], - "comment": null - }, - "comment": "Box must exist" - } + } + ] + }, + "exists_assertion_message": "Box must have value" + } + ] + }, + "comment": "Box must exist" } - ], - "comment": null + }, + "error_message": null } }, { @@ -2197,7 +2160,7 @@ "end_column": 27 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 37, @@ -2212,155 +2175,150 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "TupleItemExpression", + "condition": { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 37, + "end_line": 37, + "column": 9, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "StateGetEx", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 37, "end_line": 37, "column": 9, - "end_column": 26 + "end_column": 23 }, "wtype": { - "_type": "WType", - "name": "bool", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] }, - "base": { - "_type": "StateGetEx", + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 37, "end_line": 37, - "column": 9, - "end_column": 23 + "column": 13, + "end_column": 18 }, "wtype": { - "_type": "WTuple", - "name": "tuple", + "_type": "WType", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] + "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 37, "end_line": 37, - "column": 9, + "column": 13, "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 37, - "end_line": 37, - "column": 9, - "end_column": 18 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 37, + "end_line": 37, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "box_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "box" }, - "op_code": "concat", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 37, - "end_line": 37, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 37, + "end_line": 37, + "column": 13, + "end_column": 18 }, - { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 37, "end_line": 37, - "column": 9, - "end_column": 18 + "column": 19, + "end_column": 22 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 37, - "end_line": 37, - "column": 19, - "end_column": 22 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "key" - } + "name": "key" } - ], - "comment": null - }, - "exists_assertion_message": "Box must have value" - } - }, - "index": "1" - } - ], - "comment": null + } + ] + }, + "exists_assertion_message": "Box must have value" + } + }, + "index": "1" + }, + "error_message": null } }, { @@ -2373,7 +2331,7 @@ "end_column": 42 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 39, @@ -2388,216 +2346,210 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 39, + "end_line": 39, + "column": 9, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, - "column": 9, - "end_column": 41 + "column": 13, + "end_column": 16 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BoxValueExpression", + "key": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, - "column": 9, + "column": 13, "end_column": 16 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 39, - "end_line": 39, - "column": 9, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 39, + "end_line": 39, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "box_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "box" }, - "op_code": "concat", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 39, - "end_line": 39, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 39, + "end_line": 39, + "column": 13, + "end_column": 16 }, - { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, - "column": 9, - "end_column": 16 + "column": 17, + "end_column": 20 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 39, - "end_line": 39, - "column": 17, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "key" - } + "name": "key" } - ], - "comment": null - }, - "exists_assertion_message": "Box must have value" + } + ] }, - "operator": "==", - "rhs": { - "_type": "BoxValueExpression", + "exists_assertion_message": "Box must have value" + }, + "operator": "==", + "rhs": { + "_type": "BoxValueExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 39, + "end_line": 39, + "column": 33, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, - "column": 26, + "column": 33, "end_column": 36 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 39, - "end_line": 39, - "column": 26, - "end_column": 36 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 29, + "end_line": 29, + "column": 50, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "box_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "", + "encoding": "utf8" }, - "op_code": "concat", - "immediates": [], - "stack_args": [ - { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 29, - "end_line": 29, - "column": 50, - "end_column": 52 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "utf8" + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 39, + "end_line": 39, + "column": 33, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, - "column": 26, - "end_column": 36 + "column": 37, + "end_column": 40 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 39, - "end_line": 39, - "column": 37, - "end_column": 40 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "key" - } + "name": "key" } - ], - "comment": null - }, - "exists_assertion_message": "Box must have value" - } + } + ] + }, + "exists_assertion_message": "Box must have value" } - ], - "comment": null + }, + "error_message": null } }, { @@ -2631,7 +2583,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 41, "end_line": 41, - "column": 2, + "column": 6, "end_column": 12 }, "wtype": { @@ -2647,7 +2599,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 41, "end_line": 41, - "column": 2, + "column": 6, "end_column": 12 }, "wtype": { @@ -2684,7 +2636,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 41, "end_line": 41, - "column": 2, + "column": 6, "end_column": 12 }, "wtype": { @@ -2713,8 +2665,7 @@ "name": "key" } } - ], - "comment": null + ] }, "exists_assertion_message": "Box must have value" } @@ -2730,7 +2681,7 @@ "end_column": 104 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, @@ -2745,33 +2696,46 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 9, + "end_column": 103 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "StateGet", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, "column": 9, - "end_column": 103 + "end_column": 52 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "StateGet", + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 9, - "end_column": 52 + "column": 13, + "end_column": 16 }, "wtype": { "_type": "WType", @@ -2780,76 +2744,76 @@ "ephemeral": false, "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 9, + "column": 13, "end_column": 16 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 9, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "box_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "box" }, - "op_code": "concat", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 13, + "end_column": 16 }, - { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "BytesBinaryOperation", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 9, - "end_column": 16 + "column": 17, + "end_column": 26 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { + "left": { "_type": "BytesBinaryOperation", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", @@ -2866,7 +2830,7 @@ "scalar_type": 1 }, "left": { - "_type": "BytesBinaryOperation", + "_type": "StringConstant", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, @@ -2881,53 +2845,17 @@ "ephemeral": false, "scalar_type": 1 }, - "left": { - "_type": "StringConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 17, - "end_column": 26 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "" - }, - "op": "+", - "right": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 20, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "key" - } + "value": "" }, "op": "+", "right": { - "_type": "StringConstant", + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 17, - "end_column": 26 + "column": 20, + "end_column": 23 }, "wtype": { "_type": "WType", @@ -2936,44 +2864,42 @@ "ephemeral": false, "scalar_type": 1 }, - "value": "x" + "name": "key" } + }, + "op": "+", + "right": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 17, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "x" } } - ], - "comment": null - }, - "exists_assertion_message": "Box must have value" + } + ] }, - "default": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 45, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "Vg", - "encoding": "utf8" - } + "exists_assertion_message": "Box must have value" }, - "operator": "==", - "rhs": { - "_type": "StateGet", + "default": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 57, - "end_column": 103 + "column": 45, + "end_column": 48 }, "wtype": { "_type": "WType", @@ -2982,77 +2908,114 @@ "ephemeral": false, "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "value": "Vg", + "encoding": "utf8" + } + }, + "operator": "==", + "rhs": { + "_type": "StateGet", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 57, + "end_column": 103 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "field": { + "_type": "BoxValueExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 64, + "end_column": 67 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, - "end_line": 43, - "column": 57, - "end_column": 67 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "key": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 57, - "end_column": 67 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "end_line": 43, + "column": 64, + "end_column": 67 + }, + "wtype": { + "_type": "WType", + "name": "box_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 29, + "end_line": 29, + "column": 50, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "box_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "", + "encoding": "utf8" }, - "op_code": "concat", - "immediates": [], - "stack_args": [ - { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 29, - "end_line": 29, - "column": 50, - "end_column": 52 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "utf8" + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 64, + "end_column": 67 }, - { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "BytesBinaryOperation", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 57, - "end_column": 67 + "column": 68, + "end_column": 77 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { + "left": { "_type": "BytesBinaryOperation", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", @@ -3069,7 +3032,7 @@ "scalar_type": 1 }, "left": { - "_type": "BytesBinaryOperation", + "_type": "StringConstant", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, @@ -3084,53 +3047,17 @@ "ephemeral": false, "scalar_type": 1 }, - "left": { - "_type": "StringConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 68, - "end_column": 77 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "" - }, - "op": "+", - "right": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 71, - "end_column": 74 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "key" - } + "value": "" }, "op": "+", "right": { - "_type": "StringConstant", + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 68, - "end_column": 77 + "column": 71, + "end_column": 74 }, "wtype": { "_type": "WType", @@ -3139,38 +3066,56 @@ "ephemeral": false, "scalar_type": 1 }, - "value": "x" + "name": "key" } + }, + "op": "+", + "right": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 68, + "end_column": 77 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "x" } } - ], - "comment": null - }, - "exists_assertion_message": "Box must have value" + } + ] }, - "default": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 96, - "end_column": 99 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "Vg", - "encoding": "utf8" - } + "exists_assertion_message": "Box must have value" + }, + "default": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 96, + "end_column": 99 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Vg", + "encoding": "utf8" } } - ], - "comment": null + }, + "error_message": null } } ], @@ -3281,7 +3226,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 49, "end_line": 49, - "column": 7, + "column": 14, "end_column": 20 }, "wtype": { @@ -3297,7 +3242,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 49, "end_line": 49, - "column": 7, + "column": 14, "end_column": 20 }, "wtype": { @@ -3332,7 +3277,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 49, "end_line": 49, - "column": 7, + "column": 14, "end_column": 20 }, "wtype": { @@ -3363,8 +3308,7 @@ }, "exists_assertion_message": "Box must have value" } - ], - "comment": null + ] }, "index": "1" } @@ -3423,7 +3367,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 50, "end_line": 50, - "column": 4, + "column": 11, "end_column": 17 }, "wtype": { @@ -3473,8 +3417,7 @@ "value": "1000", "teal_alias": null } - ], - "comment": null + ] } } ], @@ -3526,7 +3469,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 51, "end_line": 51, - "column": 13, + "column": 20, "end_column": 26 }, "wtype": { @@ -3542,7 +3485,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 51, "end_line": 51, - "column": 13, + "column": 20, "end_column": 26 }, "wtype": { @@ -3577,7 +3520,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 51, "end_line": 51, - "column": 13, + "column": 20, "end_column": 26 }, "wtype": { @@ -3608,8 +3551,7 @@ }, "exists_assertion_message": "Box must have value" } - ], - "comment": null + ] }, "comment": "Box must exist" }, @@ -3687,7 +3629,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 52, "end_line": 52, - "column": 4, + "column": 11, "end_column": 17 }, "wtype": { @@ -3736,8 +3678,7 @@ }, "name": "length" } - ], - "comment": null + ] } } ], @@ -3836,7 +3777,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 55, "end_line": 55, - "column": 2, + "column": 6, "end_column": 9 }, "wtype": { @@ -3884,8 +3825,7 @@ }, "name": "someBytes" } - ], - "comment": null + ] } }, { @@ -3922,7 +3862,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 56, "end_line": 56, - "column": 2, + "column": 9, "end_column": 12 }, "wtype": { @@ -3971,8 +3911,7 @@ }, "name": "someBytes" } - ], - "comment": null + ] } }, { @@ -4009,7 +3948,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 57, "end_line": 57, - "column": 2, + "column": 6, "end_column": 12 }, "wtype": { @@ -4096,8 +4035,7 @@ "value": "00", "encoding": "base16" } - ], - "comment": null + ] } }, { @@ -4134,7 +4072,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 58, "end_line": 58, - "column": 2, + "column": 9, "end_column": 15 }, "wtype": { @@ -4222,8 +4160,7 @@ "value": "00", "encoding": "base16" } - ], - "comment": null + ] } }, { @@ -4236,7 +4173,7 @@ "end_column": 49 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 59, @@ -4251,84 +4188,80 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 59, + "end_line": 59, + "column": 9, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 59, "end_line": 59, - "column": 9, - "end_column": 48 + "column": 13, + "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BoxValueExpression", + "key": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 59, "end_line": 59, "column": 9, - "end_column": 18 + "end_column": 12 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 59, - "end_line": 59, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" - }, - "exists_assertion_message": "Box must have value" + "name": "box" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 59, - "end_line": 59, - "column": 23, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "{{a90", - "encoding": "base16" - } + "exists_assertion_message": "Box must have value" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 59, + "end_line": 59, + "column": 23, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "{{a90", + "encoding": "base16" } - ], - "comment": null + }, + "error_message": null } } ], diff --git a/tests/approvals/out/byte-expressions/DemoContract.approval.teal b/tests/approvals/out/byte-expressions/DemoContract.approval.teal new file mode 100644 index 00000000..108392ce --- /dev/null +++ b/tests/approvals/out/byte-expressions/DemoContract.approval.teal @@ -0,0 +1,85 @@ +#pragma version 10 + +tests/approvals/byte-expressions.algo.ts::DemoContract.approvalProgram: + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/byte-expressions.algo.ts:17 + // test(1, 50n, 'things') + pushint 1 // 1 + pushbytes 0x32 + pushbytes "things" + callsub test + // tests/approvals/byte-expressions.algo.ts:18 + // return true + pushint 1 // 1 + return + + +// tests/approvals/byte-expressions.algo.ts::DemoContract.constructor() -> void: +constructor: + // tests/approvals/byte-expressions.algo.ts:15 + // class DemoContract extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/byte-expressions.algo.ts::test(a: uint64, b: bytes, c: bytes) -> void: +test: + // tests/approvals/byte-expressions.algo.ts:4 + // function test(a: uint64, b: biguint, c: string) { + proto 3 0 + // tests/approvals/byte-expressions.algo.ts:5 + // assert(Bytes().length === 0, 'Empty bytes has length of 0') + pushbytes 0x + len + pushint 0 // 0 + == + assert // Empty bytes has length of 0 + // tests/approvals/byte-expressions.algo.ts:6 + // assert(Bytes(a) === op.itob(a), 'Bytes(uint64) is equivalent to itob') + frame_dig -3 + itob + frame_dig -3 + itob + == + assert // Bytes(uint64) is equivalent to itob + // tests/approvals/byte-expressions.algo.ts:7 + // assert(Bytes(Uint64(1)) === Bytes.fromHex('0000000000000001'), 'Bytes(uint64) returns an 8 byte encoding') + pushbytes 0x0000000000000001 + dup + == + assert // Bytes(uint64) returns an 8 byte encoding + // tests/approvals/byte-expressions.algo.ts:8 + // assert(Bytes(BigUint(256)) === Bytes.fromHex('0100')) + pushbytes 0x0100 + dup + == + assert + // tests/approvals/byte-expressions.algo.ts:9 + // assert(BigUint(Bytes(b)) === b, 'Round trip of biguint to bytes and back results in the same value') + frame_dig -2 + dup + b== + assert // Round trip of biguint to bytes and back results in the same value + // tests/approvals/byte-expressions.algo.ts:10 + // assert(String(Bytes(c)) === c) + frame_dig -1 + dup + == + assert + // tests/approvals/byte-expressions.algo.ts:11 + // assert(Bytes(Bytes('123')) === Bytes('123')) + pushbytes "123" + dup + == + assert + // tests/approvals/byte-expressions.algo.ts:12 + // assert(Bytes([1, 2, 3, 4]) === Bytes.fromHex('01020304')) + pushbytes 0x01020304 + dup + == + assert + retsub diff --git a/tests/approvals/out/byte-expressions/DemoContract.clear.teal b/tests/approvals/out/byte-expressions/DemoContract.clear.teal new file mode 100644 index 00000000..33119445 --- /dev/null +++ b/tests/approvals/out/byte-expressions/DemoContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/byte-expressions.algo.ts::DemoContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/byte-expressions/DemoContract.ssa.ir b/tests/approvals/out/byte-expressions/DemoContract.ssa.ir new file mode 100644 index 00000000..c2c188ee --- /dev/null +++ b/tests/approvals/out/byte-expressions/DemoContract.ssa.ir @@ -0,0 +1,47 @@ +contract tests/approvals/byte-expressions.algo.ts::DemoContract: + program approval: + subroutine tests/approvals/byte-expressions.algo.ts::DemoContract.approvalProgram() -> bool: + block@0: // L16 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/byte-expressions.algo.ts::DemoContract.constructor() + goto block@2 + block@2: // after_if_else_L1 + tests/approvals/byte-expressions.algo.ts::test(1u, 50b, "things") + return 1u + + subroutine tests/approvals/byte-expressions.algo.ts::DemoContract.constructor() -> void: + block@0: // L15 + return + + subroutine tests/approvals/byte-expressions.algo.ts::test(a: uint64, b: biguint, c: bytes) -> void: + block@0: // L4 + let tmp%0#0: uint64 = (len 0x) + let tmp%1#0: bool = (== tmp%0#0 0u) + (assert tmp%1#0) // Empty bytes has length of 0 + let tmp%2#0: bytes = (itob a#0) + let tmp%3#0: bytes = (itob a#0) + let tmp%4#0: bool = (== tmp%2#0 tmp%3#0) + (assert tmp%4#0) // Bytes(uint64) is equivalent to itob + let tmp%5#0: bool = (== 0x0000000000000001 0x0000000000000001) + (assert tmp%5#0) // Bytes(uint64) returns an 8 byte encoding + let reinterpret_bytes%0#0: bytes = 256b + let tmp%6#0: bool = (== reinterpret_bytes%0#0 0x0100) + (assert tmp%6#0) + let reinterpret_bytes%1#0: bytes = b#0 + let reinterpret_biguint%0#0: biguint = reinterpret_bytes%1#0 + let tmp%7#0: bool = (b== reinterpret_biguint%0#0 b#0) + (assert tmp%7#0) // Round trip of biguint to bytes and back results in the same value + let tmp%8#0: bool = (== c#0 c#0) + (assert tmp%8#0) + let tmp%9#0: bool = (== "123" "123") + (assert tmp%9#0) + let tmp%10#0: bool = (== 0x01020304 0x01020304) + (assert tmp%10#0) + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/byte-expressions/byte-expressions.awst b/tests/approvals/out/byte-expressions/byte-expressions.awst index b305d34f..3613d791 100644 --- a/tests/approvals/out/byte-expressions/byte-expressions.awst +++ b/tests/approvals/out/byte-expressions/byte-expressions.awst @@ -1,11 +1,37 @@ subroutine test(a: uint64, b: biguint, c: string): void { - assert(len(0x) == 0) - assert(itob(a) == itob(a)) - assert(0x01 == 0x0000000000000001) + assert(len(0x) == 0, comment=Empty bytes has length of 0) + assert(itob(a) == itob(a), comment=Bytes(uint64) is equivalent to itob) + assert(0x0000000000000001 == 0x0000000000000001, comment=Bytes(uint64) returns an 8 byte encoding) assert(reinterpret_cast(256) == 0x0100) - assert(reinterpret_cast(reinterpret_cast(b)) == b) + assert(reinterpret_cast(reinterpret_cast(b)) == b, comment=Round trip of biguint to bytes and back results in the same value) assert(reinterpret_cast(reinterpret_cast(c)) == c) assert("123" == "123") assert(0x01020304 == 0x01020304) +} +contract DemoContract +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + tests/approvals/byte-expressions.algo.ts::test(1, 50, "things") + return True + } + + clearProgram(): bool + { + return True + } + + constructor(): void + { + void + } + + BaseContract::constructor(): void + { + } + } \ No newline at end of file diff --git a/tests/approvals/out/byte-expressions/byte-expressions.awst.json b/tests/approvals/out/byte-expressions/byte-expressions.awst.json index 4ca2f978..e8c96646 100644 --- a/tests/approvals/out/byte-expressions/byte-expressions.awst.json +++ b/tests/approvals/out/byte-expressions/byte-expressions.awst.json @@ -88,16 +88,16 @@ "line": 5, "end_line": 5, "column": 2, - "end_column": 30 + "end_column": 61 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 5, "end_line": 5, "column": 2, - "end_column": 30 + "end_column": 61 }, "wtype": { "_type": "WType", @@ -106,89 +106,84 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 9, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 5, "end_line": 5, - "column": 9, - "end_column": 29 + "column": 17, + "end_column": 23 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 5, - "end_line": 5, - "column": 9, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 5, - "end_line": 5, - "column": 9, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "unknown" - } - ], - "comment": null + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "", + "encoding": "unknown" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 28, + "end_column": 29 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 5, - "end_line": 5, - "column": 28, - "end_column": 29 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null } - ], - "comment": null + }, + "error_message": "Empty bytes has length of 0" } }, { @@ -198,16 +193,16 @@ "line": 6, "end_line": 6, "column": 2, - "end_column": 33 + "end_column": 72 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 6, "end_line": 6, "column": 2, - "end_column": 33 + "end_column": 72 }, "wtype": { "_type": "WType", @@ -216,109 +211,103 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 9, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 6, "end_line": 6, "column": 9, - "end_column": 32 + "end_column": 17 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "itob", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 15, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - ], - "comment": null + "op_code": "itob", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 15, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 22, + "end_column": 32 }, - "operator": "==", - "rhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 22, - "end_column": 32 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "itob", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 30, - "end_column": 31 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - ], - "comment": null - } + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "itob", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 30, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + ] } - ], - "comment": null + }, + "error_message": "Bytes(uint64) is equivalent to itob" } }, { @@ -328,16 +317,16 @@ "line": 7, "end_line": 7, "column": 2, - "end_column": 64 + "end_column": 108 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 7, "end_line": 7, "column": 2, - "end_column": 64 + "end_column": 108 }, "wtype": { "_type": "WType", @@ -346,67 +335,63 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 7, + "end_line": 7, + "column": 9, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 7, "end_line": 7, "column": 9, - "end_column": 63 + "end_column": 25 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 7, - "end_line": 7, - "column": 9, - "end_column": 25 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "0R", - "encoding": "base16" + "value": "0000000001", + "encoding": "base16" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 7, + "end_line": 7, + "column": 30, + "end_column": 63 }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 7, - "end_line": 7, - "column": 30, - "end_column": 63 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "0000000001", - "encoding": "base16" - } + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "0000000001", + "encoding": "base16" } - ], - "comment": null + }, + "error_message": "Bytes(uint64) returns an 8 byte encoding" } }, { @@ -419,7 +404,7 @@ "end_column": 55 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 8, @@ -434,84 +419,80 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 9, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 8, "end_line": 8, "column": 9, - "end_column": 54 + "end_column": 28 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 8, - "end_line": 8, - "column": 9, - "end_column": 28 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 8, - "end_line": 8, - "column": 15, - "end_column": 27 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "256", - "teal_alias": null - } - }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", + "expr": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 8, "end_line": 8, - "column": 33, - "end_column": 54 + "column": 23, + "end_column": 26 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "biguint", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "value": "0RR", - "encoding": "base16" + "value": "256", + "teal_alias": null } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 33, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "0RR", + "encoding": "base16" } - ], - "comment": null + }, + "error_message": null } }, { @@ -521,16 +502,16 @@ "line": 9, "end_line": 9, "column": 2, - "end_column": 33 + "end_column": 102 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 9, "end_line": 9, "column": 2, - "end_column": 33 + "end_column": 102 }, "wtype": { "_type": "WType", @@ -539,99 +520,95 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 9, + "end_line": 9, + "column": 9, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 9, "end_line": 9, "column": 9, - "end_column": 32 + "end_column": 26 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { + "expr": { "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 9, "end_line": 9, - "column": 9, - "end_column": 26 + "column": 17, + "end_column": 25 }, "wtype": { "_type": "WType", - "name": "biguint", + "name": "bytes", "immutable": true, "ephemeral": false, "scalar_type": 1 }, "expr": { - "_type": "ReinterpretCast", + "_type": "VarExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 9, "end_line": 9, - "column": 17, - "end_column": 25 + "column": 23, + "end_column": 24 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "biguint", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 9, - "end_line": 9, - "column": 23, - "end_column": 24 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "b" - } + "name": "b" } - }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 9, - "end_line": 9, - "column": 31, - "end_column": 32 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "b" } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 9, + "end_line": 9, + "column": 31, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "b" } - ], - "comment": null + }, + "error_message": "Round trip of biguint to bytes and back results in the same value" } }, { @@ -644,7 +621,7 @@ "end_column": 32 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 10, @@ -659,99 +636,95 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 10, + "end_line": 10, + "column": 9, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 10, "end_line": 10, "column": 9, - "end_column": 31 + "end_column": 25 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { + "expr": { "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 10, "end_line": 10, - "column": 9, - "end_column": 25 + "column": 16, + "end_column": 24 }, "wtype": { "_type": "WType", - "name": "string", + "name": "bytes", "immutable": true, "ephemeral": false, "scalar_type": 1 }, "expr": { - "_type": "ReinterpretCast", + "_type": "VarExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 10, "end_line": 10, - "column": 16, - "end_column": 24 + "column": 22, + "end_column": 23 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 10, - "end_line": 10, - "column": 22, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "c" - } + "name": "c" } - }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 10, - "end_line": 10, - "column": 30, - "end_column": 31 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "c" } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 10, + "end_line": 10, + "column": 30, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c" } - ], - "comment": null + }, + "error_message": null } }, { @@ -764,7 +737,7 @@ "end_column": 46 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 11, @@ -779,67 +752,63 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 11, + "end_line": 11, + "column": 9, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 11, "end_line": 11, - "column": 9, - "end_column": 45 + "column": 21, + "end_column": 26 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 11, - "end_line": 11, - "column": 21, - "end_column": 26 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "F)}j", - "encoding": "utf8" + "value": "F)}j", + "encoding": "utf8" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 11, - "end_line": 11, - "column": 39, - "end_column": 44 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "F)}j", - "encoding": "utf8" - } + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "F)}j", + "encoding": "utf8" } - ], - "comment": null + }, + "error_message": null } }, { @@ -852,7 +821,7 @@ "end_column": 59 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 12, @@ -867,18 +836,158 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 12, + "end_line": 12, + "column": 9, + "end_column": 58 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 12, "end_line": 12, - "column": 9, + "column": 15, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "0RjUA", + "encoding": "unknown" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 12, + "end_line": 12, + "column": 33, "end_column": 58 }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "0RjUA", + "encoding": "base16" + } + }, + "error_message": null + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/byte-expressions.algo.ts::test", + "name": "test" + }, + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 15, + "end_line": 15, + "column": 0, + "end_column": 41 + }, + "id": "tests/approvals/byte-expressions.algo.ts::DemoContract", + "name": "DemoContract", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 16, + "end_line": 16, + "column": 2, + "end_column": 26 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, "wtype": { "_type": "WType", "name": "bool", @@ -886,61 +995,432 @@ "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "BytesConstant", + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 16, + "end_line": 19, + "column": 27, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 17, + "end_line": 17, + "column": 4, + "end_column": 26 + }, + "expr": { + "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", - "line": 12, - "end_line": 12, - "column": 15, - "end_column": 27 + "line": 17, + "end_line": 17, + "column": 4, + "end_column": 26 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "void", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null }, - "value": "0RjUA", - "encoding": "unknown" + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/byte-expressions.algo.ts::test" + }, + "args": [ + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 17, + "end_line": 17, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + } + }, + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 17, + "end_line": 17, + "column": 12, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "50", + "teal_alias": null + } + }, + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 17, + "end_line": 17, + "column": 17, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "things" + } + } + ] + } + }, + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 18, + "end_line": 18, + "column": 4, + "end_column": 15 }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", + "value": { + "_type": "BoolConstant", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", - "line": 12, - "end_line": 12, - "column": 33, - "end_column": 58 + "line": 18, + "end_line": 18, + "column": 11, + "end_column": 15 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "bool", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "value": "0RjUA", - "encoding": "base16" + "value": true } } ], + "label": null, "comment": null } - } - ], - "label": null, - "comment": null + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/byte-expressions.algo.ts::DemoContract", + "member_name": "approvalProgram", + "arc4_method_config": null }, - "documentation": { - "_type": "MethodDocumentation", - "description": null, - "args": {}, - "returns": 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 }, - "id": "tests/approvals/byte-expressions.algo.ts::test", - "name": "test" + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 15, + "end_line": 15, + "column": 0, + "end_column": 41 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 15, + "end_line": 15, + "column": 0, + "end_column": 41 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 15, + "end_line": 15, + "column": 0, + "end_column": 41 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 15, + "end_line": 15, + "column": 0, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/byte-expressions.algo.ts::DemoContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/call-expressions/Example.approval.teal b/tests/approvals/out/call-expressions/Example.approval.teal new file mode 100644 index 00000000..80386d9a --- /dev/null +++ b/tests/approvals/out/call-expressions/Example.approval.teal @@ -0,0 +1,79 @@ +#pragma version 10 + +tests/approvals/call-expressions.algo.ts::Example.approvalProgram: + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/call-expressions.algo.ts:12 + // return this.localMethod() + super.baseMethod() === freeMethod() - this.baseMethod() + callsub localMethod + callsub baseMethod + + + callsub freeMethod + callsub tests/approvals/call-expressions.algo.ts::Example.baseMethod + - + == + return + + +// tests/approvals/call-expressions.algo.ts::Example.constructor() -> void: +constructor: + // tests/approvals/call-expressions.algo.ts:10 + // export default class Example extends ExampleBase { + proto 0 0 + callsub tests/approvals/call-expressions.algo.ts::ExampleBase.constructor + retsub + + +// tests/approvals/call-expressions.algo.ts::ExampleBase.constructor() -> void: +tests/approvals/call-expressions.algo.ts::ExampleBase.constructor: + // tests/approvals/call-expressions.algo.ts:4 + // abstract class ExampleBase extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/call-expressions.algo.ts::Example.localMethod() -> uint64: +localMethod: + // tests/approvals/call-expressions.algo.ts:17 + // private localMethod(): uint64 { + proto 0 1 + // tests/approvals/call-expressions.algo.ts:18 + // return 5 + pushint 5 // 5 + retsub + + +// tests/approvals/call-expressions.algo.ts::ExampleBase.baseMethod() -> uint64: +baseMethod: + // tests/approvals/call-expressions.algo.ts:5 + // protected baseMethod(): uint64 { + proto 0 1 + // tests/approvals/call-expressions.algo.ts:6 + // return 2 + pushint 2 // 2 + retsub + + +// tests/approvals/call-expressions.algo.ts::freeMethod() -> uint64: +freeMethod: + // tests/approvals/call-expressions.algo.ts:22 + // function freeMethod(): uint64 { + proto 0 1 + // tests/approvals/call-expressions.algo.ts:23 + // return 7 + pushint 7 // 7 + retsub + + +// tests/approvals/call-expressions.algo.ts::Example.baseMethod() -> uint64: +tests/approvals/call-expressions.algo.ts::Example.baseMethod: + // tests/approvals/call-expressions.algo.ts:14 + // protected baseMethod(): uint64 { + proto 0 1 + // tests/approvals/call-expressions.algo.ts:15 + // return 1 + pushint 1 // 1 + retsub diff --git a/tests/approvals/out/call-expressions/Example.clear.teal b/tests/approvals/out/call-expressions/Example.clear.teal new file mode 100644 index 00000000..bf95f000 --- /dev/null +++ b/tests/approvals/out/call-expressions/Example.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/call-expressions.algo.ts::Example.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/call-expressions/call-expressions.awst b/tests/approvals/out/call-expressions/call-expressions.awst index 9548b1fc..1c693373 100644 --- a/tests/approvals/out/call-expressions/call-expressions.awst +++ b/tests/approvals/out/call-expressions/call-expressions.awst @@ -38,9 +38,8 @@ contract Example void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } diff --git a/tests/approvals/out/call-expressions/call-expressions.awst.json b/tests/approvals/out/call-expressions/call-expressions.awst.json index f0867d7a..afcb0e18 100644 --- a/tests/approvals/out/call-expressions/call-expressions.awst.json +++ b/tests/approvals/out/call-expressions/call-expressions.awst.json @@ -108,8 +108,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -797,42 +796,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -842,7 +806,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -854,7 +818,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Subroutine", diff --git a/tests/approvals/out/destructured-params/destructured-params.awst b/tests/approvals/out/destructured-params/destructured-params.awst index a3786741..74e85c82 100644 --- a/tests/approvals/out/destructured-params/destructured-params.awst +++ b/tests/approvals/out/destructured-params/destructured-params.awst @@ -5,7 +5,7 @@ subroutine test(p: { a: uint64, b: bytes, c: bool }): void } subroutine init(): void { - tests/approvals/destructured-params.algo.ts::test({ a: (#11 = { a: 1, b: "", c: False }).a, b: #11.b, c: #11.c }) + tests/approvals/destructured-params.algo.ts::test({ a: (#0 = { a: 1, b: "", c: False }).a, b: #0.b, c: #0.c }) temp: { a: uint64, b: bytes, c: bool } = { a: 2, b: "Hello", c: True } tests/approvals/destructured-params.algo.ts::test(temp) } \ No newline at end of file diff --git a/tests/approvals/out/destructured-params/destructured-params.awst.json b/tests/approvals/out/destructured-params/destructured-params.awst.json index 148725f0..172f69f1 100644 --- a/tests/approvals/out/destructured-params/destructured-params.awst.json +++ b/tests/approvals/out/destructured-params/destructured-params.awst.json @@ -14,7 +14,7 @@ "name": "p", "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -103,7 +103,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -204,7 +204,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -357,8 +357,7 @@ }, "name": "a" } - ], - "comment": null + ] }, { "_type": "VarExpression", @@ -378,8 +377,7 @@ }, "name": "b" } - ], - "comment": null + ] }, { "_type": "IntrinsicCall", @@ -418,14 +416,11 @@ }, "name": "c" } - ], - "comment": null + ] } - ], - "comment": null + ] } - ], - "comment": null + ] } } ], @@ -516,7 +511,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -577,7 +572,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -621,7 +616,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -713,7 +708,7 @@ } ] }, - "id": "11" + "id": "0" }, "name": "a" }, @@ -744,7 +739,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -788,7 +783,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -880,7 +875,7 @@ } ] }, - "id": "11" + "id": "0" }, "name": "b" }, @@ -911,7 +906,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -955,7 +950,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1047,7 +1042,7 @@ } ] }, - "id": "11" + "id": "0" }, "name": "c" } @@ -1077,7 +1072,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1123,7 +1118,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1260,7 +1255,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, diff --git a/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json b/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json index 16693b23..ed50d6b6 100644 --- a/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json +++ b/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json @@ -53,7 +53,7 @@ "types": [ { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -80,7 +80,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -107,7 +107,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -154,7 +154,7 @@ "types": [ { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -181,7 +181,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -208,7 +208,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -247,7 +247,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -324,7 +324,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -401,7 +401,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -554,7 +554,7 @@ "types": [ { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -581,7 +581,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -608,7 +608,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -648,7 +648,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -863,7 +863,7 @@ "end_column": 21 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/destructuring-iterators.algo.ts", "line": 14, @@ -878,66 +878,62 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/destructuring-iterators.algo.ts", + "line": 14, + "end_line": 14, + "column": 9, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/destructuring-iterators.algo.ts", "line": 14, "end_line": 14, "column": 9, - "end_column": 20 + "end_column": 14 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/destructuring-iterators.algo.ts", - "line": 14, - "end_line": 14, - "column": 9, - "end_column": 14 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "total" + "name": "total" + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/destructuring-iterators.algo.ts", + "line": 14, + "end_line": 14, + "column": 19, + "end_column": 20 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/destructuring-iterators.algo.ts", - "line": 14, - "end_line": 14, - "column": 19, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "6", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null } - ], - "comment": null + }, + "error_message": null } } ], diff --git a/tests/approvals/out/ensure-budget/EnsureBudgetContract.approval.teal b/tests/approvals/out/ensure-budget/EnsureBudgetContract.approval.teal new file mode 100644 index 00000000..aaf5d0c6 --- /dev/null +++ b/tests/approvals/out/ensure-budget/EnsureBudgetContract.approval.teal @@ -0,0 +1,89 @@ +#pragma version 10 + +tests/approvals/ensure-budget.algo.ts::EnsureBudgetContract.approvalProgram: + intcblock 100 0 1 + bytecblock 0x068101 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/ensure-budget.algo.ts:5 + // ensureBudget(100) + intc_0 // 100 + intc_1 // 0 + callsub ensure_budget + // tests/approvals/ensure-budget.algo.ts:6 + // ensureBudget(100, OpUpFeeSource.GroupCredit) + intc_0 // 100 + intc_1 // 0 + callsub ensure_budget + // tests/approvals/ensure-budget.algo.ts:7 + // ensureBudget(100, OpUpFeeSource.AppAccount) + intc_0 // 100 + intc_2 // 1 + callsub ensure_budget + // tests/approvals/ensure-budget.algo.ts:8 + // ensureBudget(100, OpUpFeeSource.Any) + intc_0 // 100 + pushint 2 // 2 + callsub ensure_budget + // tests/approvals/ensure-budget.algo.ts:10 + // return true + intc_2 // 1 + return + + +// tests/approvals/ensure-budget.algo.ts::EnsureBudgetContract.constructor() -> void: +constructor: + // tests/approvals/ensure-budget.algo.ts:3 + // export class EnsureBudgetContract extends BaseContract { + proto 0 0 + retsub + + +// _puya_lib.util.ensure_budget(required_budget: uint64, fee_source: uint64) -> void: +ensure_budget: + proto 2 0 + frame_dig -2 + pushint 10 // 10 + + + +ensure_budget_while_top@1: + global OpcodeBudget + frame_dig 0 + < + bz ensure_budget_after_while@7 + itxn_begin + pushint 6 // appl + itxn_field TypeEnum + pushint 5 // DeleteApplication + itxn_field OnCompletion + bytec_0 // 0x068101 + itxn_field ApprovalProgram + bytec_0 // 0x068101 + itxn_field ClearStateProgram + intc_1 // 0 + intc_2 // 1 + frame_dig -1 + match ensure_budget_switch_case_0@3 ensure_budget_switch_case_1@4 + b ensure_budget_switch_case_default@5 + +ensure_budget_switch_case_0@3: + intc_1 // 0 + itxn_field Fee + b ensure_budget_switch_case_next@6 + +ensure_budget_switch_case_1@4: + global MinTxnFee + itxn_field Fee + b ensure_budget_switch_case_next@6 + +ensure_budget_switch_case_default@5: + +ensure_budget_switch_case_next@6: + itxn_submit + b ensure_budget_while_top@1 + +ensure_budget_after_while@7: + retsub diff --git a/tests/approvals/out/ensure-budget/EnsureBudgetContract.clear.teal b/tests/approvals/out/ensure-budget/EnsureBudgetContract.clear.teal new file mode 100644 index 00000000..c0d63ccf --- /dev/null +++ b/tests/approvals/out/ensure-budget/EnsureBudgetContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/ensure-budget.algo.ts::EnsureBudgetContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/ensure-budget/ensure-budget.awst b/tests/approvals/out/ensure-budget/ensure-budget.awst index b1282051..8cb7384f 100644 --- a/tests/approvals/out/ensure-budget/ensure-budget.awst +++ b/tests/approvals/out/ensure-budget/ensure-budget.awst @@ -22,9 +22,8 @@ contract EnsureBudgetContract void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/ensure-budget/ensure-budget.awst.json b/tests/approvals/out/ensure-budget/ensure-budget.awst.json index 6eabe1ef..7a3b7092 100644 --- a/tests/approvals/out/ensure-budget/ensure-budget.awst.json +++ b/tests/approvals/out/ensure-budget/ensure-budget.awst.json @@ -107,8 +107,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -308,7 +307,7 @@ "file": "tests/approvals/ensure-budget.algo.ts", "line": 6, "end_line": 6, - "column": 22, + "column": 36, "end_column": 47 }, "wtype": { @@ -384,7 +383,7 @@ "file": "tests/approvals/ensure-budget.algo.ts", "line": 7, "end_line": 7, - "column": 22, + "column": 36, "end_column": 46 }, "wtype": { @@ -460,7 +459,7 @@ "file": "tests/approvals/ensure-budget.algo.ts", "line": 8, "end_line": 8, - "column": 22, + "column": 36, "end_column": 39 }, "wtype": { @@ -693,42 +692,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -738,7 +702,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -750,6 +714,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/global-state/TestContract.approval.teal b/tests/approvals/out/global-state/TestContract.approval.teal new file mode 100644 index 00000000..f89846b9 --- /dev/null +++ b/tests/approvals/out/global-state/TestContract.approval.teal @@ -0,0 +1,125 @@ +#pragma version 10 + +tests/approvals/global-state.algo.ts::TestContract.approvalProgram: + intcblock 0 2 + bytecblock "testState" "baseTestState" "testing 123" + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/global-state.algo.ts:22 + // assert(this.testState.hasValue, 'State should have value') + intc_0 // 0 + // tests/approvals/global-state.algo.ts:11 + // testState = GlobalState({ initialValue: Uint64(2) }) + bytec_0 // "testState" + // tests/approvals/global-state.algo.ts:22 + // assert(this.testState.hasValue, 'State should have value') + app_global_get_ex + bury 1 + assert // State should have value + // tests/approvals/global-state.algo.ts:23 + // assert(this.testState.value === 2, 'Value should equal 2') + intc_0 // 0 + // tests/approvals/global-state.algo.ts:11 + // testState = GlobalState({ initialValue: Uint64(2) }) + bytec_0 // "testState" + // tests/approvals/global-state.algo.ts:23 + // assert(this.testState.value === 2, 'Value should equal 2') + app_global_get_ex + assert // check GlobalState exists + intc_1 // 2 + == + assert // Value should equal 2 + // tests/approvals/global-state.algo.ts:25 + // this.testState.value = op.btoi(Txn.applicationArgs(0)) + intc_0 // 0 + txnas ApplicationArgs + btoi + // tests/approvals/global-state.algo.ts:11 + // testState = GlobalState({ initialValue: Uint64(2) }) + bytec_0 // "testState" + // tests/approvals/global-state.algo.ts:25 + // this.testState.value = op.btoi(Txn.applicationArgs(0)) + swap + app_global_put + // tests/approvals/global-state.algo.ts:27 + // return true + pushint 1 // 1 + return + + +// tests/approvals/global-state.algo.ts::TestContract.constructor() -> void: +constructor: + // tests/approvals/global-state.algo.ts:14-19 + // constructor() { + // const someValue: uint64 = 2 ** 56 + // super() + // assert(this.baseTestState.value === 'testing 123', 'Base class state should be initialized after super call') + // this.noInitialInt.value = someValue * this.testState.value + // } + proto 0 0 + // tests/approvals/global-state.algo.ts:16 + // super() + callsub tests/approvals/global-state.algo.ts::BaseTestContract.constructor + // tests/approvals/global-state.algo.ts:11 + // testState = GlobalState({ initialValue: Uint64(2) }) + bytec_0 // "testState" + intc_1 // 2 + app_global_put + // tests/approvals/global-state.algo.ts:12 + // testState2 = GlobalState({ initialValue: Uint64(5), key: Bytes('TESTSTATE') }) + pushbytes "TESTSTATE" + pushint 5 // 5 + app_global_put + // tests/approvals/global-state.algo.ts:17 + // assert(this.baseTestState.value === 'testing 123', 'Base class state should be initialized after super call') + intc_0 // 0 + // tests/approvals/global-state.algo.ts:5 + // baseTestState = GlobalState({ initialValue: 'testing 123' }) + bytec_1 // "baseTestState" + // tests/approvals/global-state.algo.ts:17 + // assert(this.baseTestState.value === 'testing 123', 'Base class state should be initialized after super call') + app_global_get_ex + assert // check GlobalState exists + bytec_2 // "testing 123" + == + assert // Base class state should be initialized after super call + // tests/approvals/global-state.algo.ts:18 + // this.noInitialInt.value = someValue * this.testState.value + intc_0 // 0 + // tests/approvals/global-state.algo.ts:11 + // testState = GlobalState({ initialValue: Uint64(2) }) + bytec_0 // "testState" + // tests/approvals/global-state.algo.ts:18 + // this.noInitialInt.value = someValue * this.testState.value + app_global_get_ex + assert // check GlobalState exists + // tests/approvals/global-state.algo.ts:15 + // const someValue: uint64 = 2 ** 56 + pushint 72057594037927936 // 72057594037927936 + // tests/approvals/global-state.algo.ts:18 + // this.noInitialInt.value = someValue * this.testState.value + * + // tests/approvals/global-state.algo.ts:10 + // noInitialInt = GlobalState() + pushbytes "noInitialInt" + // tests/approvals/global-state.algo.ts:18 + // this.noInitialInt.value = someValue * this.testState.value + swap + app_global_put + retsub + + +// tests/approvals/global-state.algo.ts::BaseTestContract.constructor() -> void: +tests/approvals/global-state.algo.ts::BaseTestContract.constructor: + // tests/approvals/global-state.algo.ts:4 + // export abstract class BaseTestContract extends BaseContract { + proto 0 0 + // tests/approvals/global-state.algo.ts:5 + // baseTestState = GlobalState({ initialValue: 'testing 123' }) + bytec_1 // "baseTestState" + bytec_2 // "testing 123" + app_global_put + retsub diff --git a/tests/approvals/out/global-state/TestContract.clear.teal b/tests/approvals/out/global-state/TestContract.clear.teal new file mode 100644 index 00000000..599e8bcc --- /dev/null +++ b/tests/approvals/out/global-state/TestContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/global-state.algo.ts::TestContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/global-state/global-state.awst b/tests/approvals/out/global-state/global-state.awst index 3f3a2038..a98fae4d 100644 --- a/tests/approvals/out/global-state/global-state.awst +++ b/tests/approvals/out/global-state/global-state.awst @@ -12,8 +12,8 @@ contract TestContract if (!Boolean(txn())) { this.constructor() } - assert(STATE_EXISTS(GlobalState["testState"])) - assert(GlobalState["testState"] == 2) + assert(STATE_EXISTS(GlobalState["testState"]), comment=State should have value) + assert(GlobalState["testState"] == 2, comment=Value should equal 2) GlobalState["testState"]: uint64 = btoi(txnas(0)) return True } @@ -29,7 +29,7 @@ contract TestContract super.constructor() GlobalState["testState"]: uint64 = 2 GlobalState["TESTSTATE"]: uint64 = 5 - assert(GlobalState["baseTestState"] == "testing 123") + assert(GlobalState["baseTestState"] == "testing 123", comment=Base class state should be initialized after super call) GlobalState["noInitialInt"]: uint64 = someValue * GlobalState["testState"] } @@ -39,9 +39,8 @@ contract TestContract GlobalState["baseTestState"]: string = "testing 123" } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/global-state/global-state.awst.json b/tests/approvals/out/global-state/global-state.awst.json index 5023fcae..9c2a2e4d 100644 --- a/tests/approvals/out/global-state/global-state.awst.json +++ b/tests/approvals/out/global-state/global-state.awst.json @@ -108,8 +108,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -184,7 +183,7 @@ "end_column": 62 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/global-state.algo.ts", "line": 22, @@ -199,65 +198,61 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "StateExists", + "condition": { + "_type": "StateExists", + "source_location": { + "file": "tests/approvals/global-state.algo.ts", + "line": 22, + "end_line": 22, + "column": 26, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "field": { + "_type": "AppStateExpression", "source_location": { "file": "tests/approvals/global-state.algo.ts", "line": 22, "end_line": 22, - "column": 11, + "column": 26, "end_column": 34 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "field": { - "_type": "AppStateExpression", + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/global-state.algo.ts", - "line": 22, - "end_line": 22, - "column": 11, - "end_column": 34 + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 11 }, "wtype": { "_type": "WType", - "name": "uint64", + "name": "state_key", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/global-state.algo.ts", - "line": 11, - "end_line": 11, - "column": 2, - "end_column": 11 - }, - "wtype": { - "_type": "WType", - "name": "state_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "bY*jNQ*>c;Wd", - "encoding": "utf8" + "scalar_type": 1 }, - "exists_assertion_message": "check GlobalState exists" - } + "value": "bY*jNQ*>c;Wd", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" } - ], - "comment": "State should have value" + }, + "error_message": "State should have value" } }, { @@ -270,7 +265,7 @@ "end_column": 62 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/global-state.algo.ts", "line": 23, @@ -285,85 +280,81 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/global-state.algo.ts", + "line": 23, + "end_line": 23, + "column": 11, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "AppStateExpression", "source_location": { "file": "tests/approvals/global-state.algo.ts", "line": 23, "end_line": 23, - "column": 11, - "end_column": 37 + "column": 26, + "end_column": 31 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "AppStateExpression", + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/global-state.algo.ts", - "line": 23, - "end_line": 23, - "column": 11, - "end_column": 31 + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 11 }, "wtype": { "_type": "WType", - "name": "uint64", + "name": "state_key", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/global-state.algo.ts", - "line": 11, - "end_line": 11, - "column": 2, - "end_column": 11 - }, - "wtype": { - "_type": "WType", - "name": "state_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "bY*jNQ*>c;Wd", - "encoding": "utf8" + "scalar_type": 1 }, - "exists_assertion_message": "check GlobalState exists" + "value": "bY*jNQ*>c;Wd", + "encoding": "utf8" }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/global-state.algo.ts", - "line": 23, - "end_line": 23, - "column": 36, - "end_column": 37 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "2", - "teal_alias": null - } + "exists_assertion_message": "check GlobalState exists" + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/global-state.algo.ts", + "line": 23, + "end_line": 23, + "column": 36, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "2", + "teal_alias": null } - ], - "comment": "Value should equal 2" + }, + "error_message": "Value should equal 2" } }, { @@ -381,7 +372,7 @@ "file": "tests/approvals/global-state.algo.ts", "line": 25, "end_line": 25, - "column": 4, + "column": 19, "end_column": 24 }, "wtype": { @@ -471,11 +462,9 @@ "value": "0", "teal_alias": null } - ], - "comment": null + ] } - ], - "comment": null + ] } }, { @@ -860,7 +849,7 @@ "end_column": 113 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/global-state.algo.ts", "line": 17, @@ -875,84 +864,80 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/global-state.algo.ts", + "line": 17, + "end_line": 17, + "column": 11, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "AppStateExpression", "source_location": { "file": "tests/approvals/global-state.algo.ts", "line": 17, "end_line": 17, - "column": 11, - "end_column": 53 + "column": 30, + "end_column": 35 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "AppStateExpression", + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/global-state.algo.ts", - "line": 17, - "end_line": 17, - "column": 11, - "end_column": 35 + "line": 5, + "end_line": 5, + "column": 2, + "end_column": 15 }, "wtype": { "_type": "WType", - "name": "string", + "name": "state_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/global-state.algo.ts", - "line": 5, - "end_line": 5, - "column": 2, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "state_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "VqtS-RAqB?Q*>c;Wd", - "encoding": "utf8" - }, - "exists_assertion_message": "check GlobalState exists" + "value": "VqtS-RAqB?Q*>c;Wd", + "encoding": "utf8" }, - "operator": "==", - "rhs": { - "_type": "StringConstant", - "source_location": { - "file": "tests/approvals/global-state.algo.ts", - "line": 17, - "end_line": 17, - "column": 40, - "end_column": 53 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "testing 123" - } + "exists_assertion_message": "check GlobalState exists" + }, + "operator": "==", + "rhs": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/global-state.algo.ts", + "line": 17, + "end_line": 17, + "column": 40, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "testing 123" } - ], - "comment": "Base class state should be initialized after super call" + }, + "error_message": "Base class state should be initialized after super call" } }, { @@ -970,7 +955,7 @@ "file": "tests/approvals/global-state.algo.ts", "line": 18, "end_line": 18, - "column": 4, + "column": 22, "end_column": 27 }, "wtype": { @@ -1042,7 +1027,7 @@ "file": "tests/approvals/global-state.algo.ts", "line": 18, "end_line": 18, - "column": 42, + "column": 57, "end_column": 62 }, "wtype": { @@ -1250,42 +1235,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1295,7 +1245,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -1508,6 +1458,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/BaseWithAbiCreate.approval.teal b/tests/approvals/out/implicit-create/BaseWithAbiCreate.approval.teal new file mode 100644 index 00000000..88df896c --- /dev/null +++ b/tests/approvals/out/implicit-create/BaseWithAbiCreate.approval.teal @@ -0,0 +1,70 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.approvalProgram: + intcblock 0 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.constructor() -> void: +constructor: + // tests/approvals/implicit-create.algo.ts:17 + // class BaseWithAbiCreate extends Contract { + proto 0 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/implicit-create.algo.ts:17 + // class BaseWithAbiCreate extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@5 + txna ApplicationArgs 0 + pushbytes 0x4c5c61ba // method "create()void" + swap + match __puya_arc4_router___create_route@2 + b __puya_arc4_router___switch_case_default@3 + +__puya_arc4_router___create_route@2: + // tests/approvals/implicit-create.algo.ts:18 + // @abimethod({ onCreate: 'require' }) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub create + pushint 1 // 1 + retsub + +__puya_arc4_router___switch_case_default@3: + b __puya_arc4_router___after_if_else@6 + +__puya_arc4_router___bare_routing@5: + +__puya_arc4_router___after_if_else@6: + // tests/approvals/implicit-create.algo.ts:17 + // class BaseWithAbiCreate extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.create() -> void: +create: + // tests/approvals/implicit-create.algo.ts:18-19 + // @abimethod({ onCreate: 'require' }) + // public create() {} + proto 0 0 + retsub diff --git a/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc32.json b/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc32.json index e1fd7ae8..6fb8c361 100644 --- a/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc32.json +++ b/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc32.json @@ -7,7 +7,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQWJpQ3JlYXRlLmFwcHJvdmFsUHJvZ3JhbToKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo6QmFzZVdpdGhBYmlDcmVhdGUuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjE3CiAgICAvLyBjbGFzcyBCYXNlV2l0aEFiaUNyZWF0ZSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJ6IF9fcHV5YV9hcmM0X3Jv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nIH0pCiAgICAvLyBwdWJsaWMgY3JlYXRlKCkge30KICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQWJpQ3JlYXRlLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" }, "state": { diff --git a/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc56.json b/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc56.json new file mode 100644 index 00000000..dcb2da2d --- /dev/null +++ b/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc56.json @@ -0,0 +1,82 @@ +{ + "name": "BaseWithAbiCreate", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 51 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 56 + ], + "errorMessage": "can only call when creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQWJpQ3JlYXRlLmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAwCiAgICB0eG4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XQtY3JlYXRlLmFsZ28udHM6MTgtMTkKICAgIC8vIEBhYmltZXRob2QoeyBvbkNyZWF0ZTogJ3JlcXVpcmUnIH0pCiAgICAvLyBwdWJsaWMgY3JlYXRlKCkge30KICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQWJpQ3JlYXRlLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/BaseWithAbiCreate.clear.teal b/tests/approvals/out/implicit-create/BaseWithAbiCreate.clear.teal new file mode 100644 index 00000000..b0909d5d --- /dev/null +++ b/tests/approvals/out/implicit-create/BaseWithAbiCreate.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/implicit-create/BaseWithAbiCreate.ssa.ir b/tests/approvals/out/implicit-create/BaseWithAbiCreate.ssa.ir index 91d2a684..a1953f8c 100644 --- a/tests/approvals/out/implicit-create/BaseWithAbiCreate.ssa.ir +++ b/tests/approvals/out/implicit-create/BaseWithAbiCreate.ssa.ir @@ -26,10 +26,10 @@ contract tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate: block@2: // create_route_L18 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (== tmp%5#0 0u) - (assert tmp%6#0) // is creating + (assert tmp%6#0) // can only call when creating tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.create() return 1u block@3: // switch_case_default_L17 diff --git a/tests/approvals/out/implicit-create/BaseWithBareCreate.approval.teal b/tests/approvals/out/implicit-create/BaseWithBareCreate.approval.teal new file mode 100644 index 00000000..2dda0a45 --- /dev/null +++ b/tests/approvals/out/implicit-create/BaseWithBareCreate.approval.teal @@ -0,0 +1,71 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.approvalProgram: + intcblock 0 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.constructor() -> void: +constructor: + // tests/approvals/implicit-create.algo.ts:13 + // class BaseWithBareCreate extends Contract { + proto 0 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/implicit-create.algo.ts:13 + // class BaseWithBareCreate extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@2 + b __puya_arc4_router___after_if_else@6 + +__puya_arc4_router___bare_routing@2: + // tests/approvals/implicit-create.algo.ts:13 + // class BaseWithBareCreate extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router___create@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___create@3: + // tests/approvals/implicit-create.algo.ts:14 + // @baremethod({ onCreate: 'require' }) + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + // tests/approvals/implicit-create.algo.ts:14-15 + // @baremethod({ onCreate: 'require' }) + // public create() {} + callsub create + pushint 1 // 1 + retsub + +__puya_arc4_router___switch_case_default@4: + +__puya_arc4_router___after_if_else@6: + // tests/approvals/implicit-create.algo.ts:13 + // class BaseWithBareCreate extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.create() -> void: +create: + // tests/approvals/implicit-create.algo.ts:14-15 + // @baremethod({ onCreate: 'require' }) + // public create() {} + proto 0 0 + retsub diff --git a/tests/approvals/out/implicit-create/BaseWithBareCreate.arc32.json b/tests/approvals/out/implicit-create/BaseWithBareCreate.arc32.json index df985c5a..5e559f0e 100644 --- a/tests/approvals/out/implicit-create/BaseWithBareCreate.arc32.json +++ b/tests/approvals/out/implicit-create/BaseWithBareCreate.arc32.json @@ -1,7 +1,7 @@ { "hints": {}, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQmFyZUNyZWF0ZS5hcHByb3ZhbFByb2dyYW06CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQmFyZUNyZWF0ZS5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6MTMKICAgIC8vIGNsYXNzIEJhc2VXaXRoQmFyZUNyZWF0ZSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJueiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19hZnRlcl9pZl9lbHNlQDYKICAgIHR4biBPbkNvbXBsZXRpb24KICAgIGJueiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19hZnRlcl9pZl9lbHNlQDYKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czoxNAogICAgLy8gQGJhcmVtZXRob2QoeyBvbkNyZWF0ZTogJ3JlcXVpcmUnIH0pCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgIQogICAgYXNzZXJ0IC8v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ICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/implicit-create/BaseWithBareCreate.arc56.json b/tests/approvals/out/implicit-create/BaseWithBareCreate.arc56.json new file mode 100644 index 00000000..a6490965 --- /dev/null +++ b/tests/approvals/out/implicit-create/BaseWithBareCreate.arc56.json @@ -0,0 +1,61 @@ +{ + "name": "BaseWithBareCreate", + "structs": {}, + "methods": [], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 48 + ], + "errorMessage": "can only call when creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQmFyZUNyZWF0ZS5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICAgY2FsbHN1YiBjb25zdHJ1Y3RvcgoKbWFpbl9hZnRlcl9pZl9lbHNlQDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQmFyZUNyZWF0ZS5jb25zdHJ1Y3RvcigpIC0+IHZvaWQ6CmNvbnN0cnVjdG9yOgogICAgLy8gdGVzdHMvYXBwc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ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQmFyZUNyZWF0ZS5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/BaseWithBareCreate.clear.teal b/tests/approvals/out/implicit-create/BaseWithBareCreate.clear.teal new file mode 100644 index 00000000..fcd5348e --- /dev/null +++ b/tests/approvals/out/implicit-create/BaseWithBareCreate.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/implicit-create/BaseWithBareCreate.ssa.ir b/tests/approvals/out/implicit-create/BaseWithBareCreate.ssa.ir index 6a4c8d57..0279c974 100644 --- a/tests/approvals/out/implicit-create/BaseWithBareCreate.ssa.ir +++ b/tests/approvals/out/implicit-create/BaseWithBareCreate.ssa.ir @@ -28,7 +28,7 @@ contract tests/approvals/implicit-create.algo.ts::BaseWithBareCreate: block@3: // create_L14 let tmp%3#0: uint64 = (txn ApplicationID) let tmp%4#0: bool = (== tmp%3#0 0u) - (assert tmp%4#0) // is creating + (assert tmp%4#0) // can only call when creating tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.create() return 1u block@4: // switch_case_default_L13 diff --git a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.approval.teal b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.approval.teal new file mode 100644 index 00000000..83ea3d42 --- /dev/null +++ b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.approval.teal @@ -0,0 +1,79 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::ExplicitAbiCreateFromBase.approvalProgram: + intcblock 0 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/implicit-create.algo.ts::ExplicitAbiCreateFromBase.constructor() -> void: +constructor: + // tests/approvals/implicit-create.algo.ts:23 + // export class ExplicitAbiCreateFromBase extends BaseWithAbiCreate {} + proto 0 0 + callsub tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.constructor + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.constructor() -> void: +tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.constructor: + // tests/approvals/implicit-create.algo.ts:17 + // class BaseWithAbiCreate extends Contract { + proto 0 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::ExplicitAbiCreateFromBase.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/implicit-create.algo.ts:23 + // export class ExplicitAbiCreateFromBase extends BaseWithAbiCreate {} + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@5 + txna ApplicationArgs 0 + pushbytes 0x4c5c61ba // method "create()void" + swap + match __puya_arc4_router___create_route@2 + b __puya_arc4_router___switch_case_default@3 + +__puya_arc4_router___create_route@2: + // tests/approvals/implicit-create.algo.ts:18 + // @abimethod({ onCreate: 'require' }) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub create + pushint 1 // 1 + retsub + +__puya_arc4_router___switch_case_default@3: + b __puya_arc4_router___after_if_else@6 + +__puya_arc4_router___bare_routing@5: + +__puya_arc4_router___after_if_else@6: + // tests/approvals/implicit-create.algo.ts:23 + // export class ExplicitAbiCreateFromBase extends BaseWithAbiCreate {} + intc_0 // 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.create() -> void: +create: + // tests/approvals/implicit-create.algo.ts:18-19 + // @abimethod({ onCreate: 'require' }) + // public create() {} + proto 0 0 + retsub diff --git a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc32.json b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc32.json index ee0b6e01..81dad553 100644 --- a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc32.json +++ b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc32.json @@ -7,7 +7,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkV4cGxpY2l0QWJpQ3JlYXRlRnJvbUJhc2UuYXBwcm92YWxQcm9ncmFtOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjpFeHBsaWNpdEFiaUNyZWF0ZUZyb21CYXNlLl9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czoyMwogICAgLy8gZXhwb3J0IGNsYXNzIEV4cGxpY2l0QWJpQ3JlYXRlRnJvbUJhc2UgZXh0ZW5kcyBCYXNlV2l0aEFiaUNyZWF0ZSB7fQogICAgcHJvdG8gMCAxCiAgICB0eG4gTnVtQXBwQXJncwogICAgYnogX19wdXlhX2FyYzRfcm91dGVyX19fYWZ0ZXJfaWZfZWxzZUA2CiAgICBwdXNoYnl0ZXMgMHg0YzVjNjFiYSAvLyBtZXRob2QgImNyZWF0ZSgpdm9pZCIKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDAKICAgIG1hdGNoIF9fcHV5YV9hcmM0X3JvdXRlcl9fX2NyZWF0ZV9yb3V0ZUAyCiAgICBwdXNoaW50IDAgLy8gMAogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19jcmVhdGVfcm91dGVAMjoKICAgIC8vIHRlc3RzL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3J0IGNsYXNzIEV4cGxpY2l0QWJpQ3JlYXRlRnJvbUJhc2UgZXh0ZW5kcyBCYXNlV2l0aEFiaUNyZWF0ZSB7fQogICAgaW50Y18wIC8vIDAKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo6QmFzZVdpdGhBYmlDcmVhdGUuY3JlYXRlKCkgLT4gdm9pZDoKY3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjE4LTE5CiAgICAvLyBAYWJpbWV0aG9kKHsgb25DcmVhdGU6ICdyZXF1aXJlJyB9KQogICAgLy8gcHVibGljIGNyZWF0ZSgpIHt9CiAgICBwcm90byAwIDAKICAgIHJldHN1Ygo=", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkV4cGxpY2l0QWJpQ3JlYXRlRnJvbUJhc2UuY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" }, "state": { diff --git a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc56.json b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc56.json new file mode 100644 index 00000000..07d47af0 --- /dev/null +++ b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc56.json @@ -0,0 +1,82 @@ +{ + "name": "ExplicitAbiCreateFromBase", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 58 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 63 + ], + "errorMessage": "can only call when creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkV4cGxpY2l0QWJpQ3JlYXRlRnJvbUJhc2UuYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjpFeHBsaWNpdEFiaUNyZWF0ZUZyb21CYXNlLmNvbnN0cnVjdG9yKCkgLT4gdm9pZDoKY29uc3RydWN0b3I6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6MjMKICAgIC8vIGV4cG9ydCBjbGFzcyBFeHBsaWNpdEFiaUNyZWF0ZUZyb21CYXNlIGV4dGVuZHMgQmFzZVdpdGhBYmlDcmVhdGUge30KICAgIHByb3RvIDAgMAogICAgY2FsbHN1YiB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQWJpQ3JlYXRlLmNvbnN0cnVjdG9yCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHBy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iAgICAvLyBAYWJpbWV0aG9kKHsgb25DcmVhdGU6ICdyZXF1aXJlJyB9KQogICAgLy8gcHVibGljIGNyZWF0ZSgpIHt9CiAgICBwcm90byAwIDAKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkV4cGxpY2l0QWJpQ3JlYXRlRnJvbUJhc2UuY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.clear.teal b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.clear.teal new file mode 100644 index 00000000..88995789 --- /dev/null +++ b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::ExplicitAbiCreateFromBase.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.ssa.ir b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.ssa.ir index 80ed22ef..d4345888 100644 --- a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.ssa.ir +++ b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.ssa.ir @@ -31,10 +31,10 @@ contract tests/approvals/implicit-create.algo.ts::ExplicitAbiCreateFromBase: block@2: // create_route_L18 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (== tmp%5#0 0u) - (assert tmp%6#0) // is creating + (assert tmp%6#0) // can only call when creating tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.create() return 1u block@3: // switch_case_default_L23 diff --git a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.approval.teal b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.approval.teal new file mode 100644 index 00000000..747dc48b --- /dev/null +++ b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.approval.teal @@ -0,0 +1,80 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::ExplicitBareCreateFromBase.approvalProgram: + intcblock 0 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/implicit-create.algo.ts::ExplicitBareCreateFromBase.constructor() -> void: +constructor: + // tests/approvals/implicit-create.algo.ts:21 + // export class ExplicitBareCreateFromBase extends BaseWithBareCreate {} + proto 0 0 + callsub tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.constructor + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.constructor() -> void: +tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.constructor: + // tests/approvals/implicit-create.algo.ts:13 + // class BaseWithBareCreate extends Contract { + proto 0 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::ExplicitBareCreateFromBase.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/implicit-create.algo.ts:21 + // export class ExplicitBareCreateFromBase extends BaseWithBareCreate {} + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@2 + b __puya_arc4_router___after_if_else@6 + +__puya_arc4_router___bare_routing@2: + // tests/approvals/implicit-create.algo.ts:21 + // export class ExplicitBareCreateFromBase extends BaseWithBareCreate {} + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router___create@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___create@3: + // tests/approvals/implicit-create.algo.ts:14 + // @baremethod({ onCreate: 'require' }) + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + // tests/approvals/implicit-create.algo.ts:14-15 + // @baremethod({ onCreate: 'require' }) + // public create() {} + callsub create + pushint 1 // 1 + retsub + +__puya_arc4_router___switch_case_default@4: + +__puya_arc4_router___after_if_else@6: + // tests/approvals/implicit-create.algo.ts:21 + // export class ExplicitBareCreateFromBase extends BaseWithBareCreate {} + intc_0 // 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.create() -> void: +create: + // tests/approvals/implicit-create.algo.ts:14-15 + // @baremethod({ onCreate: 'require' }) + // public create() {} + proto 0 0 + retsub diff --git a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc32.json b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc32.json index 2b66fb5d..ed15c9e0 100644 --- a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc32.json +++ b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc32.json @@ -1,7 +1,7 @@ { "hints": {}, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkV4cGxpY2l0QmFyZUNyZWF0ZUZyb21CYXNlLmFwcHJvdmFsUHJvZ3JhbToKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo6RXhwbGljaXRCYXJlQ3JlYXRlRnJvbUJhc2UuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjIxCiAgICAvLyBleHBvcnQgY2xhc3MgRXhwbGljaXRCYXJlQ3JlYXRlRnJvbUJhc2UgZXh0ZW5kcyBCYXNlV2l0aEJhcmVDcmVhdGUge30KICAgIHByb3RvIDAgMQogICAg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aGludCAxIC8vIDEKICAgIHJldHVybgo=" }, "state": { diff --git a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc56.json b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc56.json new file mode 100644 index 00000000..172b535f --- /dev/null +++ b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc56.json @@ -0,0 +1,61 @@ +{ + "name": "ExplicitBareCreateFromBase", + "structs": {}, + "methods": [], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 55 + ], + "errorMessage": "can only call when creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkV4cGxpY2l0QmFyZUNyZWF0ZUZyb21CYXNlLmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAwCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAyCiAgICBjYWxsc3ViIGNvbnN0cnVjdG9yCgptYWluX2FmdGVyX2lmX2Vsc2VAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo6RXhwbGljaXRCYXJlQ3JlYXRlRnJvbUJhc2UuY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vI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B1eWFfYXJjNF9yb3V0ZXJfX19zd2l0Y2hfY2FzZV9kZWZhdWx0QDQ6CgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19hZnRlcl9pZl9lbHNlQDY6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6MjEKICAgIC8vIGV4cG9ydCBjbGFzcyBFeHBsaWNpdEJhcmVDcmVhdGVGcm9tQmFzZSBleHRlbmRzIEJhc2VXaXRoQmFyZUNyZWF0ZSB7fQogICAgaW50Y18wIC8vIDAKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo6QmFzZVdpdGhCYXJlQ3JlYXRlLmNyZWF0ZSgpIC0+IHZvaWQ6CmNyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czoxNC0xNQogICAgLy8gQGJhcmVtZXRob2QoeyBvbkNyZWF0ZTogJ3JlcXVpcmUnIH0pCiAgICAvLyBwdWJsaWMgY3JlYXRlKCkge30KICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkV4cGxpY2l0QmFyZUNyZWF0ZUZyb21CYXNlLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.clear.teal b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.clear.teal new file mode 100644 index 00000000..886bca20 --- /dev/null +++ b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::ExplicitBareCreateFromBase.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.ssa.ir b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.ssa.ir index 2fdb82be..215bd230 100644 --- a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.ssa.ir +++ b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.ssa.ir @@ -33,7 +33,7 @@ contract tests/approvals/implicit-create.algo.ts::ExplicitBareCreateFromBase: block@3: // create_L14 let tmp%3#0: uint64 = (txn ApplicationID) let tmp%4#0: bool = (== tmp%3#0 0u) - (assert tmp%4#0) // is creating + (assert tmp%4#0) // can only call when creating tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.create() return 1u block@4: // switch_case_default_L21 diff --git a/tests/approvals/out/implicit-create/NoBare.approval.teal b/tests/approvals/out/implicit-create/NoBare.approval.teal new file mode 100644 index 00000000..d971266d --- /dev/null +++ b/tests/approvals/out/implicit-create/NoBare.approval.teal @@ -0,0 +1,98 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::NoBare.approvalProgram: + intcblock 0 1 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/implicit-create.algo.ts::NoBare.constructor() -> void: +constructor: + // tests/approvals/implicit-create.algo.ts:4 + // export class NoBare extends Contract { + proto 0 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::NoBare.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/implicit-create.algo.ts:4 + // export class NoBare extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@5 + txna ApplicationArgs 0 + pushbytes 0xb8b5e4b9 // method "handleNoop()void" + swap + match __puya_arc4_router___handleNoop_route@2 + b __puya_arc4_router___switch_case_default@3 + +__puya_arc4_router___handleNoop_route@2: + // tests/approvals/implicit-create.algo.ts:5 + // @abimethod({ allowActions: 'NoOp' }) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub handleNoop + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@3: + b __puya_arc4_router___after_if_else@9 + +__puya_arc4_router___bare_routing@5: + // tests/approvals/implicit-create.algo.ts:4 + // export class NoBare extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@6 + b __puya_arc4_router___switch_case_default@7 + +__puya_arc4_router_____algots__.defaultCreate@6: + // tests/approvals/implicit-create.algo.ts:4 + // export class NoBare extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@7: + +__puya_arc4_router___after_if_else@9: + // tests/approvals/implicit-create.algo.ts:4 + // export class NoBare extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::NoBare.handleNoop() -> void: +handleNoop: + // tests/approvals/implicit-create.algo.ts:5-6 + // @abimethod({ allowActions: 'NoOp' }) + // public handleNoop() {} + proto 0 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::NoBare.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/implicit-create.algo.ts:4 + // export class NoBare extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/implicit-create/NoBare.arc32.json b/tests/approvals/out/implicit-create/NoBare.arc32.json index 3f6185b5..e89e3238 100644 --- a/tests/approvals/out/implicit-create/NoBare.arc32.json +++ b/tests/approvals/out/implicit-create/NoBare.arc32.json @@ -7,7 +7,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vQmFyZS5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBjYWxsc3ViIF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nRlcl9pZl9lbHNlQDk6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6NAogICAgLy8gZXhwb3J0IGNsYXNzIE5vQmFyZSBleHRlbmRzIENvbnRyYWN0IHsKICAgIGludGNfMCAvLyAwCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vQmFyZS5oYW5kbGVOb29wKCkgLT4gdm9pZDoKaGFuZGxlTm9vcDoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo1LTYKICAgIC8vIEBhYmltZXRob2QoeyBhbGxvd0FjdGlvbnM6ICdOb09wJyB9KQogICAgLy8gcHVibGljIGhhbmRsZU5vb3AoKSB7fQogICAgcHJvdG8gMCAwCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vQmFyZS5fX2FsZ290c19fLmRlZmF1bHRDcmVhdGUoKSAtPiB2b2lkOgpfX2FsZ290c19fLmRlZmF1bHRDcmVhdGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6NAogICAgLy8gZXhwb3J0IGNsYXNzIE5vQmFyZSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vQmFyZS5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/implicit-create/NoBare.arc56.json b/tests/approvals/out/implicit-create/NoBare.arc56.json new file mode 100644 index 00000000..22a250fe --- /dev/null +++ b/tests/approvals/out/implicit-create/NoBare.arc56.json @@ -0,0 +1,90 @@ +{ + "name": "NoBare", + "structs": {}, + "methods": [ + { + "name": "handleNoop", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 52 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 81 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 57 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vQmFyZS5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAyCiAgICBjYWxsc3ViIGNvbnN0cnVjdG9yCgptYWluX2FmdGVyX2lmX2Vsc2VAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo6Tm9CYXJlLmNvbnN0cnVjdG9yKCkgLT4gdm9pZDoKY29uc3RydWN0b3I6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlY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No newline at end of file diff --git a/tests/approvals/out/implicit-create/NoBare.clear.teal b/tests/approvals/out/implicit-create/NoBare.clear.teal new file mode 100644 index 00000000..f8702e4f --- /dev/null +++ b/tests/approvals/out/implicit-create/NoBare.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::NoBare.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/implicit-create/NoBare.ssa.ir b/tests/approvals/out/implicit-create/NoBare.ssa.ir index 46017190..156aa21c 100644 --- a/tests/approvals/out/implicit-create/NoBare.ssa.ir +++ b/tests/approvals/out/implicit-create/NoBare.ssa.ir @@ -26,10 +26,10 @@ contract tests/approvals/implicit-create.algo.ts::NoBare: block@2: // handleNoop_route_L5 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // is not creating + (assert tmp%6#0) // can only call when not creating tests/approvals/implicit-create.algo.ts::NoBare.handleNoop() return 1u block@3: // switch_case_default_L4 @@ -42,7 +42,7 @@ contract tests/approvals/implicit-create.algo.ts::NoBare: block@6: // __algots__.defaultCreate_L4 let tmp%8#0: uint64 = (txn ApplicationID) let tmp%9#0: bool = (== tmp%8#0 0u) - (assert tmp%9#0) // is creating + (assert tmp%9#0) // can only call when creating tests/approvals/implicit-create.algo.ts::NoBare.__algots__.defaultCreate() return 1u block@7: // switch_case_default_L4 diff --git a/tests/approvals/out/implicit-create/NoNoOp.approval.teal b/tests/approvals/out/implicit-create/NoNoOp.approval.teal new file mode 100644 index 00000000..1474a0c8 --- /dev/null +++ b/tests/approvals/out/implicit-create/NoNoOp.approval.teal @@ -0,0 +1,91 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::NoNoOp.approvalProgram: + intcblock 0 1 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/implicit-create.algo.ts::NoNoOp.constructor() -> void: +constructor: + // tests/approvals/implicit-create.algo.ts:8 + // export class NoNoOp extends Contract { + proto 0 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::NoNoOp.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/implicit-create.algo.ts:8 + // export class NoNoOp extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@2 + b __puya_arc4_router___after_if_else@7 + +__puya_arc4_router___bare_routing@2: + // tests/approvals/implicit-create.algo.ts:8 + // export class NoNoOp extends Contract { + txn OnCompletion + pushint 4 // 4 + intc_0 // 0 + uncover 2 + match __puya_arc4_router___handleUpdate@3 __puya_arc4_router_____algots__.defaultCreate@4 + b __puya_arc4_router___switch_case_default@5 + +__puya_arc4_router___handleUpdate@3: + // tests/approvals/implicit-create.algo.ts:9 + // @baremethod({ allowActions: 'UpdateApplication' }) + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/implicit-create.algo.ts:9-10 + // @baremethod({ allowActions: 'UpdateApplication' }) + // public handleUpdate() {} + callsub handleUpdate + intc_1 // 1 + retsub + +__puya_arc4_router_____algots__.defaultCreate@4: + // tests/approvals/implicit-create.algo.ts:8 + // export class NoNoOp extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@5: + +__puya_arc4_router___after_if_else@7: + // tests/approvals/implicit-create.algo.ts:8 + // export class NoNoOp extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::NoNoOp.handleUpdate() -> void: +handleUpdate: + // tests/approvals/implicit-create.algo.ts:9-10 + // @baremethod({ allowActions: 'UpdateApplication' }) + // public handleUpdate() {} + proto 0 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::NoNoOp.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/implicit-create.algo.ts:8 + // export class NoNoOp extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/implicit-create/NoNoOp.arc32.json b/tests/approvals/out/implicit-create/NoNoOp.arc32.json index c7ceccc0..2ddafe49 100644 --- a/tests/approvals/out/implicit-create/NoNoOp.arc32.json +++ b/tests/approvals/out/implicit-create/NoNoOp.arc32.json @@ -1,7 +1,7 @@ { "hints": {}, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vTm9PcC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vTm9PcC5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OAogICAgLy8gZXhwb3J0IGNsYXNzIE5vTm9PcCBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJueiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19hZnRlcl9pZl9lbHNlQDcKICAgIHB1c2hpbnQgNCAvLyA0CiAgICBpbnRjXzAgLy8gMAogICAgdHhuIE9uQ29tcGxldGlvbgogICAgbWF0Y2ggX19wdXlhX2FyYzRfcm91dGVyX19faGFuZGxlVXBkYXRlQDMgX19wdXlhX2FyYzRfcm91dGVyX19fX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlQDQKICAgIGludGNfMCAv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c3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo4CiAgICAvLyBleHBvcnQgY2xhc3MgTm9Ob09wIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vTm9PcC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/implicit-create/NoNoOp.arc56.json b/tests/approvals/out/implicit-create/NoNoOp.arc56.json new file mode 100644 index 00000000..d2eafb2f --- /dev/null +++ b/tests/approvals/out/implicit-create/NoNoOp.arc56.json @@ -0,0 +1,69 @@ +{ + "name": "NoNoOp", + "structs": {}, + "methods": [], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [ + "UpdateApplication" + ] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 64 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 54 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vTm9PcC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWx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YWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vTm9PcC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/NoNoOp.clear.teal b/tests/approvals/out/implicit-create/NoNoOp.clear.teal new file mode 100644 index 00000000..606ab937 --- /dev/null +++ b/tests/approvals/out/implicit-create/NoNoOp.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::NoNoOp.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/implicit-create/NoNoOp.ssa.ir b/tests/approvals/out/implicit-create/NoNoOp.ssa.ir index 7d29ff9c..38b25edd 100644 --- a/tests/approvals/out/implicit-create/NoNoOp.ssa.ir +++ b/tests/approvals/out/implicit-create/NoNoOp.ssa.ir @@ -28,13 +28,13 @@ contract tests/approvals/implicit-create.algo.ts::NoNoOp: block@3: // handleUpdate_L9 let tmp%3#0: uint64 = (txn ApplicationID) let tmp%4#0: bool = (!= tmp%3#0 0u) - (assert tmp%4#0) // is not creating + (assert tmp%4#0) // can only call when not creating tests/approvals/implicit-create.algo.ts::NoNoOp.handleUpdate() return 1u block@4: // __algots__.defaultCreate_L8 let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (== tmp%5#0 0u) - (assert tmp%6#0) // is creating + (assert tmp%6#0) // can only call when creating tests/approvals/implicit-create.algo.ts::NoNoOp.__algots__.defaultCreate() return 1u block@5: // switch_case_default_L8 diff --git a/tests/approvals/out/implicit-create/implicit-create.awst b/tests/approvals/out/implicit-create/implicit-create.awst index 3df60dc5..a2d50400 100644 --- a/tests/approvals/out/implicit-create/implicit-create.awst +++ b/tests/approvals/out/implicit-create/implicit-create.awst @@ -24,11 +24,11 @@ contract NoBare Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void @@ -62,11 +62,11 @@ contract NoNoOp Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void @@ -100,11 +100,11 @@ contract BaseWithBareCreate Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } @@ -134,11 +134,11 @@ contract BaseWithAbiCreate Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } @@ -173,11 +173,11 @@ contract ExplicitBareCreateFromBase Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } @@ -212,11 +212,11 @@ contract ExplicitAbiCreateFromBase Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/implicit-create.awst.json b/tests/approvals/out/implicit-create/implicit-create.awst.json index 8832f912..48586113 100644 --- a/tests/approvals/out/implicit-create/implicit-create.awst.json +++ b/tests/approvals/out/implicit-create/implicit-create.awst.json @@ -109,8 +109,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -451,7 +450,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -493,42 +527,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -538,7 +537,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, @@ -604,7 +603,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Contract", @@ -716,8 +716,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -1054,7 +1053,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -1096,42 +1130,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1141,7 +1140,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, @@ -1207,7 +1206,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Contract", @@ -1319,8 +1319,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -1657,7 +1656,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -1699,42 +1733,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1744,7 +1743,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -1756,7 +1755,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Contract", @@ -1868,8 +1868,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -2210,7 +2209,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -2252,42 +2286,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -2297,7 +2296,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -2309,7 +2308,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Contract", @@ -2422,8 +2422,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -2833,7 +2832,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -2875,42 +2909,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -2920,7 +2919,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -2932,7 +2931,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Contract", @@ -3045,8 +3045,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -3460,7 +3459,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -3502,42 +3536,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -3547,7 +3546,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -3559,6 +3558,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.approval.teal b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.approval.teal new file mode 100644 index 00000000..5fd8c385 --- /dev/null +++ b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.approval.teal @@ -0,0 +1,164 @@ +#pragma version 10 + +tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.approvalProgram: + intcblock 0 1 + bytecblock 0x151f7c75 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.constructor() -> void: +constructor: + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { + proto 0 0 + callsub tests/approvals/inheritance-a.algo.ts::Arc4Contract.constructor + retsub + + +// tests/approvals/inheritance-a.algo.ts::Arc4Contract.constructor() -> void: +tests/approvals/inheritance-a.algo.ts::Arc4Contract.constructor: + // tests/approvals/inheritance-a.algo.ts:11 + // export abstract class Arc4Contract extends Contract { + proto 0 0 + retsub + + +// tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@6 + txna ApplicationArgs 0 + pushbytes 0xc73da9b9 // method "getVeryImportantValue()string" + pushbytes 0xf161dc37 // method "simpleAbiMethod(uint64,uint64)uint64" + uncover 2 + match __puya_arc4_router___getVeryImportantValue_route@2 __puya_arc4_router___simpleAbiMethod_route@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___getVeryImportantValue_route@2: + // tests/approvals/inheritance-b.algo.ts:15 + // public getVeryImportantValue() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub getVeryImportantValue + dup + len + itob + extract 6 2 + swap + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___simpleAbiMethod_route@3: + // tests/approvals/inheritance-a.algo.ts:17 + // public simpleAbiMethod(a: uint64, b: uint64): uint64 { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + btoi + // tests/approvals/inheritance-a.algo.ts:17 + // public simpleAbiMethod(a: uint64, b: uint64): uint64 { + callsub simpleAbiMethod + itob + bytec_0 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@4: + b __puya_arc4_router___after_if_else@10 + +__puya_arc4_router___bare_routing@6: + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@7 + b __puya_arc4_router___switch_case_default@8 + +__puya_arc4_router_____algots__.defaultCreate@7: + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@8: + +__puya_arc4_router___after_if_else@10: + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { + intc_0 // 0 + retsub + + +// tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.getVeryImportantValue() -> bytes: +getVeryImportantValue: + // tests/approvals/inheritance-b.algo.ts:15 + // public getVeryImportantValue() { + proto 0 1 + // tests/approvals/inheritance-a.algo.ts:22 + // export const VERY_IMPORTANT_VALUE = '42' + pushbytes "42" + // tests/approvals/inheritance-b.algo.ts:16 + // return VERY_IMPORTANT_VALUE + retsub + + +// tests/approvals/inheritance-a.algo.ts::Arc4Contract.simpleAbiMethod(a: uint64, b: uint64) -> uint64: +simpleAbiMethod: + // tests/approvals/inheritance-a.algo.ts:17 + // public simpleAbiMethod(a: uint64, b: uint64): uint64 { + proto 2 1 + // tests/approvals/inheritance-a.algo.ts:18 + // return a + b + frame_dig -2 + frame_dig -1 + + + retsub + + +// tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc32.json b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc32.json index bbe415ab..4c474057 100644 --- a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc32.json +++ b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc32.json @@ -12,7 +12,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW5oZXJpdGFuY2UtYi5hbGdvLnRzOjpDb25jcmV0ZUFyYzRDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwCiAgICBieXRlY2Jsb2NrIDB4MTUxZjdjNzUKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9pbmhlcml0YW5jZS1iLmFsZ28udHM6OkNvbmNyZXRlQXJjNENvbnRyYWN0Ll9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9pbmhlcml0YW5jZS1iLmFsZ28udHM6MTQKICAgIC8vIGV4cG9ydCBjbGFzcyBDb25jcmV0ZUFyYzRDb250cmFjdCBleHRlbmRzIE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ZWZhdWx0Q3JlYXRlKCkgLT4gdm9pZDoKX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2luaGVyaXRhbmNlLWIuYWxnby50czoxNAogICAgLy8gZXhwb3J0IGNsYXNzIENvbmNyZXRlQXJjNENvbnRyYWN0IGV4dGVuZHMgQXJjNENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW5oZXJpdGFuY2UtYi5hbGdvLnRzOjpDb25jcmV0ZUFyYzRDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc56.json b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc56.json new file mode 100644 index 00000000..2988380d --- /dev/null +++ b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc56.json @@ -0,0 +1,123 @@ +{ + "name": "ConcreteArc4Contract", + "structs": {}, + "methods": [ + { + "name": "getVeryImportantValue", + "args": [], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "simpleAbiMethod", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 1, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "someState": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "c29tZVN0YXRl" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 75, + 102 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 144 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 80, + 107 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW5oZXJpdGFuY2UtYi5hbGdvLnRzOjpDb25jcmV0ZUFyYzRDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBieXRlY2Jsb2NrIDB4MTUxZjdjNzUKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2luaGVyaXRhbmNlLWIuYWxnby50czo6Q29uY3JldGVBcmM0Q29udHJhY3QuY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9pbmhlcml0YW5jZS1iLmFsZ28udHM6MTQKICAgIC8vIGV4cG9ydCBjbGFzcyBDb25jcmV0ZUFyYzRDb250cmFjdCBleHRlbmRzIEFyYzRDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIGNhbGxzdWIgdGVzdHMvYXBwcm92YWxzL2luaGVyaXRhbmNlLWEuYWxnby50czo6QXJjNENvbnRyYWN0LmNvbnN0cnVjdG9yCiAgICByZXRzdWIKCgov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YWxnby50czoxNAogICAgLy8gZXhwb3J0IGNsYXNzIENvbmNyZXRlQXJjNENvbnRyYWN0IGV4dGVuZHMgQXJjNENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW5oZXJpdGFuY2UtYi5hbGdvLnRzOjpDb25jcmV0ZUFyYzRDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.clear.teal b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.clear.teal new file mode 100644 index 00000000..4395c80a --- /dev/null +++ b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.ssa.ir b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.ssa.ir index 5ae31081..09ecd7f1 100644 --- a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.ssa.ir +++ b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.ssa.ir @@ -31,10 +31,10 @@ contract tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract: block@2: // getVeryImportantValue_route_L15 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // is not creating + (assert tmp%6#0) // can only call when not creating let to_encode%0#0: bytes = tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.getVeryImportantValue() let length%0#0: uint64 = (len to_encode%0#0) let as_bytes%0#0: bytes = (itob length%0#0) @@ -46,10 +46,10 @@ contract tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract: block@3: // simpleAbiMethod_route_L17 let tmp%8#0: uint64 = (txn OnCompletion) let tmp%9#0: bool = (== tmp%8#0 NoOp) - (assert tmp%9#0) // OnCompletion is NoOp + (assert tmp%9#0) // OnCompletion is not NoOp let tmp%10#0: uint64 = (txn ApplicationID) let tmp%11#0: bool = (!= tmp%10#0 0u) - (assert tmp%11#0) // is not creating + (assert tmp%11#0) // can only call when not creating let tmp%12#0: bytes = (txna ApplicationArgs 1) let tmp%13#0: uint64 = (btoi tmp%12#0) let tmp%14#0: bytes = (txna ApplicationArgs 2) @@ -69,7 +69,7 @@ contract tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract: block@7: // __algots__.defaultCreate_L14 let tmp%18#0: uint64 = (txn ApplicationID) let tmp%19#0: bool = (== tmp%18#0 0u) - (assert tmp%19#0) // is creating + (assert tmp%19#0) // can only call when creating tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.__algots__.defaultCreate() return 1u block@8: // switch_case_default_L14 diff --git a/tests/approvals/out/inheritance-b/ConcreteSimpleContract.approval.teal b/tests/approvals/out/inheritance-b/ConcreteSimpleContract.approval.teal new file mode 100644 index 00000000..cf1072e6 --- /dev/null +++ b/tests/approvals/out/inheritance-b/ConcreteSimpleContract.approval.teal @@ -0,0 +1,57 @@ +#pragma version 10 + +tests/approvals/inheritance-b.algo.ts::ConcreteSimpleContract.approvalProgram: + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/inheritance-b.algo.ts:7 + // const a = op.btoi(Txn.applicationArgs(0)) + pushint 0 // 0 + txnas ApplicationArgs + btoi + // tests/approvals/inheritance-b.algo.ts:8 + // const b = op.btoi(Txn.applicationArgs(1)) + pushint 1 // 1 + txnas ApplicationArgs + btoi + // tests/approvals/inheritance-b.algo.ts:9 + // log(this.simpleMethod(a, b)) + callsub simpleMethod + itob + log + // tests/approvals/inheritance-b.algo.ts:10 + // return 1 + pushint 1 // 1 + return + + +// tests/approvals/inheritance-b.algo.ts::ConcreteSimpleContract.constructor() -> void: +constructor: + // tests/approvals/inheritance-b.algo.ts:5 + // export class ConcreteSimpleContract extends SimpleContract { + proto 0 0 + callsub tests/approvals/inheritance-a.algo.ts::SimpleContract.constructor + retsub + + +// tests/approvals/inheritance-a.algo.ts::SimpleContract.constructor() -> void: +tests/approvals/inheritance-a.algo.ts::SimpleContract.constructor: + // tests/approvals/inheritance-a.algo.ts:4 + // export abstract class SimpleContract extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/inheritance-a.algo.ts::SimpleContract.simpleMethod(a: uint64, b: uint64) -> uint64: +simpleMethod: + // tests/approvals/inheritance-a.algo.ts:6 + // public simpleMethod(a: uint64, b: uint64): uint64 { + proto 2 1 + // tests/approvals/inheritance-a.algo.ts:7 + // return a * b + frame_dig -2 + frame_dig -1 + * + retsub diff --git a/tests/approvals/out/inheritance-b/ConcreteSimpleContract.clear.teal b/tests/approvals/out/inheritance-b/ConcreteSimpleContract.clear.teal new file mode 100644 index 00000000..c267c61a --- /dev/null +++ b/tests/approvals/out/inheritance-b/ConcreteSimpleContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/inheritance-b.algo.ts::ConcreteSimpleContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/inheritance-b/inheritance-b.awst b/tests/approvals/out/inheritance-b/inheritance-b.awst index c049896e..ccd033f3 100644 --- a/tests/approvals/out/inheritance-b/inheritance-b.awst +++ b/tests/approvals/out/inheritance-b/inheritance-b.awst @@ -34,9 +34,8 @@ contract ConcreteSimpleContract void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } @@ -85,11 +84,11 @@ contract ConcreteArc4Contract Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/inheritance-b/inheritance-b.awst.json b/tests/approvals/out/inheritance-b/inheritance-b.awst.json index d2031457..5607391c 100644 --- a/tests/approvals/out/inheritance-b/inheritance-b.awst.json +++ b/tests/approvals/out/inheritance-b/inheritance-b.awst.json @@ -108,8 +108,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -260,11 +259,9 @@ "value": "0", "teal_alias": null } - ], - "comment": null + ] } - ], - "comment": null + ] } }, { @@ -353,11 +350,9 @@ "value": "1", "teal_alias": null } - ], - "comment": null + ] } - ], - "comment": null + ] } }, { @@ -474,11 +469,9 @@ } ] } - ], - "comment": null + ] } - ], - "comment": null + ] } }, { @@ -913,42 +906,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -958,7 +916,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -1011,7 +969,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Contract", @@ -1124,8 +1083,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -1870,7 +1828,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -1912,42 +1905,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1957,7 +1915,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, @@ -2064,6 +2022,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst.json b/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst.json index a436886f..bfb59afb 100644 --- a/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst.json +++ b/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst.json @@ -165,8 +165,7 @@ "value": "1", "teal_alias": null } - ], - "comment": null + ] } }, { @@ -271,8 +270,7 @@ "value": "9", "teal_alias": null } - ], - "comment": null + ] } }, { @@ -339,8 +337,7 @@ }, "name": "x" } - ], - "comment": null + ] } }, { @@ -407,8 +404,7 @@ }, "name": "z" } - ], - "comment": null + ] } } ], diff --git a/tests/approvals/out/itxn/ItxnDemoContract.approval.teal b/tests/approvals/out/itxn/ItxnDemoContract.approval.teal new file mode 100644 index 00000000..619c0109 --- /dev/null +++ b/tests/approvals/out/itxn/ItxnDemoContract.approval.teal @@ -0,0 +1,538 @@ +#pragma version 10 + +tests/approvals/itxn.algo.ts::ItxnDemoContract.approvalProgram: + intcblock 0 3 1 1000 + bytecblock "name" "unit" 0x098101 "AST1" "AST2" "AST3" "3rd" "with args param set" "\t\xc2\x81\x01" + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/itxn.algo.ts:11 + // if (Txn.numAppArgs) { + txn NumAppArgs + bz main_after_if_else@15 + // tests/approvals/itxn.algo.ts:12 + // switch (Txn.applicationArgs(0)) { + intc_0 // 0 + txnas ApplicationArgs + // tests/approvals/itxn.algo.ts:13 + // case Bytes('test1'): + pushbytes "test1" + // tests/approvals/itxn.algo.ts:16 + // case Bytes('test2'): + pushbytes "test2" + // tests/approvals/itxn.algo.ts:19 + // case Bytes('test3'): + pushbytes "test3" + // tests/approvals/itxn.algo.ts:20 + // case Bytes('test4'): + pushbytes "test4" + // tests/approvals/itxn.algo.ts:12-22 + // switch (Txn.applicationArgs(0)) { + // case Bytes('test1'): + // this.test1() + // break + // case Bytes('test2'): + // this.test2() + // break + // case Bytes('test3'): + // case Bytes('test4'): + // break + // } + uncover 4 + match main_switch_case_0@4 main_switch_case_1@6 main_switch_case_2@8 main_switch_case_3@10 + b main_switch_case_default@12 + +main_switch_case_0@4: + // tests/approvals/itxn.algo.ts:14 + // this.test1() + callsub test1 + // tests/approvals/itxn.algo.ts:15 + // break + b main_block@14 + +main_switch_case_1@6: + // tests/approvals/itxn.algo.ts:17 + // this.test2() + callsub test2 + // tests/approvals/itxn.algo.ts:18 + // break + b main_block@14 + +main_switch_case_2@8: + // tests/approvals/itxn.algo.ts:19 + // case Bytes('test3'): + b main_block@11 + +main_switch_case_3@10: + +main_block@11: + // tests/approvals/itxn.algo.ts:21 + // break + b main_block@14 + +main_switch_case_default@12: + +main_block@14: + +main_after_if_else@15: + // tests/approvals/itxn.algo.ts:24 + // return true + intc_2 // 1 + return + + +// tests/approvals/itxn.algo.ts::ItxnDemoContract.constructor() -> void: +constructor: + // tests/approvals/itxn.algo.ts:7 + // export class ItxnDemoContract extends BaseContract { + proto 0 0 + // tests/approvals/itxn.algo.ts:8 + // name = GlobalState({ initialValue: Bytes() }) + bytec_0 // "name" + pushbytes 0x + app_global_put + retsub + + +// tests/approvals/itxn.algo.ts::ItxnDemoContract.test1() -> void: +test1: + // tests/approvals/itxn.algo.ts:27 + // private test1() { + proto 0 0 + intc_0 // 0 + // tests/approvals/itxn.algo.ts:8 + // name = GlobalState({ initialValue: Bytes() }) + bytec_0 // "name" + // tests/approvals/itxn.algo.ts:28 + // this.name.value = Bytes('AST1') + bytec_3 // "AST1" + app_global_put + // tests/approvals/itxn.algo.ts:32 + // assetName: this.name.value, + intc_0 // 0 + // tests/approvals/itxn.algo.ts:8 + // name = GlobalState({ initialValue: Bytes() }) + bytec_0 // "name" + // tests/approvals/itxn.algo.ts:32 + // assetName: this.name.value, + app_global_get_ex + assert // check GlobalState exists + // tests/approvals/itxn.algo.ts:35 + // manager: Global.currentApplicationAddress, + global CurrentApplicationAddress + dup + cover 2 + // tests/approvals/itxn.algo.ts:36 + // reserve: Global.currentApplicationAddress, + global CurrentApplicationAddress + dup + cover 3 + // tests/approvals/itxn.algo.ts:8 + // name = GlobalState({ initialValue: Bytes() }) + bytec_0 // "name" + // tests/approvals/itxn.algo.ts:39 + // this.name.value = Bytes('AST2') + bytec 4 // "AST2" + app_global_put + // tests/approvals/itxn.algo.ts:40 + // const asset1_txn = assetParams.submit() + itxn_begin + itxn_field ConfigAssetReserve + itxn_field ConfigAssetManager + // tests/approvals/itxn.algo.ts:34 + // decimals: 3, + intc_1 // 3 + itxn_field ConfigAssetDecimals + // tests/approvals/itxn.algo.ts:33 + // unitName: 'unit', + bytec_1 // "unit" + itxn_field ConfigAssetUnitName + itxn_field ConfigAssetName + // tests/approvals/itxn.algo.ts:31 + // total: 1000, + intc_3 // 1000 + itxn_field ConfigAssetTotal + // tests/approvals/itxn.algo.ts:30-37 + // const assetParams = itxn.assetConfig({ + // total: 1000, + // assetName: this.name.value, + // unitName: 'unit', + // decimals: 3, + // manager: Global.currentApplicationAddress, + // reserve: Global.currentApplicationAddress, + // }) + intc_1 // 3 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:40 + // const asset1_txn = assetParams.submit() + itxn_submit + itxn ConfigAssetName + frame_bury 0 + itxn CreatedAssetID + // tests/approvals/itxn.algo.ts:42 + // assetName: this.name.value, + intc_0 // 0 + // tests/approvals/itxn.algo.ts:8 + // name = GlobalState({ initialValue: Bytes() }) + bytec_0 // "name" + // tests/approvals/itxn.algo.ts:42 + // assetName: this.name.value, + app_global_get_ex + assert // check GlobalState exists + // tests/approvals/itxn.algo.ts:44 + // const asset2_txn = assetParams.submit() + itxn_begin + frame_dig 2 + itxn_field ConfigAssetReserve + frame_dig 1 + itxn_field ConfigAssetManager + // tests/approvals/itxn.algo.ts:34 + // decimals: 3, + intc_1 // 3 + itxn_field ConfigAssetDecimals + // tests/approvals/itxn.algo.ts:33 + // unitName: 'unit', + bytec_1 // "unit" + itxn_field ConfigAssetUnitName + itxn_field ConfigAssetName + // tests/approvals/itxn.algo.ts:31 + // total: 1000, + intc_3 // 1000 + itxn_field ConfigAssetTotal + // tests/approvals/itxn.algo.ts:30-37 + // const assetParams = itxn.assetConfig({ + // total: 1000, + // assetName: this.name.value, + // unitName: 'unit', + // decimals: 3, + // manager: Global.currentApplicationAddress, + // reserve: Global.currentApplicationAddress, + // }) + intc_1 // 3 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:44 + // const asset2_txn = assetParams.submit() + itxn_submit + itxn ConfigAssetName + itxn CreatedAssetID + swap + // tests/approvals/itxn.algo.ts:46 + // assert(asset1_txn.assetName === Bytes('AST1'), 'asset1_txn is correct') + frame_dig 0 + bytec_3 // "AST1" + == + assert // asset1_txn is correct + // tests/approvals/itxn.algo.ts:47 + // assert(asset2_txn.assetName === Bytes('AST2'), 'asset2_txn is correct') + bytec 4 // "AST2" + == + assert // asset2_txn is correct + // tests/approvals/itxn.algo.ts:48 + // assert(asset1_txn.createdAsset.name === Bytes('AST1'), 'created asset 1 is correct') + swap + asset_params_get AssetName + assert // asset exists + bytec_3 // "AST1" + == + assert // created asset 1 is correct + // tests/approvals/itxn.algo.ts:49 + // assert(asset2_txn.createdAsset.name === Bytes('AST2'), 'created asset 2 is correct') + asset_params_get AssetName + assert // asset exists + bytec 4 // "AST2" + == + assert // created asset 2 is correct + // tests/approvals/itxn.algo.ts:61 + // const [appCreateTxn, asset3_txn] = itxn.submitGroup(appCreateParams, assetParams) + itxn_begin + // tests/approvals/itxn.algo.ts:53 + // clearStateProgram: Bytes.fromHex('098101'), + bytec_2 // 0x098101 + itxn_field ClearStateProgramPages + // tests/approvals/itxn.algo.ts:52 + // approvalProgram: Bytes.fromHex('098101'), + bytec_2 // 0x098101 + itxn_field ApprovalProgramPages + // tests/approvals/itxn.algo.ts:51-55 + // const appCreateParams = itxn.applicationCall({ + // approvalProgram: Bytes.fromHex('098101'), + // clearStateProgram: Bytes.fromHex('098101'), + // fee: 0, + // }) + pushint 6 // 6 + itxn_field TypeEnum + // tests/approvals/itxn.algo.ts:54 + // fee: 0, + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:61 + // const [appCreateTxn, asset3_txn] = itxn.submitGroup(appCreateParams, assetParams) + itxn_next + frame_dig 2 + itxn_field ConfigAssetReserve + frame_dig 1 + itxn_field ConfigAssetManager + // tests/approvals/itxn.algo.ts:34 + // decimals: 3, + intc_1 // 3 + itxn_field ConfigAssetDecimals + // tests/approvals/itxn.algo.ts:33 + // unitName: 'unit', + bytec_1 // "unit" + itxn_field ConfigAssetUnitName + // tests/approvals/itxn.algo.ts:58 + // assetName: 'AST3', + bytec 5 // "AST3" + itxn_field ConfigAssetName + // tests/approvals/itxn.algo.ts:31 + // total: 1000, + intc_3 // 1000 + itxn_field ConfigAssetTotal + // tests/approvals/itxn.algo.ts:30-37 + // const assetParams = itxn.assetConfig({ + // total: 1000, + // assetName: this.name.value, + // unitName: 'unit', + // decimals: 3, + // manager: Global.currentApplicationAddress, + // reserve: Global.currentApplicationAddress, + // }) + intc_1 // 3 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:61 + // const [appCreateTxn, asset3_txn] = itxn.submitGroup(appCreateParams, assetParams) + itxn_submit + gitxn 0 ApplicationID + itxn ConfigAssetName + swap + // tests/approvals/itxn.algo.ts:63 + // assert(appCreateTxn.appId, 'app is created') + assert // app is created + // tests/approvals/itxn.algo.ts:64 + // assert(asset3_txn.assetName === Bytes('AST3'), 'asset3_txn is correct') + bytec 5 // "AST3" + == + assert // asset3_txn is correct + // tests/approvals/itxn.algo.ts:72 + // itxn.submitGroup(appCreateParams, assetParams) + itxn_begin + // tests/approvals/itxn.algo.ts:67 + // note: '3rd', + intc_2 // 1 + dup + >= + // tests/approvals/itxn.algo.ts:72 + // itxn.submitGroup(appCreateParams, assetParams) + bz test1_next_field@6 + // tests/approvals/itxn.algo.ts:67 + // note: '3rd', + bytec 6 // "3rd" + itxn_field Note + +test1_next_field@6: + // tests/approvals/itxn.algo.ts:53 + // clearStateProgram: Bytes.fromHex('098101'), + bytec_2 // 0x098101 + itxn_field ClearStateProgramPages + // tests/approvals/itxn.algo.ts:52 + // approvalProgram: Bytes.fromHex('098101'), + bytec_2 // 0x098101 + itxn_field ApprovalProgramPages + // tests/approvals/itxn.algo.ts:51-55 + // const appCreateParams = itxn.applicationCall({ + // approvalProgram: Bytes.fromHex('098101'), + // clearStateProgram: Bytes.fromHex('098101'), + // fee: 0, + // }) + pushint 6 // 6 + itxn_field TypeEnum + // tests/approvals/itxn.algo.ts:54 + // fee: 0, + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:72 + // itxn.submitGroup(appCreateParams, assetParams) + itxn_next + // tests/approvals/itxn.algo.ts:70 + // note: '3rd', + intc_2 // 1 + dup + >= + // tests/approvals/itxn.algo.ts:72 + // itxn.submitGroup(appCreateParams, assetParams) + bz test1_next_field@9 + // tests/approvals/itxn.algo.ts:70 + // note: '3rd', + bytec 6 // "3rd" + itxn_field Note + +test1_next_field@9: + frame_dig 2 + itxn_field ConfigAssetReserve + frame_dig 1 + itxn_field ConfigAssetManager + // tests/approvals/itxn.algo.ts:34 + // decimals: 3, + intc_1 // 3 + itxn_field ConfigAssetDecimals + // tests/approvals/itxn.algo.ts:33 + // unitName: 'unit', + bytec_1 // "unit" + itxn_field ConfigAssetUnitName + // tests/approvals/itxn.algo.ts:58 + // assetName: 'AST3', + bytec 5 // "AST3" + itxn_field ConfigAssetName + // tests/approvals/itxn.algo.ts:31 + // total: 1000, + intc_3 // 1000 + itxn_field ConfigAssetTotal + // tests/approvals/itxn.algo.ts:30-37 + // const assetParams = itxn.assetConfig({ + // total: 1000, + // assetName: this.name.value, + // unitName: 'unit', + // decimals: 3, + // manager: Global.currentApplicationAddress, + // reserve: Global.currentApplicationAddress, + // }) + intc_1 // 3 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:72 + // itxn.submitGroup(appCreateParams, assetParams) + itxn_submit + retsub + + +// tests/approvals/itxn.algo.ts::ItxnDemoContract.test2() -> void: +test2: + // tests/approvals/itxn.algo.ts:75 + // private test2() { + proto 0 0 + intc_0 // 0 + dupn 2 + pushbytes "" + dupn 2 + // tests/approvals/itxn.algo.ts:77 + // if (Txn.numAppArgs) { + txn NumAppArgs + bz test2_else_body@2 + // tests/approvals/itxn.algo.ts:78 + // const args = [Bytes('1'), Bytes('2')] as const + pushbytes "1" + frame_bury 0 + pushbytes "2" + frame_bury 1 + // tests/approvals/itxn.algo.ts:82 + // appArgs: args, + pushint 2 // 2 + frame_bury 3 + // tests/approvals/itxn.algo.ts:83 + // onCompletion: OnCompleteAction.NoOp, + intc_0 // 0 + frame_bury 5 + intc_2 // 1 + frame_bury 4 + // tests/approvals/itxn.algo.ts:84 + // note: 'with args param set', + bytec 7 // "with args param set" + b test2_after_if_else@3 + +test2_else_body@2: + // tests/approvals/itxn.algo.ts:90 + // appArgs: [Bytes('3'), '4', Bytes('5')], + pushbytes "3" + frame_bury 0 + pushbytes "4" + frame_bury 1 + pushbytes "5" + frame_bury 2 + intc_1 // 3 + frame_bury 3 + // tests/approvals/itxn.algo.ts:91 + // note: 'no args param set', + pushbytes "no args param set" + // tests/approvals/itxn.algo.ts:87 + // createAppParams = itxn.applicationCall({ + intc_0 // 0 + frame_bury 4 + +test2_after_if_else@3: + // tests/approvals/itxn.algo.ts:94 + // const createAppTxn = createAppParams.submit() + itxn_begin + itxn_field Note + frame_dig 4 + intc_2 // 1 + >= + bz test2_next_field@5 + frame_dig 5 + itxn_field OnCompletion + +test2_next_field@5: + frame_dig 0 + itxn_field ApplicationArgs + frame_dig 1 + itxn_field ApplicationArgs + frame_dig 3 + intc_1 // 3 + >= + // tests/approvals/itxn.algo.ts:94 + // const createAppTxn = createAppParams.submit() + bz test2_next_field@7 + frame_dig 2 + itxn_field ApplicationArgs + +test2_next_field@7: + // tests/approvals/itxn.algo.ts:5 + // const APPROVE = Bytes('\x09\x81\x01') + bytec 8 // "\t\xc2\x81\x01" + itxn_field ClearStateProgramPages + bytec 8 // "\t\xc2\x81\x01" + itxn_field ApprovalProgramPages + // tests/approvals/itxn.algo.ts:79-85 + // createAppParams = itxn.applicationCall({ + // approvalProgram: APPROVE, + // clearStateProgram: APPROVE, + // appArgs: args, + // onCompletion: OnCompleteAction.NoOp, + // note: 'with args param set', + // }) + pushint 6 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:94 + // const createAppTxn = createAppParams.submit() + itxn_submit + itxn Note + // tests/approvals/itxn.algo.ts:95 + // assert(createAppTxn.appArgs(0) === Bytes('1'), 'correct args used 1') + intc_0 // 0 + itxnas ApplicationArgs + pushbytes "1" + == + assert // correct args used 1 + // tests/approvals/itxn.algo.ts:96 + // assert(createAppTxn.appArgs(1) === Bytes('2'), 'correct args used 2') + intc_2 // 1 + itxnas ApplicationArgs + pushbytes "2" + == + assert // correct args used 2 + // tests/approvals/itxn.algo.ts:97 + // assert(createAppTxn.note === Bytes('with args param set')) + bytec 7 // "with args param set" + == + assert + retsub diff --git a/tests/approvals/out/itxn/ItxnDemoContract.clear.teal b/tests/approvals/out/itxn/ItxnDemoContract.clear.teal new file mode 100644 index 00000000..e2af30bc --- /dev/null +++ b/tests/approvals/out/itxn/ItxnDemoContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/itxn.algo.ts::ItxnDemoContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/itxn/ItxnDemoContract.ssa.ir b/tests/approvals/out/itxn/ItxnDemoContract.ssa.ir index bc09e847..07e7e820 100644 --- a/tests/approvals/out/itxn/ItxnDemoContract.ssa.ir +++ b/tests/approvals/out/itxn/ItxnDemoContract.ssa.ir @@ -51,6 +51,8 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let assetParams#0: itxn_field_set = itxn_field_set(0) let assetParams%%param_Fee_idx_0#0: uint64 = 0u let assetParams%%Fee_length#0: uint64 = 1u + let assetParams%%param_TypeEnum_idx_0#0: uint64 = 3u + let assetParams%%TypeEnum_length#0: uint64 = 1u let assetParams%%param_ConfigAssetTotal_idx_0#0: uint64 = 1000u let assetParams%%ConfigAssetTotal_length#0: uint64 = 1u let (maybe_value%0#0: bytes, maybe_exists%0#0: bool) = (app_global_get_ex 0u "name") @@ -76,7 +78,6 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let assetParams%%VoteLast_length#0: uint64 = 0u let assetParams%%VoteKeyDilution_length#0: uint64 = 0u let assetParams%%Type_length#0: uint64 = 0u - let assetParams%%TypeEnum_length#0: uint64 = 0u let assetParams%%XferAsset_length#0: uint64 = 0u let assetParams%%AssetAmount_length#0: uint64 = 0u let assetParams%%AssetSender_length#0: uint64 = 0u @@ -117,6 +118,7 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: ((itxn_field ConfigAssetUnitName) assetParams%%param_ConfigAssetUnitName_idx_0#0) ((itxn_field ConfigAssetName) assetParams%%param_ConfigAssetName_idx_0#0) ((itxn_field ConfigAssetTotal) assetParams%%param_ConfigAssetTotal_idx_0#0) + ((itxn_field TypeEnum) assetParams%%param_TypeEnum_idx_0#0) ((itxn_field Fee) assetParams%%param_Fee_idx_0#0) goto block@1 block@1: // next_txn_L40 @@ -196,6 +198,7 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: ((itxn_field ConfigAssetUnitName) assetParams%%param_ConfigAssetUnitName_idx_0#0) ((itxn_field ConfigAssetName) assetParams%%param_ConfigAssetName_idx_0#1) ((itxn_field ConfigAssetTotal) assetParams%%param_ConfigAssetTotal_idx_0#0) + ((itxn_field TypeEnum) assetParams%%param_TypeEnum_idx_0#0) ((itxn_field Fee) assetParams%%param_Fee_idx_0#0) goto block@2 block@2: // next_txn_L44 @@ -278,10 +281,12 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let appCreateParams#0: itxn_field_set = itxn_field_set(2) let appCreateParams%%param_Fee_idx_0#0: uint64 = 0u let appCreateParams%%Fee_length#0: uint64 = 1u - let appCreateParams%%param_ApprovalProgram_idx_0#0: bytes = 0x098101 - let appCreateParams%%ApprovalProgram_length#0: uint64 = 1u - let appCreateParams%%param_ClearStateProgram_idx_0#0: bytes = 0x098101 - let appCreateParams%%ClearStateProgram_length#0: uint64 = 1u + let appCreateParams%%param_TypeEnum_idx_0#0: uint64 = 6u + let appCreateParams%%TypeEnum_length#0: uint64 = 1u + let appCreateParams%%param_ApprovalProgramPages_idx_0#0: bytes = 0x098101 + let appCreateParams%%ApprovalProgramPages_length#0: uint64 = 1u + let appCreateParams%%param_ClearStateProgramPages_idx_0#0: bytes = 0x098101 + let appCreateParams%%ClearStateProgramPages_length#0: uint64 = 1u let appCreateParams%%Sender_length#0: uint64 = 0u let appCreateParams%%Note_length#0: uint64 = 0u let appCreateParams%%Receiver_length#0: uint64 = 0u @@ -293,7 +298,6 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let appCreateParams%%VoteLast_length#0: uint64 = 0u let appCreateParams%%VoteKeyDilution_length#0: uint64 = 0u let appCreateParams%%Type_length#0: uint64 = 0u - let appCreateParams%%TypeEnum_length#0: uint64 = 0u let appCreateParams%%XferAsset_length#0: uint64 = 0u let appCreateParams%%AssetAmount_length#0: uint64 = 0u let appCreateParams%%AssetSender_length#0: uint64 = 0u @@ -301,6 +305,8 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let appCreateParams%%AssetCloseTo_length#0: uint64 = 0u let appCreateParams%%ApplicationID_length#0: uint64 = 0u let appCreateParams%%OnCompletion_length#0: uint64 = 0u + let appCreateParams%%ApprovalProgram_length#0: uint64 = 0u + let appCreateParams%%ClearStateProgram_length#0: uint64 = 0u let appCreateParams%%RekeyTo_length#0: uint64 = 0u let appCreateParams%%ConfigAsset_length#0: uint64 = 0u let appCreateParams%%ConfigAssetTotal_length#0: uint64 = 0u @@ -328,14 +334,13 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let appCreateParams%%Accounts_length#0: uint64 = 0u let appCreateParams%%Assets_length#0: uint64 = 0u let appCreateParams%%Applications_length#0: uint64 = 0u - let appCreateParams%%ApprovalProgramPages_length#0: uint64 = 0u - let appCreateParams%%ClearStateProgramPages_length#0: uint64 = 0u let assetParams#2: itxn_field_set = itxn_field_set(3) let assetParams%%param_ConfigAssetName_idx_0#2: bytes = "AST3" let assetParams%%ConfigAssetName_length#2: uint64 = 1u itxn_begin - ((itxn_field ClearStateProgram) appCreateParams%%param_ClearStateProgram_idx_0#0) - ((itxn_field ApprovalProgram) appCreateParams%%param_ApprovalProgram_idx_0#0) + ((itxn_field ClearStateProgramPages) appCreateParams%%param_ClearStateProgramPages_idx_0#0) + ((itxn_field ApprovalProgramPages) appCreateParams%%param_ApprovalProgramPages_idx_0#0) + ((itxn_field TypeEnum) appCreateParams%%param_TypeEnum_idx_0#0) ((itxn_field Fee) appCreateParams%%param_Fee_idx_0#0) goto block@3 block@3: // next_txn_L61 @@ -346,6 +351,7 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: ((itxn_field ConfigAssetUnitName) assetParams%%param_ConfigAssetUnitName_idx_0#0) ((itxn_field ConfigAssetName) assetParams%%param_ConfigAssetName_idx_0#2) ((itxn_field ConfigAssetTotal) assetParams%%param_ConfigAssetTotal_idx_0#0) + ((itxn_field TypeEnum) assetParams%%param_TypeEnum_idx_0#0) ((itxn_field Fee) assetParams%%param_Fee_idx_0#0) goto block@4 block@4: // next_txn_L61 @@ -493,8 +499,9 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: ((itxn_field Note) appCreateParams%%param_Note_idx_0#0) goto block@6 block@6: // next_field_L72 - ((itxn_field ClearStateProgram) appCreateParams%%param_ClearStateProgram_idx_0#0) - ((itxn_field ApprovalProgram) appCreateParams%%param_ApprovalProgram_idx_0#0) + ((itxn_field ClearStateProgramPages) appCreateParams%%param_ClearStateProgramPages_idx_0#0) + ((itxn_field ApprovalProgramPages) appCreateParams%%param_ApprovalProgramPages_idx_0#0) + ((itxn_field TypeEnum) appCreateParams%%param_TypeEnum_idx_0#0) ((itxn_field Fee) appCreateParams%%param_Fee_idx_0#0) goto block@7 block@7: // next_txn_L72 @@ -511,6 +518,7 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: ((itxn_field ConfigAssetUnitName) assetParams%%param_ConfigAssetUnitName_idx_0#0) ((itxn_field ConfigAssetName) assetParams%%param_ConfigAssetName_idx_0#2) ((itxn_field ConfigAssetTotal) assetParams%%param_ConfigAssetTotal_idx_0#0) + ((itxn_field TypeEnum) assetParams%%param_TypeEnum_idx_0#0) ((itxn_field Fee) assetParams%%param_Fee_idx_0#0) goto block@10 block@10: // next_txn_L72 @@ -528,10 +536,12 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams#0: itxn_field_set = itxn_field_set(0) let createAppParams%%param_Fee_idx_0#0: uint64 = 0u let createAppParams%%Fee_length#0: uint64 = 1u - let createAppParams%%param_ApprovalProgram_idx_0#0: bytes = "\t\xc2\x81\x01" - let createAppParams%%ApprovalProgram_length#0: uint64 = 1u - let createAppParams%%param_ClearStateProgram_idx_0#0: bytes = "\t\xc2\x81\x01" - let createAppParams%%ClearStateProgram_length#0: uint64 = 1u + let createAppParams%%param_TypeEnum_idx_0#0: uint64 = 6u + let createAppParams%%TypeEnum_length#0: uint64 = 1u + let createAppParams%%param_ApprovalProgramPages_idx_0#0: bytes = "\t\xc2\x81\x01" + let createAppParams%%ApprovalProgramPages_length#0: uint64 = 1u + let createAppParams%%param_ClearStateProgramPages_idx_0#0: bytes = "\t\xc2\x81\x01" + let createAppParams%%ClearStateProgramPages_length#0: uint64 = 1u let createAppParams%%param_ApplicationArgs_idx_0#0: bytes = args.0#0 let createAppParams%%param_ApplicationArgs_idx_1#0: bytes = args.1#0 let createAppParams%%ApplicationArgs_length#0: uint64 = 2u @@ -549,13 +559,14 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams%%VoteLast_length#0: uint64 = 0u let createAppParams%%VoteKeyDilution_length#0: uint64 = 0u let createAppParams%%Type_length#0: uint64 = 0u - let createAppParams%%TypeEnum_length#0: uint64 = 0u let createAppParams%%XferAsset_length#0: uint64 = 0u let createAppParams%%AssetAmount_length#0: uint64 = 0u let createAppParams%%AssetSender_length#0: uint64 = 0u let createAppParams%%AssetReceiver_length#0: uint64 = 0u let createAppParams%%AssetCloseTo_length#0: uint64 = 0u let createAppParams%%ApplicationID_length#0: uint64 = 0u + let createAppParams%%ApprovalProgram_length#0: uint64 = 0u + let createAppParams%%ClearStateProgram_length#0: uint64 = 0u let createAppParams%%RekeyTo_length#0: uint64 = 0u let createAppParams%%ConfigAsset_length#0: uint64 = 0u let createAppParams%%ConfigAssetTotal_length#0: uint64 = 0u @@ -582,17 +593,17 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams%%Accounts_length#0: uint64 = 0u let createAppParams%%Assets_length#0: uint64 = 0u let createAppParams%%Applications_length#0: uint64 = 0u - let createAppParams%%ApprovalProgramPages_length#0: uint64 = 0u - let createAppParams%%ClearStateProgramPages_length#0: uint64 = 0u goto block@3 block@2: // else_body_L86 let createAppParams#1: itxn_field_set = itxn_field_set(1) let createAppParams%%param_Fee_idx_0#1: uint64 = 0u let createAppParams%%Fee_length#1: uint64 = 1u - let createAppParams%%param_ApprovalProgram_idx_0#1: bytes = "\t\xc2\x81\x01" - let createAppParams%%ApprovalProgram_length#1: uint64 = 1u - let createAppParams%%param_ClearStateProgram_idx_0#1: bytes = "\t\xc2\x81\x01" - let createAppParams%%ClearStateProgram_length#1: uint64 = 1u + let createAppParams%%param_TypeEnum_idx_0#1: uint64 = 6u + let createAppParams%%TypeEnum_length#1: uint64 = 1u + let createAppParams%%param_ApprovalProgramPages_idx_0#1: bytes = "\t\xc2\x81\x01" + let createAppParams%%ApprovalProgramPages_length#1: uint64 = 1u + let createAppParams%%param_ClearStateProgramPages_idx_0#1: bytes = "\t\xc2\x81\x01" + let createAppParams%%ClearStateProgramPages_length#1: uint64 = 1u let createAppParams%%param_ApplicationArgs_idx_0#1: bytes = "3" let createAppParams%%param_ApplicationArgs_idx_1#1: bytes = "4" let createAppParams%%param_ApplicationArgs_idx_2#0: bytes = "5" @@ -609,7 +620,6 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams%%VoteLast_length#1: uint64 = 0u let createAppParams%%VoteKeyDilution_length#1: uint64 = 0u let createAppParams%%Type_length#1: uint64 = 0u - let createAppParams%%TypeEnum_length#1: uint64 = 0u let createAppParams%%XferAsset_length#1: uint64 = 0u let createAppParams%%AssetAmount_length#1: uint64 = 0u let createAppParams%%AssetSender_length#1: uint64 = 0u @@ -617,6 +627,8 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams%%AssetCloseTo_length#1: uint64 = 0u let createAppParams%%ApplicationID_length#1: uint64 = 0u let createAppParams%%OnCompletion_length#1: uint64 = 0u + let createAppParams%%ApprovalProgram_length#1: uint64 = 0u + let createAppParams%%ClearStateProgram_length#1: uint64 = 0u let createAppParams%%RekeyTo_length#1: uint64 = 0u let createAppParams%%ConfigAsset_length#1: uint64 = 0u let createAppParams%%ConfigAssetTotal_length#1: uint64 = 0u @@ -643,8 +655,6 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams%%Accounts_length#1: uint64 = 0u let createAppParams%%Assets_length#1: uint64 = 0u let createAppParams%%Applications_length#1: uint64 = 0u - let createAppParams%%ApprovalProgramPages_length#1: uint64 = 0u - let createAppParams%%ClearStateProgramPages_length#1: uint64 = 0u goto block@3 block@3: // after_if_else_L77 let createAppParams%%param_Note_idx_0#2: bytes = φ(createAppParams%%param_Note_idx_0#0 <- block@1, createAppParams%%param_Note_idx_0#1 <- block@2) @@ -654,8 +664,9 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams%%param_ApplicationArgs_idx_1#3: bytes = φ(createAppParams%%param_ApplicationArgs_idx_1#0 <- block@1, createAppParams%%param_ApplicationArgs_idx_1#1 <- block@2) let createAppParams%%ApplicationArgs_length#3: uint64 = φ(createAppParams%%ApplicationArgs_length#0 <- block@1, createAppParams%%ApplicationArgs_length#1 <- block@2) let createAppParams%%param_ApplicationArgs_idx_2#2: bytes = φ(createAppParams%%param_ApplicationArgs_idx_2#3 <- block@1, createAppParams%%param_ApplicationArgs_idx_2#0 <- block@2) - let createAppParams%%param_ClearStateProgram_idx_0#4: bytes = φ(createAppParams%%param_ClearStateProgram_idx_0#0 <- block@1, createAppParams%%param_ClearStateProgram_idx_0#1 <- block@2) - let createAppParams%%param_ApprovalProgram_idx_0#4: bytes = φ(createAppParams%%param_ApprovalProgram_idx_0#0 <- block@1, createAppParams%%param_ApprovalProgram_idx_0#1 <- block@2) + let createAppParams%%param_ClearStateProgramPages_idx_0#4: bytes = φ(createAppParams%%param_ClearStateProgramPages_idx_0#0 <- block@1, createAppParams%%param_ClearStateProgramPages_idx_0#1 <- block@2) + let createAppParams%%param_ApprovalProgramPages_idx_0#4: bytes = φ(createAppParams%%param_ApprovalProgramPages_idx_0#0 <- block@1, createAppParams%%param_ApprovalProgramPages_idx_0#1 <- block@2) + let createAppParams%%param_TypeEnum_idx_0#4: uint64 = φ(createAppParams%%param_TypeEnum_idx_0#0 <- block@1, createAppParams%%param_TypeEnum_idx_0#1 <- block@2) let createAppParams%%param_Fee_idx_0#4: uint64 = φ(createAppParams%%param_Fee_idx_0#0 <- block@1, createAppParams%%param_Fee_idx_0#1 <- block@2) itxn_begin ((itxn_field Note) createAppParams%%param_Note_idx_0#2) @@ -673,8 +684,9 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: ((itxn_field ApplicationArgs) createAppParams%%param_ApplicationArgs_idx_2#2) goto block@7 block@7: // next_field_L94 - ((itxn_field ClearStateProgram) createAppParams%%param_ClearStateProgram_idx_0#4) - ((itxn_field ApprovalProgram) createAppParams%%param_ApprovalProgram_idx_0#4) + ((itxn_field ClearStateProgramPages) createAppParams%%param_ClearStateProgramPages_idx_0#4) + ((itxn_field ApprovalProgramPages) createAppParams%%param_ApprovalProgramPages_idx_0#4) + ((itxn_field TypeEnum) createAppParams%%param_TypeEnum_idx_0#4) ((itxn_field Fee) createAppParams%%param_Fee_idx_0#4) goto block@8 block@8: // next_txn_L94 diff --git a/tests/approvals/out/itxn/itxn.awst b/tests/approvals/out/itxn/itxn.awst index ee7459d8..9c7d307c 100644 --- a/tests/approvals/out/itxn/itxn.awst +++ b/tests/approvals/out/itxn/itxn.awst @@ -38,20 +38,20 @@ contract ItxnDemoContract test1(): void { GlobalState["name"]: bytes = "AST1" - assetParams: inner_transaction_fields_acfg = create_inner_transaction(Fee=0, ConfigAssetTotal=1000, ConfigAssetName=GlobalState["name"], ConfigAssetUnitName="unit", ConfigAssetDecimals=3, ConfigAssetManager=global(), ConfigAssetReserve=global()) + assetParams: inner_transaction_fields_acfg = create_inner_transaction(Fee=0, TypeEnum=3, ConfigAssetTotal=1000, ConfigAssetName=GlobalState["name"], ConfigAssetUnitName="unit", ConfigAssetDecimals=3, ConfigAssetManager=global(), ConfigAssetReserve=global()) GlobalState["name"]: bytes = "AST2" asset1_txn: inner_transaction_acfg = submit_txn(assetParams) update_inner_transaction(assetParams, ConfigAssetName=GlobalState["name"]) asset2_txn: inner_transaction_acfg = submit_txn(assetParams) - assert(asset1_txn.ConfigAssetName == "AST1") - assert(asset2_txn.ConfigAssetName == "AST2") - assert(checked_maybe(asset_params_get(asset1_txn.CreatedAssetID), comment=asset exists) == "AST1") - assert(checked_maybe(asset_params_get(asset2_txn.CreatedAssetID), comment=asset exists) == "AST2") - appCreateParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=0x098101, ClearStateProgram=0x098101) + assert(asset1_txn.ConfigAssetName == "AST1", comment=asset1_txn is correct) + assert(asset2_txn.ConfigAssetName == "AST2", comment=asset2_txn is correct) + assert(checked_maybe(asset_params_get(asset1_txn.CreatedAssetID), comment=asset exists) == "AST1", comment=created asset 1 is correct) + assert(checked_maybe(asset_params_get(asset2_txn.CreatedAssetID), comment=asset exists) == "AST2", comment=created asset 2 is correct) + appCreateParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, TypeEnum=6, ApprovalProgramPages=[0x098101], ClearStateProgramPages=[0x098101]) update_inner_transaction(assetParams, ConfigAssetName="AST3") [appCreateTxn, asset3_txn]: readonlytuple[inner_transaction_appl, inner_transaction_acfg] = submit_txn(appCreateParams, assetParams) - assert(Boolean(appCreateTxn.ApplicationID)) - assert(asset3_txn.ConfigAssetName == "AST3") + assert(Boolean(appCreateTxn.ApplicationID), comment=app is created) + assert(asset3_txn.ConfigAssetName == "AST3", comment=asset3_txn is correct) update_inner_transaction(appCreateParams, Note="3rd") update_inner_transaction(assetParams, Note="3rd") submit_txn(appCreateParams, assetParams) @@ -61,13 +61,13 @@ contract ItxnDemoContract { if (Boolean(txn())) { args: readonlytuple[bytes, bytes] = ["1", "2"] - createAppParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=" ", ClearStateProgram=" ", ApplicationArgs=[args.0, args.1], OnCompletion=0, Note="with args param set") + createAppParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, TypeEnum=6, ApprovalProgramPages=[" "], ClearStateProgramPages=[" "], ApplicationArgs=[args.0, args.1], OnCompletion=0, Note="with args param set") } else { - createAppParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=" ", ClearStateProgram=" ", ApplicationArgs=["3", "4", "5"], Note="no args param set") + createAppParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, TypeEnum=6, ApprovalProgramPages=[" "], ClearStateProgramPages=[" "], ApplicationArgs=["3", "4", "5"], Note="no args param set") } createAppTxn: inner_transaction_appl = submit_txn(createAppParams) - assert(createAppTxn.ApplicationArgs[0] == "1") - assert(createAppTxn.ApplicationArgs[1] == "2") + assert(createAppTxn.ApplicationArgs[0] == "1", comment=correct args used 1) + assert(createAppTxn.ApplicationArgs[1] == "2", comment=correct args used 2) assert(createAppTxn.Note == "with args param set") } @@ -77,9 +77,8 @@ contract ItxnDemoContract GlobalState["name"]: bytes = 0x } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/itxn/itxn.awst.json b/tests/approvals/out/itxn/itxn.awst.json index 1a9d1611..8856e25b 100644 --- a/tests/approvals/out/itxn/itxn.awst.json +++ b/tests/approvals/out/itxn/itxn.awst.json @@ -107,8 +107,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -204,7 +203,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 11, "end_line": 11, - "column": 8, + "column": 12, "end_column": 22 }, "wtype": { @@ -218,8 +217,7 @@ "immediates": [ "NumAppArgs" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "if_branch": { @@ -301,8 +299,7 @@ "value": "0", "teal_alias": null } - ], - "comment": null + ] }, "cases": [ [ @@ -797,7 +794,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 28, "end_line": 28, - "column": 4, + "column": 14, "end_column": 19 }, "wtype": { @@ -913,6 +910,25 @@ "value": "0", "teal_alias": null }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 30, + "end_line": 37, + "column": 24, + "end_column": 6 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "3", + "teal_alias": null + }, "ConfigAssetTotal": { "_type": "IntegerConstant", "source_location": { @@ -938,7 +954,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 32, "end_line": 32, - "column": 17, + "column": 27, "end_column": 32 }, "wtype": { @@ -1013,7 +1029,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 35, "end_line": 35, - "column": 15, + "column": 22, "end_column": 47 }, "wtype": { @@ -1027,8 +1043,7 @@ "immediates": [ "CurrentApplicationAddress" ], - "stack_args": [], - "comment": null + "stack_args": [] }, "ConfigAssetReserve": { "_type": "IntrinsicCall", @@ -1036,7 +1051,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 36, "end_line": 36, - "column": 15, + "column": 22, "end_column": 47 }, "wtype": { @@ -1050,8 +1065,7 @@ "immediates": [ "CurrentApplicationAddress" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -1071,7 +1085,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 39, "end_line": 39, - "column": 4, + "column": 14, "end_column": 19 }, "wtype": { @@ -1242,7 +1256,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 42, "end_line": 42, - "column": 17, + "column": 27, "end_column": 32 }, "wtype": { @@ -1354,7 +1368,7 @@ "end_column": 75 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 46, @@ -1369,86 +1383,82 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 46, + "end_line": 46, + "column": 11, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 46, "end_line": 46, - "column": 11, - "end_column": 49 + "column": 22, + "end_column": 31 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 46, "end_line": 46, "column": 11, - "end_column": 31 + "end_column": 21 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WInnerTransaction", + "name": "inner_transaction_acfg", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 46, - "end_line": 46, - "column": 11, - "end_column": 21 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_acfg", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 3 - }, - "name": "asset1_txn" + "scalar_type": null, + "transaction_type": 3 }, - "field": "ConfigAssetName", - "array_index": null + "name": "asset1_txn" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 46, - "end_line": 46, - "column": 42, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K~q#Q", - "encoding": "utf8" - } + "field": "ConfigAssetName", + "array_index": null + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 46, + "end_line": 46, + "column": 42, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "K~q#Q", + "encoding": "utf8" } - ], - "comment": "asset1_txn is correct" + }, + "error_message": "asset1_txn is correct" } }, { @@ -1461,7 +1471,7 @@ "end_column": 75 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 47, @@ -1476,86 +1486,82 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 47, + "end_line": 47, + "column": 11, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 47, "end_line": 47, - "column": 11, - "end_column": 49 + "column": 22, + "end_column": 31 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 47, "end_line": 47, "column": 11, - "end_column": 31 + "end_column": 21 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WInnerTransaction", + "name": "inner_transaction_acfg", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 47, - "end_line": 47, - "column": 11, - "end_column": 21 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_acfg", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 3 - }, - "name": "asset2_txn" + "scalar_type": null, + "transaction_type": 3 }, - "field": "ConfigAssetName", - "array_index": null + "name": "asset2_txn" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 47, - "end_line": 47, - "column": 42, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K~q#R", - "encoding": "utf8" - } + "field": "ConfigAssetName", + "array_index": null + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 47, + "end_line": 47, + "column": 42, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "K~q#R", + "encoding": "utf8" } - ], - "comment": "asset2_txn is correct" + }, + "error_message": "asset2_txn is correct" } }, { @@ -1568,7 +1574,7 @@ "end_column": 88 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 48, @@ -1583,144 +1589,139 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 48, + "end_line": 48, + "column": 11, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 48, "end_line": 48, - "column": 11, - "end_column": 57 + "column": 35, + "end_column": 39 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "CheckedMaybe", + "expr": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 48, "end_line": 48, - "column": 11, + "column": 35, "end_column": 39 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 48, - "end_line": 48, - "column": 11, - "end_column": 39 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "asset_params_get", - "immediates": [ - "AssetName" - ], - "stack_args": [ + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, { - "_type": "InnerTransactionField", + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_params_get", + "immediates": [ + "AssetName" + ], + "stack_args": [ + { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 48, + "end_line": 48, + "column": 22, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 48, "end_line": 48, "column": 11, - "end_column": 34 + "end_column": 21 }, "wtype": { - "_type": "WType", - "name": "asset", + "_type": "WInnerTransaction", + "name": "inner_transaction_acfg", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 48, - "end_line": 48, - "column": 11, - "end_column": 21 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_acfg", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 3 - }, - "name": "asset1_txn" + "scalar_type": null, + "transaction_type": 3 }, - "field": "CreatedAssetID", - "array_index": null - } - ], - "comment": null - }, - "comment": "asset exists" + "name": "asset1_txn" + }, + "field": "CreatedAssetID", + "array_index": null + } + ] }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 48, - "end_line": 48, - "column": 50, - "end_column": 56 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K~q#Q", - "encoding": "utf8" - } + "comment": "asset exists" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 48, + "end_line": 48, + "column": 50, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "K~q#Q", + "encoding": "utf8" } - ], - "comment": "created asset 1 is correct" + }, + "error_message": "created asset 1 is correct" } }, { @@ -1733,7 +1734,7 @@ "end_column": 88 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 49, @@ -1748,144 +1749,139 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 49, - "end_line": 49, - "column": 11, - "end_column": 57 - }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 49, + "end_line": 49, + "column": 11, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 49, + "end_line": 49, + "column": 35, + "end_column": 39 + }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "CheckedMaybe", + "expr": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 49, "end_line": 49, - "column": 11, + "column": 35, "end_column": 39 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 49, - "end_line": 49, - "column": 11, - "end_column": 39 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "asset_params_get", - "immediates": [ - "AssetName" - ], - "stack_args": [ + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, { - "_type": "InnerTransactionField", + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_params_get", + "immediates": [ + "AssetName" + ], + "stack_args": [ + { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 49, + "end_line": 49, + "column": 22, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 49, "end_line": 49, "column": 11, - "end_column": 34 + "end_column": 21 }, "wtype": { - "_type": "WType", - "name": "asset", + "_type": "WInnerTransaction", + "name": "inner_transaction_acfg", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 49, - "end_line": 49, - "column": 11, - "end_column": 21 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_acfg", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 3 - }, - "name": "asset2_txn" + "scalar_type": null, + "transaction_type": 3 }, - "field": "CreatedAssetID", - "array_index": null - } - ], - "comment": null - }, - "comment": "asset exists" + "name": "asset2_txn" + }, + "field": "CreatedAssetID", + "array_index": null + } + ] }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 49, - "end_line": 49, - "column": 50, - "end_column": 56 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K~q#R", - "encoding": "utf8" - } + "comment": "asset exists" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 49, + "end_line": 49, + "column": 50, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "K~q#R", + "encoding": "utf8" } - ], - "comment": "created asset 2 is correct" + }, + "error_message": "created asset 2 is correct" } }, { @@ -1953,8 +1949,27 @@ "value": "0", "teal_alias": null }, - "ApprovalProgram": { - "_type": "BytesConstant", + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 51, + "end_line": 55, + "column": 28, + "end_column": 6 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 52, @@ -1963,17 +1978,45 @@ "end_column": 46 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] }, - "value": "34s9", - "encoding": "base16" + "items": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 52, + "end_line": 52, + "column": 23, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "34s9", + "encoding": "base16" + } + ] }, - "ClearStateProgram": { - "_type": "BytesConstant", + "ClearStateProgramPages": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 53, @@ -1982,14 +2025,42 @@ "end_column": 48 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] }, - "value": "34s9", - "encoding": "base16" + "items": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 53, + "end_line": 53, + "column": 25, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "34s9", + "encoding": "base16" + } + ] } } } @@ -2232,7 +2303,7 @@ "end_column": 48 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 63, @@ -2247,66 +2318,62 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 63, + "end_line": 63, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 63, "end_line": 63, - "column": 4, - "end_column": 48 + "column": 24, + "end_column": 29 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "application", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 63, "end_line": 63, "column": 11, - "end_column": 29 + "end_column": 23 }, "wtype": { - "_type": "WType", - "name": "application", + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 63, - "end_line": 63, - "column": 11, - "end_column": 23 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_appl", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 6 - }, - "name": "appCreateTxn" + "scalar_type": null, + "transaction_type": 6 }, - "field": "ApplicationID", - "array_index": null - } + "name": "appCreateTxn" + }, + "field": "ApplicationID", + "array_index": null } - ], - "comment": "app is created" + }, + "error_message": "app is created" } }, { @@ -2319,7 +2386,7 @@ "end_column": 75 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 64, @@ -2334,86 +2401,82 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 64, + "end_line": 64, + "column": 11, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 64, "end_line": 64, - "column": 11, - "end_column": 49 + "column": 22, + "end_column": 31 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 64, "end_line": 64, "column": 11, - "end_column": 31 + "end_column": 21 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WInnerTransaction", + "name": "inner_transaction_acfg", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 64, - "end_line": 64, - "column": 11, - "end_column": 21 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_acfg", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 3 - }, - "name": "asset3_txn" + "scalar_type": null, + "transaction_type": 3 }, - "field": "ConfigAssetName", - "array_index": null + "name": "asset3_txn" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 64, - "end_line": 64, - "column": 42, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K~q#S", - "encoding": "utf8" - } + "field": "ConfigAssetName", + "array_index": null + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 64, + "end_line": 64, + "column": 42, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "K~q#S", + "encoding": "utf8" } - ], - "comment": "asset3_txn is correct" + }, + "error_message": "asset3_txn is correct" } }, { @@ -2709,7 +2772,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 77, "end_line": 77, - "column": 8, + "column": 12, "end_column": 22 }, "wtype": { @@ -2723,8 +2786,7 @@ "immediates": [ "NumAppArgs" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "if_branch": { @@ -2929,27 +2991,74 @@ "value": "0", "teal_alias": null }, - "ApprovalProgram": { - "_type": "BytesConstant", + "TypeEnum": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/itxn.algo.ts", - "line": 5, - "end_line": 5, + "line": 79, + "end_line": 85, + "column": 24, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 5, + "end_line": 5, "column": 22, "end_column": 36 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] }, - "value": "3BrK^", - "encoding": "utf8" + "items": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 5, + "end_line": 5, + "column": 22, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "3BrK^", + "encoding": "utf8" + } + ] }, - "ClearStateProgram": { - "_type": "BytesConstant", + "ClearStateProgramPages": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 5, @@ -2958,14 +3067,42 @@ "end_column": 36 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] }, - "value": "3BrK^", - "encoding": "utf8" + "items": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 5, + "end_line": 5, + "column": 22, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "3BrK^", + "encoding": "utf8" + } + ] }, "ApplicationArgs": { "_type": "TupleExpression", @@ -3112,7 +3249,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 83, "end_line": 83, - "column": 22, + "column": 39, "end_column": 43 }, "wtype": { @@ -3240,8 +3377,27 @@ "value": "0", "teal_alias": null }, - "ApprovalProgram": { - "_type": "BytesConstant", + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 87, + "end_line": 92, + "column": 24, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 5, @@ -3250,17 +3406,45 @@ "end_column": 36 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] }, - "value": "3BrK^", - "encoding": "utf8" + "items": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 5, + "end_line": 5, + "column": 22, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "3BrK^", + "encoding": "utf8" + } + ] }, - "ClearStateProgram": { - "_type": "BytesConstant", + "ClearStateProgramPages": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 5, @@ -3269,14 +3453,42 @@ "end_column": 36 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] }, - "value": "3BrK^", - "encoding": "utf8" + "items": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 5, + "end_line": 5, + "column": 22, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "3BrK^", + "encoding": "utf8" + } + ] }, "ApplicationArgs": { "_type": "TupleExpression", @@ -3486,7 +3698,7 @@ "end_column": 73 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 95, @@ -3501,104 +3713,100 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 95, + "end_line": 95, + "column": 11, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 95, "end_line": 95, "column": 11, - "end_column": 49 + "end_column": 34 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 95, "end_line": 95, "column": 11, - "end_column": 34 + "end_column": 23 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 95, - "end_line": 95, - "column": 11, - "end_column": 23 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_appl", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 6 - }, - "name": "createAppTxn" + "scalar_type": null, + "transaction_type": 6 }, - "field": "ApplicationArgs", - "array_index": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 95, - "end_line": 95, - "column": 32, - "end_column": 33 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } + "name": "createAppTxn" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", + "field": "ApplicationArgs", + "array_index": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 95, "end_line": 95, - "column": 45, - "end_column": 48 + "column": 32, + "end_column": 33 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "value": "F#", - "encoding": "utf8" + "value": "0", + "teal_alias": null } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 95, + "end_line": 95, + "column": 45, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "F#", + "encoding": "utf8" } - ], - "comment": "correct args used 1" + }, + "error_message": "correct args used 1" } }, { @@ -3611,7 +3819,7 @@ "end_column": 73 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 96, @@ -3626,104 +3834,100 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 96, + "end_line": 96, + "column": 11, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 96, "end_line": 96, "column": 11, - "end_column": 49 + "end_column": 34 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 96, "end_line": 96, "column": 11, - "end_column": 34 + "end_column": 23 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "transaction_type": 6 }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 96, - "end_line": 96, - "column": 11, - "end_column": 23 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_appl", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 6 - }, - "name": "createAppTxn" - }, - "field": "ApplicationArgs", - "array_index": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 96, - "end_line": 96, - "column": 32, - "end_column": 33 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "1", - "teal_alias": null - } + "name": "createAppTxn" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", + "field": "ApplicationArgs", + "array_index": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 96, "end_line": 96, - "column": 45, - "end_column": 48 + "column": 32, + "end_column": 33 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "value": "G5", - "encoding": "utf8" + "value": "1", + "teal_alias": null } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 96, + "end_line": 96, + "column": 45, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "G5", + "encoding": "utf8" } - ], - "comment": "correct args used 2" + }, + "error_message": "correct args used 2" } }, { @@ -3736,7 +3940,7 @@ "end_column": 62 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 97, @@ -3751,86 +3955,82 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 97, + "end_line": 97, + "column": 11, + "end_column": 61 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 97, "end_line": 97, - "column": 11, - "end_column": 61 + "column": 24, + "end_column": 28 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 97, "end_line": 97, "column": 11, - "end_column": 28 + "end_column": 23 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "transaction_type": 6 }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 97, - "end_line": 97, - "column": 11, - "end_column": 23 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_appl", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 6 - }, - "name": "createAppTxn" - }, - "field": "Note", - "array_index": null + "name": "createAppTxn" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 97, - "end_line": 97, - "column": 39, - "end_column": 60 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "cWHEJAYpQ6b0BbGa$#*Cb7gb", - "encoding": "utf8" - } + "field": "Note", + "array_index": null + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 97, + "end_line": 97, + "column": 39, + "end_column": 60 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "cWHEJAYpQ6b0BbGa$#*Cb7gb", + "encoding": "utf8" } - ], - "comment": null + }, + "error_message": null } } ], @@ -4009,42 +4209,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -4054,7 +4219,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -4107,6 +4272,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/jsdoc/JSDocDemo.approval.teal b/tests/approvals/out/jsdoc/JSDocDemo.approval.teal new file mode 100644 index 00000000..021957b8 --- /dev/null +++ b/tests/approvals/out/jsdoc/JSDocDemo.approval.teal @@ -0,0 +1,170 @@ +#pragma version 10 + +tests/approvals/jsdoc.algo.ts::JSDocDemo.approvalProgram: + intcblock 0 1 + bytecblock 0x151f7c75 0x + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/jsdoc.algo.ts::JSDocDemo.constructor() -> void: +constructor: + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + proto 0 0 + retsub + + +// tests/approvals/jsdoc.algo.ts::JSDocDemo.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@6 + txna ApplicationArgs 0 + pushbytes 0x60d93beb // method "test(uint64,byte[])(uint64)" + pushbytes 0x6618726a // method "test2(byte[])(byte[])" + uncover 2 + match __puya_arc4_router___test_route@2 __puya_arc4_router___test2_route@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___test_route@2: + // tests/approvals/jsdoc.algo.ts:30 + // test(a: uint64, b: bytes): DemoStruct { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + extract 2 0 + // tests/approvals/jsdoc.algo.ts:30 + // test(a: uint64, b: bytes): DemoStruct { + callsub test + bytec_0 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___test2_route@3: + // tests/approvals/jsdoc.algo.ts:39 + // test2(a: bytes): DemoType { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + txna ApplicationArgs 1 + extract 2 0 + // tests/approvals/jsdoc.algo.ts:39 + // test2(a: bytes): DemoType { + callsub test2 + dup + len + itob + extract 6 2 + swap + concat + pushint 2 // 2 + itob + extract 6 2 + bytec_1 // 0x + swap + concat + swap + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@4: + b __puya_arc4_router___after_if_else@10 + +__puya_arc4_router___bare_routing@6: + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@7 + b __puya_arc4_router___switch_case_default@8 + +__puya_arc4_router_____algots__.defaultCreate@7: + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@8: + +__puya_arc4_router___after_if_else@10: + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/jsdoc.algo.ts::JSDocDemo.test(a: uint64, b: bytes) -> bytes: +test: + // tests/approvals/jsdoc.algo.ts:30 + // test(a: uint64, b: bytes): DemoStruct { + proto 2 1 + // tests/approvals/jsdoc.algo.ts:31 + // return new DemoStruct({ a: new UintN<64>(a) }) + frame_dig -2 + itob + bytec_1 // 0x + swap + concat + retsub + + +// tests/approvals/jsdoc.algo.ts::JSDocDemo.test2(a: bytes) -> bytes: +test2: + // tests/approvals/jsdoc.algo.ts:39 + // test2(a: bytes): DemoType { + proto 1 1 + // tests/approvals/jsdoc.algo.ts:40-42 + // return { + // a, + // } + frame_dig -1 + retsub + + +// tests/approvals/jsdoc.algo.ts::JSDocDemo.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/jsdoc/JSDocDemo.arc32.json b/tests/approvals/out/jsdoc/JSDocDemo.arc32.json new file mode 100644 index 00000000..29e115c4 --- /dev/null +++ b/tests/approvals/out/jsdoc/JSDocDemo.arc32.json @@ -0,0 +1,116 @@ +{ + "hints": { + "test(uint64,byte[])(uint64)": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "output": { + "name": "DemoStruct", + "elements": [ + [ + "a", + "uint64" + ] + ] + } + } + }, + "test2(byte[])(byte[])": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "output": { + "name": "DemoType", + "elements": [ + [ + "a", + "byte[]" + ] + ] + } + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLmFwcHJvdmFsUHJvZ3JhbToKIC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SB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "state": { + "global": { + "num_byte_slices": 1, + "num_uints": 1 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": { + "globalState": { + "type": "bytes", + "key": "globalState" + }, + "localState": { + "type": "uint64", + "key": "localState" + } + }, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "JSDocDemo", + "desc": "This is the description for the contract", + "methods": [ + { + "name": "test", + "args": [ + { + "type": "uint64", + "name": "a", + "desc": "This is the description of 'a'" + }, + { + "type": "byte[]", + "name": "b", + "desc": "This is the description of 'b'" + } + ], + "readonly": false, + "returns": { + "type": "(uint64)", + "desc": "This is the description of the return value" + }, + "desc": "This is the description of the method" + }, + { + "name": "test2", + "args": [ + { + "type": "byte[]", + "name": "a", + "desc": "This is the description of 'a'" + } + ], + "readonly": false, + "returns": { + "type": "(byte[])", + "desc": "This is the description of the return value" + }, + "desc": "This is the description of the method" + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/tests/approvals/out/jsdoc/JSDocDemo.arc56.json b/tests/approvals/out/jsdoc/JSDocDemo.arc56.json new file mode 100644 index 00000000..4b3d0131 --- /dev/null +++ b/tests/approvals/out/jsdoc/JSDocDemo.arc56.json @@ -0,0 +1,156 @@ +{ + "name": "JSDocDemo", + "structs": { + "DemoStruct": [ + { + "name": "a", + "type": "uint64" + } + ], + "DemoType": [ + { + "name": "a", + "type": "byte[]" + } + ] + }, + "methods": [ + { + "name": "test", + "args": [ + { + "type": "uint64", + "name": "a", + "desc": "This is the description of 'a'" + }, + { + "type": "byte[]", + "name": "b", + "desc": "This is the description of 'b'" + } + ], + "returns": { + "type": "(uint64)", + "struct": "DemoStruct", + "desc": "This is the description of the return value" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "desc": "This is the description of the method", + "events": [], + "recommendations": {} + }, + { + "name": "test2", + "args": [ + { + "type": "byte[]", + "name": "a", + "desc": "This is the description of 'a'" + } + ], + "returns": { + "type": "(byte[])", + "struct": "DemoType", + "desc": "This is the description of the return value" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "desc": "This is the description of the method", + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "desc": "This is the description for the contract", + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 1, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "globalState": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "Z2xvYmFsU3RhdGU=" + }, + "localState": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "bG9jYWxTdGF0ZQ==" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 69, + 98 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 156 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 74, + 103 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAwIDEKICAgIGJ5dGVjYmxvY2sgMHgxNTFmN2M3NSAweAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICA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JldHVybgo=" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/jsdoc/JSDocDemo.clear.teal b/tests/approvals/out/jsdoc/JSDocDemo.clear.teal new file mode 100644 index 00000000..8054cedd --- /dev/null +++ b/tests/approvals/out/jsdoc/JSDocDemo.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/jsdoc.algo.ts::JSDocDemo.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/jsdoc/JSDocDemo.ssa.ir b/tests/approvals/out/jsdoc/JSDocDemo.ssa.ir new file mode 100644 index 00000000..f26cca6e --- /dev/null +++ b/tests/approvals/out/jsdoc/JSDocDemo.ssa.ir @@ -0,0 +1,105 @@ +contract tests/approvals/jsdoc.algo.ts::JSDocDemo: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/jsdoc.algo.ts::JSDocDemo.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/jsdoc.algo.ts::JSDocDemo.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/jsdoc.algo.ts::JSDocDemo.constructor() -> void: + block@0: // L20 + return + + subroutine tests/approvals/jsdoc.algo.ts::JSDocDemo.__puya_arc4_router__() -> bool: + block@0: // L20 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@6 + block@1: // abi_routing_L20 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test(uint64,byte[])(uint64)" => block@2, method "test2(byte[])(byte[])" => block@3, * => block@4} + block@2: // test_route_L30 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + let tmp%7#0: bytes = (txna ApplicationArgs 1) + let tmp%8#0: uint64 = (btoi tmp%7#0) + let tmp%9#0: bytes = (txna ApplicationArgs 2) + let tmp%10#0: bytes = ((extract 2 0) tmp%9#0) + let tmp%11#0: bytes = tests/approvals/jsdoc.algo.ts::JSDocDemo.test(tmp%8#0, tmp%10#0) + let tmp%12#0: bytes = (concat 0x151f7c75 tmp%11#0) + (log tmp%12#0) + return 1u + block@3: // test2_route_L39 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (== tmp%13#0 NoOp) + (assert tmp%14#0) // OnCompletion is not NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + let tmp%16#0: bool = (!= tmp%15#0 0u) + (assert tmp%16#0) // can only call when not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = ((extract 2 0) tmp%17#0) + let elements_to_encode%0#0: bytes = tests/approvals/jsdoc.algo.ts::JSDocDemo.test2(tmp%18#0) + let length%0#0: uint64 = (len elements_to_encode%0#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%0#0) + let current_tail_offset%0#0: uint64 = 2u + let encoded_tuple_buffer%0#0: bytes = 0x + let as_bytes%1#0: bytes = (itob current_tail_offset%0#0) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len encoded_value%0#0) + let current_tail_offset%1#0: uint64 = (+ current_tail_offset%0#0 data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 encoded_value%0#0) + let tmp%19#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%2#0) + (log tmp%19#0) + return 1u + block@4: // switch_case_default_L20 + goto block@5 + block@5: // switch_case_next_L20 + goto block@10 + block@6: // bare_routing_L20 + let tmp%20#0: uint64 = (txn OnCompletion) + switch tmp%20#0 {0u => block@7, * => block@8} + block@7: // __algots__.defaultCreate_L20 + let tmp%21#0: uint64 = (txn ApplicationID) + let tmp%22#0: bool = (== tmp%21#0 0u) + (assert tmp%22#0) // can only call when creating + tests/approvals/jsdoc.algo.ts::JSDocDemo.__algots__.defaultCreate() + return 1u + block@8: // switch_case_default_L20 + goto block@9 + block@9: // switch_case_next_L20 + goto block@10 + block@10: // after_if_else_L20 + return 0u + + subroutine tests/approvals/jsdoc.algo.ts::JSDocDemo.test(a: uint64, b: bytes) -> bytes: + block@0: // L30 + let val_as_bytes%0#0: bytes = (itob a#0) + let current_tail_offset%0#0: uint64 = 8u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 val_as_bytes%0#0) + return encoded_tuple_buffer%1#0 + + subroutine tests/approvals/jsdoc.algo.ts::JSDocDemo.test2(a: bytes) -> bytes: + block@0: // L39 + return a#0 + + subroutine tests/approvals/jsdoc.algo.ts::JSDocDemo.__algots__.defaultCreate() -> void: + block@0: // L20 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/jsdoc/jsdoc.awst b/tests/approvals/out/jsdoc/jsdoc.awst new file mode 100644 index 00000000..93bc1dc0 --- /dev/null +++ b/tests/approvals/out/jsdoc/jsdoc.awst @@ -0,0 +1,48 @@ +contract JSDocDemo +{ + globals { + ["globalState"]: string + ["localState"]: uint64 + } + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + test(): DemoStruct + { + return new DemoStruct(a=(#0 = { a: ARC4_ENCODE(a, wtype=arc4.uint64) }).a) + } + + test2(): DemoType{ a: bytes } + { + return { a: (#1 = { a: a }).a } + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + + BaseContract::constructor(): void + { + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/jsdoc/jsdoc.awst.json b/tests/approvals/out/jsdoc/jsdoc.awst.json new file mode 100644 index 00000000..b21d3902 --- /dev/null +++ b/tests/approvals/out/jsdoc/jsdoc.awst.json @@ -0,0 +1,1218 @@ +[ + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "id": "tests/approvals/jsdoc.algo.ts::JSDocDemo", + "name": "JSDocDemo", + "description": "This is the description for the contract", + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 30, + "end_line": 30, + "column": 2, + "end_column": 39 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 30, + "end_line": 30, + "column": 7, + "end_column": 16 + } + }, + { + "_type": "SubroutineArgument", + "name": "b", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 30, + "end_line": 30, + "column": 18, + "end_column": 26 + } + } + ], + "return_type": { + "_type": "ARC4Struct", + "name": "DemoStruct", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64)", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 30, + "end_line": 30, + "column": 2, + "end_column": 39 + }, + "frozen": false, + "desc": "This is the description for demo struct" + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 30, + "end_line": 32, + "column": 40, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 4, + "end_column": 50 + }, + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 50 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "DemoStruct", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64)", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 15, + "end_column": 25 + }, + "frozen": false, + "desc": "This is the description for demo struct" + }, + "values": { + "a": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 50 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 26, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "a" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 26, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "a" + ] + }, + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 31, + "end_column": 47 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 45, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + ] + }, + "id": "0" + }, + "name": "a" + } + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "This is the description of the method", + "args": { + "a": "This is the description of 'a'", + "b": "This is the description of 'b'" + }, + "returns": "This is the description of the return value" + }, + "cref": "tests/approvals/jsdoc.algo.ts::JSDocDemo", + "member_name": "test", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 30, + "end_line": 30, + "column": 2, + "end_column": 39 + }, + "name": "test", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "output": { + "name": "DemoStruct", + "elements": [ + [ + "a", + "uint64" + ] + ] + } + } + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 39, + "end_line": 39, + "column": 2, + "end_column": 27 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 39, + "end_line": 39, + "column": 8, + "end_column": 16 + } + } + ], + "return_type": { + "_type": "WTuple", + "name": "tests/approvals/jsdoc.algo.ts::DemoType", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a" + ] + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 39, + "end_line": 43, + "column": 28, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 40, + "end_line": 42, + "column": 4, + "end_column": 5 + }, + "value": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 40, + "end_line": 42, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/jsdoc.algo.ts::DemoType", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a" + ] + }, + "items": [ + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 40, + "end_line": 42, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 40, + "end_line": 42, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 40, + "end_line": 42, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a" + ] + }, + "items": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 41, + "end_line": 41, + "column": 6, + "end_column": 7 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "a" + } + ] + }, + "id": "1" + }, + "name": "a" + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "This is the description of the method", + "args": { + "a": "This is the description of 'a'" + }, + "returns": "This is the description of the return value" + }, + "cref": "tests/approvals/jsdoc.algo.ts::JSDocDemo", + "member_name": "test2", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 39, + "end_line": 39, + "column": 2, + "end_column": 27 + }, + "name": "test2", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "output": { + "name": "DemoType", + "elements": [ + [ + "a", + "byte[]" + ] + ] + } + } + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/jsdoc.algo.ts::JSDocDemo", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/jsdoc.algo.ts::JSDocDemo", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true + } + } + ], + "app_state": [ + { + "_type": "AppStorageDefinition", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 21, + "end_line": 21, + "column": 2, + "end_column": 13 + }, + "member_name": "globalState", + "kind": 1, + "storage_wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key_wtype": null, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 21, + "end_line": 21, + "column": 2, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XKZg`VQf=$VRU5", + "encoding": "utf8" + }, + "description": null + }, + { + "_type": "AppStorageDefinition", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 22, + "end_line": 22, + "column": 2, + "end_column": 12 + }, + "member_name": "localState", + "kind": 1, + "storage_wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key_wtype": null, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 22, + "end_line": 22, + "column": 2, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y*Tb$bY%", + "encoding": "utf8" + }, + "description": null + } + ], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + } +] \ No newline at end of file diff --git a/tests/approvals/out/local-state/LocalStateDemo.approval.teal b/tests/approvals/out/local-state/LocalStateDemo.approval.teal new file mode 100644 index 00000000..12252a79 --- /dev/null +++ b/tests/approvals/out/local-state/LocalStateDemo.approval.teal @@ -0,0 +1,627 @@ +#pragma version 10 + +tests/approvals/local-state.algo.ts::LocalStateDemo.approvalProgram: + intcblock 0 1 8 100 + bytecblock "l1" "localUint2" "b1" "localBytes2" "localEncoded" + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/local-state.algo.ts::LocalStateDemo.constructor() -> void: +constructor: + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { + proto 0 0 + retsub + + +// tests/approvals/local-state.algo.ts::LocalStateDemo.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@7 + txna ApplicationArgs 0 + pushbytes 0xaaefcb43 // method "setState((uint64,byte[]),uint64[10])void" + pushbytes 0x67816cc5 // method "getState()(uint64,uint64,byte[],byte[],uint64[10])" + pushbytes 0x11170534 // method "clearState()void" + uncover 3 + match __puya_arc4_router___setState_route@2 __puya_arc4_router___getState_route@3 __puya_arc4_router___clearState_route@4 + b __puya_arc4_router___switch_case_default@5 + +__puya_arc4_router___setState_route@2: + // tests/approvals/local-state.algo.ts:14 + // public setState({ a, b }: { a: uint64; b: bytes }, c: SampleArray) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { + txna ApplicationArgs 1 + dup + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + btoi + swap + dup + intc_2 // 8 + extract_uint16 + swap + dup + len + swap + uncover 2 + uncover 2 + substring3 + extract 2 0 + txna ApplicationArgs 2 + // tests/approvals/local-state.algo.ts:14 + // public setState({ a, b }: { a: uint64; b: bytes }, c: SampleArray) { + uncover 2 + uncover 2 + uncover 2 + callsub setState + intc_1 // 1 + retsub + +__puya_arc4_router___getState_route@3: + // tests/approvals/local-state.algo.ts:22 + // public getState() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub getState + cover 4 + cover 3 + cover 2 + swap + itob + cover 3 + itob + cover 3 + dup + len + itob + extract 6 2 + swap + concat + cover 3 + dup + len + itob + extract 6 2 + swap + concat + cover 3 + pushbytes 0x + swap + concat + swap + concat + intc_3 // 100 + itob + extract 6 2 + concat + dig 1 + len + intc_3 // 100 + + + itob + extract 6 2 + concat + uncover 3 + concat + swap + concat + swap + concat + pushbytes 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___clearState_route@4: + // tests/approvals/local-state.algo.ts:32 + // public clearState() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub clearState + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@5: + b __puya_arc4_router___after_if_else@11 + +__puya_arc4_router___bare_routing@7: + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@8 + b __puya_arc4_router___switch_case_default@9 + +__puya_arc4_router_____algots__.defaultCreate@8: + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@9: + +__puya_arc4_router___after_if_else@11: + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/local-state.algo.ts::LocalStateDemo.setState(p.a: uint64, p.b: bytes, c: bytes) -> void: +setState: + // tests/approvals/local-state.algo.ts:14 + // public setState({ a, b }: { a: uint64; b: bytes }, c: SampleArray) { + proto 3 0 + frame_dig -3 + frame_dig -2 + swap + // tests/approvals/local-state.algo.ts:15 + // this.localUint(Txn.sender).value = a + txn Sender + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:15 + // this.localUint(Txn.sender).value = a + dig 2 + app_local_put + // tests/approvals/local-state.algo.ts:16 + // this.localUint2(Txn.sender).value = a + txn Sender + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:16 + // this.localUint2(Txn.sender).value = a + uncover 2 + app_local_put + // tests/approvals/local-state.algo.ts:17 + // this.localBytes(Txn.sender).value = b + txn Sender + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:17 + // this.localBytes(Txn.sender).value = b + dig 2 + app_local_put + // tests/approvals/local-state.algo.ts:18 + // this.localBytes2(Txn.sender).value = b + txn Sender + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:18 + // this.localBytes2(Txn.sender).value = b + uncover 2 + app_local_put + // tests/approvals/local-state.algo.ts:19 + // this.localEncoded(Txn.sender).value = c.copy() + frame_dig -1 + txn Sender + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:19 + // this.localEncoded(Txn.sender).value = c.copy() + uncover 2 + app_local_put + retsub + + +// tests/approvals/local-state.algo.ts::LocalStateDemo.getState() -> uint64, uint64, bytes, bytes, bytes: +getState: + // tests/approvals/local-state.algo.ts:22 + // public getState() { + proto 0 5 + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + app_local_get_ex + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + app_local_get_ex + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + app_local_get_ex + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + app_local_get_ex + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + app_local_get_ex + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:23-29 + // return { + // localUint: this.localUint(Txn.sender).value, + // localUint2: this.localUint2(Txn.sender).value, + // localBytes: this.localBytes(Txn.sender).value, + // localBytes2: this.localBytes2(Txn.sender).value, + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + // } + uncover 4 + uncover 4 + uncover 4 + uncover 4 + uncover 4 + retsub + + +// tests/approvals/local-state.algo.ts::LocalStateDemo.clearState() -> void: +clearState: + // tests/approvals/local-state.algo.ts:32 + // public clearState() { + proto 0 0 + // tests/approvals/local-state.algo.ts:33 + // this.localUint(Txn.sender).delete() + txn Sender + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:33 + // this.localUint(Txn.sender).delete() + app_local_del + // tests/approvals/local-state.algo.ts:34 + // this.localUint2(Txn.sender).delete() + txn Sender + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:34 + // this.localUint2(Txn.sender).delete() + app_local_del + // tests/approvals/local-state.algo.ts:35 + // this.localBytes(Txn.sender).delete() + txn Sender + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:35 + // this.localBytes(Txn.sender).delete() + app_local_del + // tests/approvals/local-state.algo.ts:36 + // this.localBytes2(Txn.sender).delete() + txn Sender + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:36 + // this.localBytes2(Txn.sender).delete() + app_local_del + // tests/approvals/local-state.algo.ts:37 + // this.localEncoded(Txn.sender).delete() + txn Sender + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:37 + // this.localEncoded(Txn.sender).delete() + app_local_del + retsub + + +// tests/approvals/local-state.algo.ts::LocalStateDemo.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/local-state/LocalStateDemo.arc32.json b/tests/approvals/out/local-state/LocalStateDemo.arc32.json index 33f8f919..587a5a02 100644 --- a/tests/approvals/out/local-state/LocalStateDemo.arc32.json +++ b/tests/approvals/out/local-state/LocalStateDemo.arc32.json @@ -5,7 +5,7 @@ "no_op": "CALL" }, "structs": { - "__0": { + "p": { "name": "", "elements": [ [ @@ -26,7 +26,7 @@ }, "structs": { "output": { - "name": "", + "name": "getStateResult", "elements": [ [ "localUint", @@ -59,7 +59,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbG9jYWwtc3RhdGUuYWxnby50czo6TG9jYWxTdGF0ZURlbW8uYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMQogICAgYnl0ZWNibG9jayAibDEiICJsb2NhbFVpbnQyIiAiYjEiICJsb2Nh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AgICB0eG4gT25Db21wbGV0aW9uCiAgICAhCiAgICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIGlzIE5vT3AKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBhc3NlcnQgLy8gaXMgbm90IGNyZWF0aW5nCiAgICBjYWxsc3ViIGdldFN0YXRlCiAgICB1bmNvdmVyIDQKICAgIGl0b2IKICAgIHVuY292ZXIgNAogICAgaXRvYgogICAgZGlnIDQKICAgIGxlbgogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHVuY292ZXIgNQogICAgY29uY2F0CiAgICBkaWcgNAogICAgbGVuCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgdW5jb3ZlciA1CiAgICBjb25jYXQKICAgIHVuY292ZXIgMwogICAgdW5jb3ZlciAzCiAgICBjb25jYXQKICAgIHB1c2hieXRlcyAweDAwNjQKICAgIGNvbmNhdAogICAgZGlnIDIKICAgIGxlbgogICAgcHVzaGludCAxMDAgLy8gMTAwCiAgICArCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgY29uY2F0CiAgICB1bmNvdmVyIDMKICAgIGNvbmNhdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHN3YXAKICAgIGNvbmNhdAogICAgcHVzaGJ5dGVzIDB4MTUxZjdjNzUKICAgIHN3YXAKICAgIGNvbmNhdAogICAgbG9nCiAgICBpbnRjXzEgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19jbGVhclN0YXRlX3JvdXRlQDQ6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvbG9jYWwtc3RhdGUuYWxnby50czozMgogICAgLy8gcHVibGljIGNsZWFyU3RhdGUoKSB7CiAgICB0eG4gT25Db21wbGV0aW9uCiAgICAhCiAgICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIGlzIE5vT3AKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBhc3NlcnQgLy8gaXMgbm90IGNyZWF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AgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbG9jYWwtc3RhdGUuYWxnby50czo6TG9jYWxTdGF0ZURlbW8uY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" }, "state": { diff --git a/tests/approvals/out/local-state/LocalStateDemo.arc56.json b/tests/approvals/out/local-state/LocalStateDemo.arc56.json new file mode 100644 index 00000000..a244ec5d --- /dev/null +++ b/tests/approvals/out/local-state/LocalStateDemo.arc56.json @@ -0,0 +1,232 @@ +{ + "name": "LocalStateDemo", + "structs": { + "": [ + { + "name": "a", + "type": "uint64" + }, + { + "name": "b", + "type": "byte[]" + } + ], + "getStateResult": [ + { + "name": "localUint", + "type": "uint64" + }, + { + "name": "localUint2", + "type": "uint64" + }, + { + "name": "localBytes", + "type": "byte[]" + }, + { + "name": "localBytes2", + "type": "byte[]" + }, + { + "name": "localEncoded", + "type": "uint64[10]" + } + ] + }, + "methods": [ + { + "name": "setState", + "args": [ + { + "type": "(uint64,byte[])", + "struct": "", + "name": "p" + }, + { + "type": "uint64[10]", + "name": "c" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "getState", + "args": [], + "returns": { + "type": "(uint64,uint64,byte[],byte[],uint64[10])", + "struct": "getStateResult" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "clearState", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 2, + "bytes": 3 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "localUint": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "bDE=" + }, + "localUint2": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "bG9jYWxVaW50Mg==" + }, + "localBytes": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "YjE=" + }, + "localBytes2": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "bG9jYWxCeXRlczI=" + }, + "localEncoded": { + "keyType": "AVMString", + "valueType": "uint64[10]", + "key": "bG9jYWxFbmNvZGVk" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 127 + ], + "errorMessage": "Index access is out of bounds" + }, + { + "pc": [ + 115, + 163, + 249 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 278 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 120, + 168, + 254 + ], + "errorMessage": "can only call when not creating" + }, + { + "pc": [ + 336, + 344, + 352, + 360, + 369, + 377, + 383, + 391, + 399, + 408, + 416, + 424, + 430, + 438, + 447, + 455, + 463, + 471, + 477, + 486, + 494, + 502, + 510, + 518, + 525 + ], + "errorMessage": "check LocalState exists" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbG9jYWwtc3RhdGUuYWxnby50czo6TG9jYWxTdGF0ZURlbW8uYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMSA4IDEwMAogICAgYnl0ZWNibG9jayAibDEiICJsb2NhbFVpbnQyIiAiYjEiICJsb2NhbEJ5dGVzMiIgImxvY2FsRW5jb2RlZCIKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIG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Byb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbG9jYWwtc3RhdGUuYWxnby50czo6TG9jYWxTdGF0ZURlbW8uY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/local-state/LocalStateDemo.clear.teal b/tests/approvals/out/local-state/LocalStateDemo.clear.teal new file mode 100644 index 00000000..1f872c5f --- /dev/null +++ b/tests/approvals/out/local-state/LocalStateDemo.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/local-state.algo.ts::LocalStateDemo.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/local-state/LocalStateDemo.ssa.ir b/tests/approvals/out/local-state/LocalStateDemo.ssa.ir index 29758dcc..53941150 100644 --- a/tests/approvals/out/local-state/LocalStateDemo.ssa.ir +++ b/tests/approvals/out/local-state/LocalStateDemo.ssa.ir @@ -26,10 +26,10 @@ contract tests/approvals/local-state.algo.ts::LocalStateDemo: block@2: // setState_route_L14 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // is not creating + (assert tmp%6#0) // can only call when not creating let tmp%7#0: bytes = (txna ApplicationArgs 1) let item0%0#0: bytes = (extract3 tmp%7#0 0u 8u) // on error: Index access is out of bounds let item0%0%0#0: uint64 = (btoi item0%0#0) @@ -43,10 +43,10 @@ contract tests/approvals/local-state.algo.ts::LocalStateDemo: block@3: // getState_route_L22 let tmp%9#0: uint64 = (txn OnCompletion) let tmp%10#0: bool = (== tmp%9#0 NoOp) - (assert tmp%10#0) // OnCompletion is NoOp + (assert tmp%10#0) // OnCompletion is not NoOp let tmp%11#0: uint64 = (txn ApplicationID) let tmp%12#0: bool = (!= tmp%11#0 0u) - (assert tmp%12#0) // is not creating + (assert tmp%12#0) // can only call when not creating let (elements_to_encode%0#0: uint64, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes, elements_to_encode%4#0: bytes) = tests/approvals/local-state.algo.ts::LocalStateDemo.getState() let val_as_bytes%0#0: bytes = (itob elements_to_encode%0#0) let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) @@ -81,10 +81,10 @@ contract tests/approvals/local-state.algo.ts::LocalStateDemo: block@4: // clearState_route_L32 let tmp%14#0: uint64 = (txn OnCompletion) let tmp%15#0: bool = (== tmp%14#0 NoOp) - (assert tmp%15#0) // OnCompletion is NoOp + (assert tmp%15#0) // OnCompletion is not NoOp let tmp%16#0: uint64 = (txn ApplicationID) let tmp%17#0: bool = (!= tmp%16#0 0u) - (assert tmp%17#0) // is not creating + (assert tmp%17#0) // can only call when not creating tests/approvals/local-state.algo.ts::LocalStateDemo.clearState() return 1u block@5: // switch_case_default_L7 @@ -97,7 +97,7 @@ contract tests/approvals/local-state.algo.ts::LocalStateDemo: block@8: // __algots__.defaultCreate_L7 let tmp%19#0: uint64 = (txn ApplicationID) let tmp%20#0: bool = (== tmp%19#0 0u) - (assert tmp%20#0) // is creating + (assert tmp%20#0) // can only call when creating tests/approvals/local-state.algo.ts::LocalStateDemo.__algots__.defaultCreate() return 1u block@9: // switch_case_default_L7 @@ -142,7 +142,71 @@ contract tests/approvals/local-state.algo.ts::LocalStateDemo: let (maybe_value%4#0: bytes, maybe_exists%4#0: bool) = (app_local_get_ex tmp%4#0 0u "localEncoded") (assert maybe_exists%4#0) // check LocalState exists let copy%0#0: bytes = maybe_value%4#0 - return maybe_value%0#0 maybe_value%1#0 maybe_value%2#0 maybe_value%3#0 copy%0#0 + let tmp%5#0: bytes = (txn Sender) + let (maybe_value%5#0: uint64, maybe_exists%5#0: bool) = (app_local_get_ex tmp%5#0 0u "l1") + (assert maybe_exists%5#0) // check LocalState exists + let tmp%6#0: bytes = (txn Sender) + let (maybe_value%6#0: uint64, maybe_exists%6#0: bool) = (app_local_get_ex tmp%6#0 0u "localUint2") + (assert maybe_exists%6#0) // check LocalState exists + let tmp%7#0: bytes = (txn Sender) + let (maybe_value%7#0: bytes, maybe_exists%7#0: bool) = (app_local_get_ex tmp%7#0 0u "b1") + (assert maybe_exists%7#0) // check LocalState exists + let tmp%8#0: bytes = (txn Sender) + let (maybe_value%8#0: bytes, maybe_exists%8#0: bool) = (app_local_get_ex tmp%8#0 0u "localBytes2") + (assert maybe_exists%8#0) // check LocalState exists + let tmp%9#0: bytes = (txn Sender) + let (maybe_value%9#0: bytes, maybe_exists%9#0: bool) = (app_local_get_ex tmp%9#0 0u "localEncoded") + (assert maybe_exists%9#0) // check LocalState exists + let copy%1#0: bytes = maybe_value%9#0 + let tmp%10#0: bytes = (txn Sender) + let (maybe_value%10#0: uint64, maybe_exists%10#0: bool) = (app_local_get_ex tmp%10#0 0u "l1") + (assert maybe_exists%10#0) // check LocalState exists + let tmp%11#0: bytes = (txn Sender) + let (maybe_value%11#0: uint64, maybe_exists%11#0: bool) = (app_local_get_ex tmp%11#0 0u "localUint2") + (assert maybe_exists%11#0) // check LocalState exists + let tmp%12#0: bytes = (txn Sender) + let (maybe_value%12#0: bytes, maybe_exists%12#0: bool) = (app_local_get_ex tmp%12#0 0u "b1") + (assert maybe_exists%12#0) // check LocalState exists + let tmp%13#0: bytes = (txn Sender) + let (maybe_value%13#0: bytes, maybe_exists%13#0: bool) = (app_local_get_ex tmp%13#0 0u "localBytes2") + (assert maybe_exists%13#0) // check LocalState exists + let tmp%14#0: bytes = (txn Sender) + let (maybe_value%14#0: bytes, maybe_exists%14#0: bool) = (app_local_get_ex tmp%14#0 0u "localEncoded") + (assert maybe_exists%14#0) // check LocalState exists + let copy%2#0: bytes = maybe_value%14#0 + let tmp%15#0: bytes = (txn Sender) + let (maybe_value%15#0: uint64, maybe_exists%15#0: bool) = (app_local_get_ex tmp%15#0 0u "l1") + (assert maybe_exists%15#0) // check LocalState exists + let tmp%16#0: bytes = (txn Sender) + let (maybe_value%16#0: uint64, maybe_exists%16#0: bool) = (app_local_get_ex tmp%16#0 0u "localUint2") + (assert maybe_exists%16#0) // check LocalState exists + let tmp%17#0: bytes = (txn Sender) + let (maybe_value%17#0: bytes, maybe_exists%17#0: bool) = (app_local_get_ex tmp%17#0 0u "b1") + (assert maybe_exists%17#0) // check LocalState exists + let tmp%18#0: bytes = (txn Sender) + let (maybe_value%18#0: bytes, maybe_exists%18#0: bool) = (app_local_get_ex tmp%18#0 0u "localBytes2") + (assert maybe_exists%18#0) // check LocalState exists + let tmp%19#0: bytes = (txn Sender) + let (maybe_value%19#0: bytes, maybe_exists%19#0: bool) = (app_local_get_ex tmp%19#0 0u "localEncoded") + (assert maybe_exists%19#0) // check LocalState exists + let copy%3#0: bytes = maybe_value%19#0 + let tmp%20#0: bytes = (txn Sender) + let (maybe_value%20#0: uint64, maybe_exists%20#0: bool) = (app_local_get_ex tmp%20#0 0u "l1") + (assert maybe_exists%20#0) // check LocalState exists + let tmp%21#0: bytes = (txn Sender) + let (maybe_value%21#0: uint64, maybe_exists%21#0: bool) = (app_local_get_ex tmp%21#0 0u "localUint2") + (assert maybe_exists%21#0) // check LocalState exists + let tmp%22#0: bytes = (txn Sender) + let (maybe_value%22#0: bytes, maybe_exists%22#0: bool) = (app_local_get_ex tmp%22#0 0u "b1") + (assert maybe_exists%22#0) // check LocalState exists + let tmp%23#0: bytes = (txn Sender) + let (maybe_value%23#0: bytes, maybe_exists%23#0: bool) = (app_local_get_ex tmp%23#0 0u "localBytes2") + (assert maybe_exists%23#0) // check LocalState exists + let tmp%24#0: bytes = (txn Sender) + let (maybe_value%24#0: bytes, maybe_exists%24#0: bool) = (app_local_get_ex tmp%24#0 0u "localEncoded") + (assert maybe_exists%24#0) // check LocalState exists + let copy%4#0: bytes = maybe_value%24#0 + return maybe_value%0#0 maybe_value%6#0 maybe_value%12#0 maybe_value%18#0 copy%4#0 subroutine tests/approvals/local-state.algo.ts::LocalStateDemo.clearState() -> void: block@0: // L32 diff --git a/tests/approvals/out/local-state/local-state.awst b/tests/approvals/out/local-state/local-state.awst index 99a8f94b..e9e7c4d1 100644 --- a/tests/approvals/out/local-state/local-state.awst +++ b/tests/approvals/out/local-state/local-state.awst @@ -30,9 +30,9 @@ contract LocalStateDemo LocalState[txn()]["localEncoded"]: arc4.static_array = copy(c) } - getState(): { localUint: uint64, localUint2: uint64, localBytes: bytes, localBytes2: bytes, localEncoded: arc4.static_array } + getState(): getStateResult{ localUint: uint64, localUint2: uint64, localBytes: bytes, localBytes2: bytes, localEncoded: arc4.static_array } { - return { localUint: LocalState[txn()]["l1"], localUint2: LocalState[txn()]["localUint2"], localBytes: LocalState[txn()]["b1"], localBytes2: LocalState[txn()]["localBytes2"], localEncoded: copy(LocalState[txn()]["localEncoded"]) } + return { localUint: (#0 = { localUint: LocalState[txn()]["l1"], localUint2: LocalState[txn()]["localUint2"], localBytes: LocalState[txn()]["b1"], localBytes2: LocalState[txn()]["localBytes2"], localEncoded: copy(LocalState[txn()]["localEncoded"]) }).localUint, localUint2: #0.localUint2, localBytes: #0.localBytes, localBytes2: #0.localBytes2, localEncoded: #0.localEncoded } } clearState(): void @@ -51,11 +51,11 @@ contract LocalStateDemo Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/local-state/local-state.awst.json b/tests/approvals/out/local-state/local-state.awst.json index 964c4cb2..9aebb516 100644 --- a/tests/approvals/out/local-state/local-state.awst.json +++ b/tests/approvals/out/local-state/local-state.awst.json @@ -109,8 +109,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -312,7 +311,7 @@ "name": "p", "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -431,7 +430,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -506,7 +505,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -563,7 +562,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 15, "end_line": 15, - "column": 4, + "column": 31, "end_column": 36 }, "wtype": { @@ -599,7 +598,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 15, "end_line": 15, - "column": 19, + "column": 23, "end_column": 29 }, "wtype": { @@ -613,8 +612,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "value": { @@ -651,7 +649,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 16, "end_line": 16, - "column": 4, + "column": 32, "end_column": 37 }, "wtype": { @@ -687,7 +685,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 16, "end_line": 16, - "column": 20, + "column": 24, "end_column": 30 }, "wtype": { @@ -701,8 +699,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "value": { @@ -739,7 +736,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 17, "end_line": 17, - "column": 4, + "column": 32, "end_column": 37 }, "wtype": { @@ -775,7 +772,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 17, "end_line": 17, - "column": 20, + "column": 24, "end_column": 30 }, "wtype": { @@ -789,8 +786,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "value": { @@ -827,7 +823,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 18, "end_line": 18, - "column": 4, + "column": 33, "end_column": 38 }, "wtype": { @@ -863,7 +859,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 18, "end_line": 18, - "column": 21, + "column": 25, "end_column": 31 }, "wtype": { @@ -877,8 +873,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "value": { @@ -915,7 +910,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 19, "end_line": 19, - "column": 4, + "column": 34, "end_column": 39 }, "wtype": { @@ -971,7 +966,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 19, "end_line": 19, - "column": 22, + "column": 26, "end_column": 32 }, "wtype": { @@ -985,8 +980,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "value": { @@ -1127,7 +1121,7 @@ "args": [], "return_type": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/local-state.algo.ts::getStateResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1226,7 +1220,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/local-state.algo.ts::getStateResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1297,13 +1291,13 @@ }, "items": [ { - "_type": "AppAccountStateExpression", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 24, - "end_line": 24, - "column": 17, - "end_column": 49 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -1312,58 +1306,533 @@ "ephemeral": false, "scalar_type": 2 }, - "key": { - "_type": "BytesConstant", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 8, - "end_line": 8, - "column": 40, - "end_column": 44 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { - "_type": "WType", - "name": "state_key", + "_type": "WTuple", + "name": "::", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "value": "Y%u", - "encoding": "utf8" - }, - "exists_assertion_message": "check LocalState exists", - "account": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/local-state.algo.ts", - "line": 24, - "end_line": 24, - "column": 32, - "end_column": 42 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] + }, + "items": [ + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 44, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 8, + "end_line": 8, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y%u", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 36, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 46, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 9, + "end_line": 9, + "column": 2, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y*lG)bTR", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 38, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 46, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 10, + "end_line": 10, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Vle", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 38, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 48, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(jZ-Wpgq", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 40, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "Copy", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 62 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "value": { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 50, + "end_column": 55 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(;KkZ)9a;", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 42, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + } + } + ] }, - "op_code": "txn", - "immediates": [ - "Sender" - ], - "stack_args": [], - "comment": null - } + "id": "0" + }, + "name": "localUint" }, { - "_type": "AppAccountStateExpression", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 25, - "end_line": 25, - "column": 18, - "end_column": 51 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -1372,58 +1841,533 @@ "ephemeral": false, "scalar_type": 2 }, - "key": { - "_type": "BytesConstant", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 9, - "end_line": 9, - "column": 2, - "end_column": 12 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { - "_type": "WType", - "name": "state_key", + "_type": "WTuple", + "name": "::", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "value": "Y;R*>Y*lG)bTR", - "encoding": "utf8" - }, - "exists_assertion_message": "check LocalState exists", - "account": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/local-state.algo.ts", - "line": 25, - "end_line": 25, - "column": 34, - "end_column": 44 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] + }, + "items": [ + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 44, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 8, + "end_line": 8, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y%u", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 36, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 46, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 9, + "end_line": 9, + "column": 2, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y*lG)bTR", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 38, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 46, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 10, + "end_line": 10, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Vle", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 38, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 48, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(jZ-Wpgq", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 40, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "Copy", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 62 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "value": { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 50, + "end_column": 55 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(;KkZ)9a;", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 42, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + } + } + ] }, - "op_code": "txn", - "immediates": [ - "Sender" - ], - "stack_args": [], - "comment": null - } + "id": "0" + }, + "name": "localUint2" }, { - "_type": "AppAccountStateExpression", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 26, - "end_line": 26, - "column": 18, - "end_column": 51 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -1432,58 +2376,533 @@ "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 10, - "end_line": 10, - "column": 40, - "end_column": 44 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { - "_type": "WType", - "name": "state_key", + "_type": "WTuple", + "name": "::", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "value": "Vle", - "encoding": "utf8" - }, - "exists_assertion_message": "check LocalState exists", - "account": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/local-state.algo.ts", - "line": 26, - "end_line": 26, - "column": 34, - "end_column": 44 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] + }, + "items": [ + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 44, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 8, + "end_line": 8, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y%u", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 36, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 46, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 9, + "end_line": 9, + "column": 2, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y*lG)bTR", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 38, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 46, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 10, + "end_line": 10, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Vle", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 38, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 48, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(jZ-Wpgq", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 40, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "Copy", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 62 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "value": { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 50, + "end_column": 55 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(;KkZ)9a;", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 42, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + } + } + ] }, - "op_code": "txn", - "immediates": [ - "Sender" - ], - "stack_args": [], - "comment": null - } + "id": "0" + }, + "name": "localBytes" }, { - "_type": "AppAccountStateExpression", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 27, - "end_line": 27, - "column": 19, - "end_column": 53 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -1492,58 +2911,533 @@ "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 11, - "end_line": 11, - "column": 2, - "end_column": 13 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { - "_type": "WType", - "name": "state_key", + "_type": "WTuple", + "name": "::", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "value": "Y;R*>Y(jZ-Wpgq", - "encoding": "utf8" - }, - "exists_assertion_message": "check LocalState exists", - "account": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/local-state.algo.ts", - "line": 27, - "end_line": 27, - "column": 36, - "end_column": 46 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] + }, + "items": [ + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 44, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 8, + "end_line": 8, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y%u", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 36, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 46, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 9, + "end_line": 9, + "column": 2, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y*lG)bTR", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 38, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 46, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 10, + "end_line": 10, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Vle", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 38, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 48, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(jZ-Wpgq", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 40, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "Copy", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 62 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "value": { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 50, + "end_column": 55 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(;KkZ)9a;", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 42, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + } + } + ] }, - "op_code": "txn", - "immediates": [ - "Sender" - ], - "stack_args": [], - "comment": null - } + "id": "0" + }, + "name": "localBytes2" }, { - "_type": "Copy", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 28, - "end_line": 28, - "column": 20, - "end_column": 62 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "ARC4StaticArray", @@ -1572,86 +3466,524 @@ "source_location": null, "array_size": "10" }, - "value": { - "_type": "AppAccountStateExpression", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 28, - "end_line": 28, - "column": 20, - "end_column": 55 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", - "immutable": false, + "_type": "WTuple", + "name": "::", + "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64[10]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { + "scalar_type": null, + "types": [ + { "_type": "WType", "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "arc4_name": "uint64", - "n": "64" - }, - "source_location": null, - "array_size": "10" + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] }, - "key": { - "_type": "BytesConstant", + "source": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 12, - "end_line": 12, - "column": 2, - "end_column": 14 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { - "_type": "WType", - "name": "state_key", + "_type": "WTuple", + "name": "::", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] }, - "value": "Y;R*>Y(;KkZ)9a;", - "encoding": "utf8" + "items": [ + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 44, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 8, + "end_line": 8, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y%u", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 36, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 46, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 9, + "end_line": 9, + "column": 2, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y*lG)bTR", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 38, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 46, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 10, + "end_line": 10, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Vle", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 38, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 48, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(jZ-Wpgq", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 40, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + }, + { + "_type": "Copy", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 62 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "value": { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 50, + "end_column": 55 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(;KkZ)9a;", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 42, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [] + } + } + } + ] }, - "exists_assertion_message": "check LocalState exists", - "account": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/local-state.algo.ts", - "line": 28, - "end_line": 28, - "column": 38, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "txn", - "immediates": [ - "Sender" - ], - "stack_args": [], - "comment": null - } - } + "id": "0" + }, + "name": "localEncoded" } ] } @@ -1687,7 +4019,7 @@ "default_args": {}, "structs": { "output": { - "name": "", + "name": "getStateResult", "elements": [ [ "localUint", @@ -1808,7 +4140,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 33, "end_line": 33, - "column": 19, + "column": 23, "end_column": 29 }, "wtype": { @@ -1822,8 +4154,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -1895,7 +4226,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 34, "end_line": 34, - "column": 20, + "column": 24, "end_column": 30 }, "wtype": { @@ -1909,8 +4240,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -1982,7 +4312,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 35, "end_line": 35, - "column": 20, + "column": 24, "end_column": 30 }, "wtype": { @@ -1996,8 +4326,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -2069,7 +4398,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 36, "end_line": 36, - "column": 21, + "column": 25, "end_column": 31 }, "wtype": { @@ -2083,8 +4412,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -2176,7 +4504,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 37, "end_line": 37, - "column": 22, + "column": 26, "end_column": 32 }, "wtype": { @@ -2190,8 +4518,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -2324,7 +4651,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -2366,42 +4728,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -2411,7 +4738,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, @@ -2698,6 +5025,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/logic-sig/AllowNoFee.teal b/tests/approvals/out/logic-sig/AllowNoFee.teal index 8f97b58c..7a38a2e2 100644 --- a/tests/approvals/out/logic-sig/AllowNoFee.teal +++ b/tests/approvals/out/logic-sig/AllowNoFee.teal @@ -18,6 +18,7 @@ feeIsZero: // tests/approvals/logic-sig.algo.ts:10 // assert(Txn.fee === 0, 'Fee must be zero') txn Fee - ! + pushint 0 // 0 + == assert // Fee must be zero retsub diff --git a/tests/approvals/out/logic-sig/logic-sig.awst b/tests/approvals/out/logic-sig/logic-sig.awst index fa77ae41..04a36865 100644 --- a/tests/approvals/out/logic-sig/logic-sig.awst +++ b/tests/approvals/out/logic-sig/logic-sig.awst @@ -4,7 +4,7 @@ logicsig tests/approvals/logic-sig.algo.ts::AlwaysAllow { } subroutine feeIsZero(): void { - assert(txn() == 0) + assert(txn() == 0, comment=Fee must be zero) } logicsig tests/approvals/logic-sig.algo.ts::AllowNoFee { diff --git a/tests/approvals/out/logic-sig/logic-sig.awst.json b/tests/approvals/out/logic-sig/logic-sig.awst.json index a56a9d6c..b54078fa 100644 --- a/tests/approvals/out/logic-sig/logic-sig.awst.json +++ b/tests/approvals/out/logic-sig/logic-sig.awst.json @@ -78,7 +78,8 @@ "id": "tests/approvals/logic-sig.algo.ts::program", "name": "program" }, - "docstring": "" + "docstring": "", + "avm_version": null }, { "_type": "Subroutine", @@ -117,7 +118,7 @@ "end_column": 43 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/logic-sig.algo.ts", "line": 10, @@ -132,71 +133,66 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/logic-sig.algo.ts", + "line": 10, + "end_line": 10, + "column": 9, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/logic-sig.algo.ts", "line": 10, "end_line": 10, - "column": 9, - "end_column": 22 + "column": 13, + "end_column": 16 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/logic-sig.algo.ts", - "line": 10, - "end_line": 10, - "column": 9, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "txn", - "immediates": [ - "Fee" - ], - "stack_args": [], - "comment": null + "op_code": "txn", + "immediates": [ + "Fee" + ], + "stack_args": [] + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/logic-sig.algo.ts", + "line": 10, + "end_line": 10, + "column": 21, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/logic-sig.algo.ts", - "line": 10, - "end_line": 10, - "column": 21, - "end_column": 22 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } + "value": "0", + "teal_alias": null } - ], - "comment": "Fee must be zero" + }, + "error_message": "Fee must be zero" } } ], @@ -324,6 +320,7 @@ "id": "tests/approvals/logic-sig.algo.ts::program", "name": "program" }, - "docstring": "" + "docstring": "", + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/named-types/MyContract.approval.teal b/tests/approvals/out/named-types/MyContract.approval.teal new file mode 100644 index 00000000..65b31630 --- /dev/null +++ b/tests/approvals/out/named-types/MyContract.approval.teal @@ -0,0 +1,388 @@ +#pragma version 10 + +tests/approvals/named-types.algo.ts::MyContract.approvalProgram: + intcblock 0 1 8 + bytecblock 0x 0x151f7c75 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/named-types.algo.ts::MyContract.constructor() -> void: +constructor: + // tests/approvals/named-types.algo.ts:14 + // export class MyContract extends Contract { + proto 0 0 + retsub + + +// tests/approvals/named-types.algo.ts::MyContract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/named-types.algo.ts:14 + // export class MyContract extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@9 + txna ApplicationArgs 0 + pushbytes 0xf02228b0 // method "getXY()(uint64,uint64)" + pushbytes 0xd908575b // method "getYX()(uint64,uint64)" + pushbytes 0x577b1ffc // method "getAnon()(uint64,uint64)" + pushbytes 0xdc75f81d // method "test((uint64,uint64),(uint64,uint64))void" + pushbytes 0x040e2e4e // method "testing()((uint64,uint64),(uint64,uint64),(uint64,uint64))" + uncover 5 + match __puya_arc4_router___getXY_route@2 __puya_arc4_router___getYX_route@3 __puya_arc4_router___getAnon_route@4 __puya_arc4_router___test_route@5 __puya_arc4_router___testing_route@6 + b __puya_arc4_router___switch_case_default@7 + +__puya_arc4_router___getXY_route@2: + // tests/approvals/named-types.algo.ts:15 + // public getXY(): XY { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub getXY + swap + itob + swap + itob + swap + bytec_0 // 0x + swap + concat + swap + concat + bytec_1 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___getYX_route@3: + // tests/approvals/named-types.algo.ts:22 + // public getYX(): YX { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub getYX + swap + itob + swap + itob + swap + bytec_0 // 0x + swap + concat + swap + concat + bytec_1 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___getAnon_route@4: + // tests/approvals/named-types.algo.ts:29 + // public getAnon() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub getAnon + swap + itob + swap + itob + swap + bytec_0 // 0x + swap + concat + swap + concat + bytec_1 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___test_route@5: + // tests/approvals/named-types.algo.ts:36 + // public test(x: XY, y: YX) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/named-types.algo.ts:14 + // export class MyContract extends Contract { + txna ApplicationArgs 1 + dup + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + btoi + swap + intc_2 // 8 + dup + extract3 // on error: Index access is out of bounds + btoi + txna ApplicationArgs 2 + dup + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + btoi + swap + intc_2 // 8 + dup + extract3 // on error: Index access is out of bounds + btoi + // tests/approvals/named-types.algo.ts:36 + // public test(x: XY, y: YX) { + uncover 3 + uncover 3 + uncover 3 + uncover 3 + callsub test + intc_1 // 1 + retsub + +__puya_arc4_router___testing_route@6: + // tests/approvals/named-types.algo.ts:40 + // public testing() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub testing + cover 5 + cover 4 + cover 3 + cover 2 + swap + itob + swap + itob + swap + bytec_0 // 0x + swap + concat + swap + concat + cover 2 + itob + swap + itob + swap + bytec_0 // 0x + swap + concat + swap + concat + uncover 2 + itob + uncover 3 + itob + swap + bytec_0 // 0x + swap + concat + swap + concat + bytec_0 // 0x + uncover 3 + concat + uncover 2 + concat + swap + concat + bytec_1 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@7: + b __puya_arc4_router___after_if_else@13 + +__puya_arc4_router___bare_routing@9: + // tests/approvals/named-types.algo.ts:14 + // export class MyContract extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@10 + b __puya_arc4_router___switch_case_default@11 + +__puya_arc4_router_____algots__.defaultCreate@10: + // tests/approvals/named-types.algo.ts:14 + // export class MyContract extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@11: + +__puya_arc4_router___after_if_else@13: + // tests/approvals/named-types.algo.ts:14 + // export class MyContract extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/named-types.algo.ts::MyContract.getXY() -> uint64, uint64: +getXY: + // tests/approvals/named-types.algo.ts:15 + // public getXY(): XY { + proto 0 2 + // tests/approvals/named-types.algo.ts:17 + // x: 1, + intc_1 // 1 + // tests/approvals/named-types.algo.ts:18 + // y: 2, + pushint 2 // 2 + // tests/approvals/named-types.algo.ts:16-19 + // return { + // x: 1, + // y: 2, + // } + retsub + + +// tests/approvals/named-types.algo.ts::MyContract.getYX() -> uint64, uint64: +getYX: + // tests/approvals/named-types.algo.ts:22 + // public getYX(): YX { + proto 0 2 + // tests/approvals/named-types.algo.ts:25 + // y: 111, + pushint 111 // 111 + // tests/approvals/named-types.algo.ts:24 + // x: 222, + pushint 222 // 222 + // tests/approvals/named-types.algo.ts:23-26 + // return { + // x: 222, + // y: 111, + // } + retsub + + +// tests/approvals/named-types.algo.ts::MyContract.getAnon() -> uint64, uint64: +getAnon: + // tests/approvals/named-types.algo.ts:29 + // public getAnon() { + proto 0 2 + // tests/approvals/named-types.algo.ts:31 + // x: Uint64(3), + pushint 3 // 3 + // tests/approvals/named-types.algo.ts:32 + // y: Uint64(4), + pushint 4 // 4 + // tests/approvals/named-types.algo.ts:30-33 + // return { + // x: Uint64(3), + // y: Uint64(4), + // } + retsub + + +// tests/approvals/named-types.algo.ts::MyContract.test(x.x: uint64, x.y: uint64, y.y: uint64, y.x: uint64) -> void: +test: + // tests/approvals/named-types.algo.ts:36 + // public test(x: XY, y: YX) { + proto 4 0 + // tests/approvals/named-types.algo.ts:37 + // assertMatch(x, { ...y }) + frame_dig -3 + frame_dig -2 + == + bz test_bool_false@3 + frame_dig -4 + frame_dig -1 + == + bz test_bool_false@3 + intc_1 // 1 + b test_bool_merge@4 + +test_bool_false@3: + intc_0 // 0 + +test_bool_merge@4: + // tests/approvals/named-types.algo.ts:37 + // assertMatch(x, { ...y }) + assert // assert target is match for conditions + retsub + + +// tests/approvals/named-types.algo.ts::MyContract.testing() -> uint64, uint64, uint64, uint64, uint64, uint64: +testing: + // tests/approvals/named-types.algo.ts:40 + // public testing() { + proto 0 6 + // tests/approvals/named-types.algo.ts:41 + // const a = this.getXY() + callsub getXY + swap + // tests/approvals/named-types.algo.ts:42 + // const b = this.getYX() + callsub getYX + cover 2 + // tests/approvals/named-types.algo.ts:43 + // const c = this.getAnon() + callsub getAnon + pop + callsub getAnon + cover 2 + pop + swap + // tests/approvals/named-types.algo.ts:44 + // return [a, b, c] as const + uncover 3 + uncover 5 + uncover 4 + uncover 5 + uncover 5 + uncover 5 + retsub + + +// tests/approvals/named-types.algo.ts::MyContract.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/named-types.algo.ts:14 + // export class MyContract extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/named-types/MyContract.arc32.json b/tests/approvals/out/named-types/MyContract.arc32.json index f26e6d91..4aff9173 100644 --- a/tests/approvals/out/named-types/MyContract.arc32.json +++ b/tests/approvals/out/named-types/MyContract.arc32.json @@ -46,7 +46,7 @@ }, "structs": { "output": { - "name": "", + "name": "getAnonResult", "elements": [ [ "x", @@ -60,6 +60,39 @@ } } }, + "test((uint64,uint64),(uint64,uint64))void": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "x": { + "name": "XY", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + }, + "y": { + "name": "YX", + "elements": [ + [ + "y", + "uint64" + ], + [ + "x", + "uint64" + ] + ] + } + } + }, "testing()((uint64,uint64),(uint64,uint64),(uint64,uint64))": { "call_config": { "no_op": "CALL" @@ -67,7 +100,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwCiAgICBieXRlY2Jsb2NrIDB4MTUxZjdjNzUKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9uYW1lZC10eXBlcy5hbGdvLnRzOjpNeUNvbnRyYWN0Ll9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9uYW1lZC10eXBlcy5hbGdvLnRzOjIxCiAgICAvLyBleHBvcnQgY2xhc3MgTXlDb250cmFjdCBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJ6IF9fcHV5YV9hcmM0X3JvdXRlcl9fX2JhcmVfcm91dGluZ0A4CiAgICBwdXNoYnl0ZXNzIDB4ZjAyMjI4YjAgMHhkOTA4NTc1YiAweDU3N2IxZmZjIDB4MDQwZTJlNGUgLy8gbWV0aG9kICJnZXRYWSgpKHVpbnQ2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C8vIGNvbnN0IGIgPSB0aGlzLmdldFlYKCkKICAgIGNhbGxzdWIgZ2V0WVgKICAgIGNvdmVyIDIKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9uYW1lZC10eXBlcy5hbGdvLnRzOjQzCiAgICAvLyBjb25zdCBjID0gdGhpcy5nZXRBbm9uKCkKICAgIGNhbGxzdWIgZ2V0QW5vbgogICAgcG9wCiAgICBjYWxsc3ViIGdldEFub24KICAgIGNvdmVyIDIKICAgIHBvcAogICAgc3dhcAogICAgLy8gdGVzdHMvYXBwcm92YWxzL25hbWVkLXR5cGVzLmFsZ28udHM6NDQKICAgIC8vIHJldHVybiBbYSwgYiwgY10gYXMgY29uc3QKICAgIHVuY292ZXIgMwogICAgdW5jb3ZlciA1CiAgICB1bmNvdmVyIDQKICAgIHVuY292ZXIgNQogICAgdW5jb3ZlciA1CiAgICB1bmNvdmVyIDUKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9uYW1lZC10eXBlcy5hbGdvLnRzOjpNeUNvbnRyYWN0Ll9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9uYW1lZC10eXBlcy5hbGdvLnRzOjE0CiAgICAvLyBleHBvcnQgY2xhc3MgTXlDb250cmFjdCBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { @@ -117,6 +150,23 @@ "type": "(uint64,uint64)" } }, + { + "name": "test", + "args": [ + { + "type": "(uint64,uint64)", + "name": "x" + }, + { + "type": "(uint64,uint64)", + "name": "y" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, { "name": "testing", "args": [], diff --git a/tests/approvals/out/named-types/MyContract.arc56.json b/tests/approvals/out/named-types/MyContract.arc56.json new file mode 100644 index 00000000..062391c1 --- /dev/null +++ b/tests/approvals/out/named-types/MyContract.arc56.json @@ -0,0 +1,222 @@ +{ + "name": "MyContract", + "structs": { + "XY": [ + { + "name": "x", + "type": "uint64" + }, + { + "name": "y", + "type": "uint64" + } + ], + "YX": [ + { + "name": "y", + "type": "uint64" + }, + { + "name": "x", + "type": "uint64" + } + ], + "getAnonResult": [ + { + "name": "x", + "type": "uint64" + }, + { + "name": "y", + "type": "uint64" + } + ] + }, + "methods": [ + { + "name": "getXY", + "args": [], + "returns": { + "type": "(uint64,uint64)", + "struct": "XY" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "getYX", + "args": [], + "returns": { + "type": "(uint64,uint64)", + "struct": "YX" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "getAnon", + "args": [], + "returns": { + "type": "(uint64,uint64)", + "struct": "getAnonResult" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test", + "args": [ + { + "type": "(uint64,uint64)", + "struct": "XY", + "name": "x" + }, + { + "type": "(uint64,uint64)", + "struct": "YX", + "name": "y" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "testing", + "args": [], + "returns": { + "type": "((uint64,uint64),(uint64,uint64),(uint64,uint64))" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 193, + 198, + 206, + 211 + ], + "errorMessage": "Index access is out of bounds" + }, + { + "pc": [ + 94, + 123, + 152, + 181, + 230 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 369 + ], + "errorMessage": "assert target is match for conditions" + }, + { + "pc": [ + 313 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 99, + 128, + 157, + 186, + 235 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDgKICAgIGJ5dGVjYmxvY2sgMHggMHgxNTFmN2M3NQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICAgY2FsbHN1YiBjb25zdHJ1Y3RvcgoKbWFpbl9hZnRlcl9pZl9lbHNlQDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5jb25zdHJ1Y3RvcigpIC0+IHZvaWQ6CmNvbnN0cnVjdG9yOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL25hbWVkLXR5cGVzLmFsZ28udHM6MTQKICAgIC8vIGV4cG9ydCBjbGFzcyBNeUNvbnRyYWN0IGV4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SB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/named-types/MyContract.clear.teal b/tests/approvals/out/named-types/MyContract.clear.teal new file mode 100644 index 00000000..2074429e --- /dev/null +++ b/tests/approvals/out/named-types/MyContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/named-types.algo.ts::MyContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/named-types/MyContract.ssa.ir b/tests/approvals/out/named-types/MyContract.ssa.ir index b8fbcbc7..0f2d7ab5 100644 --- a/tests/approvals/out/named-types/MyContract.ssa.ir +++ b/tests/approvals/out/named-types/MyContract.ssa.ir @@ -12,24 +12,24 @@ contract tests/approvals/named-types.algo.ts::MyContract: return tmp%0#0 subroutine tests/approvals/named-types.algo.ts::MyContract.constructor() -> void: - block@0: // L21 + block@0: // L14 return subroutine tests/approvals/named-types.algo.ts::MyContract.__puya_arc4_router__() -> bool: - block@0: // L21 + block@0: // L14 let tmp%0#0: uint64 = (txn NumAppArgs) let tmp%1#0: bool = (!= tmp%0#0 0u) - goto tmp%1#0 ? block@1 : block@8 - block@1: // abi_routing_L21 + goto tmp%1#0 ? block@1 : block@9 + block@1: // abi_routing_L14 let tmp%2#0: bytes = (txna ApplicationArgs 0) - switch tmp%2#0 {method "getXY()(uint64,uint64)" => block@2, method "getYX()(uint64,uint64)" => block@3, method "getAnon()(uint64,uint64)" => block@4, method "testing()((uint64,uint64),(uint64,uint64),(uint64,uint64))" => block@5, * => block@6} - block@2: // getXY_route_L22 + switch tmp%2#0 {method "getXY()(uint64,uint64)" => block@2, method "getYX()(uint64,uint64)" => block@3, method "getAnon()(uint64,uint64)" => block@4, method "test((uint64,uint64),(uint64,uint64))void" => block@5, method "testing()((uint64,uint64),(uint64,uint64),(uint64,uint64))" => block@6, * => block@7} + block@2: // getXY_route_L15 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // is not creating + (assert tmp%6#0) // can only call when not creating let (elements_to_encode%0#0: uint64, elements_to_encode%1#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getXY() let val_as_bytes%0#0: bytes = (itob elements_to_encode%0#0) let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) @@ -40,13 +40,13 @@ contract tests/approvals/named-types.algo.ts::MyContract: let tmp%7#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%2#0) (log tmp%7#0) return 1u - block@3: // getYX_route_L29 + block@3: // getYX_route_L22 let tmp%8#0: uint64 = (txn OnCompletion) let tmp%9#0: bool = (== tmp%8#0 NoOp) - (assert tmp%9#0) // OnCompletion is NoOp + (assert tmp%9#0) // OnCompletion is not NoOp let tmp%10#0: uint64 = (txn ApplicationID) let tmp%11#0: bool = (!= tmp%10#0 0u) - (assert tmp%11#0) // is not creating + (assert tmp%11#0) // can only call when not creating let (elements_to_encode%2#0: uint64, elements_to_encode%3#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getYX() let val_as_bytes%2#0: bytes = (itob elements_to_encode%2#0) let val_as_bytes%3#0: bytes = (itob elements_to_encode%3#0) @@ -57,13 +57,13 @@ contract tests/approvals/named-types.algo.ts::MyContract: let tmp%12#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%5#0) (log tmp%12#0) return 1u - block@4: // getAnon_route_L36 + block@4: // getAnon_route_L29 let tmp%13#0: uint64 = (txn OnCompletion) let tmp%14#0: bool = (== tmp%13#0 NoOp) - (assert tmp%14#0) // OnCompletion is NoOp + (assert tmp%14#0) // OnCompletion is not NoOp let tmp%15#0: uint64 = (txn ApplicationID) let tmp%16#0: bool = (!= tmp%15#0 0u) - (assert tmp%16#0) // is not creating + (assert tmp%16#0) // can only call when not creating let (elements_to_encode%4#0: uint64, elements_to_encode%5#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getAnon() let val_as_bytes%4#0: bytes = (itob elements_to_encode%4#0) let val_as_bytes%5#0: bytes = (itob elements_to_encode%5#0) @@ -74,13 +74,32 @@ contract tests/approvals/named-types.algo.ts::MyContract: let tmp%17#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%8#0) (log tmp%17#0) return 1u - block@5: // testing_route_L43 + block@5: // test_route_L36 let tmp%18#0: uint64 = (txn OnCompletion) let tmp%19#0: bool = (== tmp%18#0 NoOp) - (assert tmp%19#0) // OnCompletion is NoOp + (assert tmp%19#0) // OnCompletion is not NoOp let tmp%20#0: uint64 = (txn ApplicationID) let tmp%21#0: bool = (!= tmp%20#0 0u) - (assert tmp%21#0) // is not creating + (assert tmp%21#0) // can only call when not creating + let tmp%22#0: bytes = (txna ApplicationArgs 1) + let item0%0#0: bytes = (extract3 tmp%22#0 0u 8u) // on error: Index access is out of bounds + let item0%0%0#0: uint64 = (btoi item0%0#0) + let item1%0#0: bytes = (extract3 tmp%22#0 8u 8u) // on error: Index access is out of bounds + let item1%0%0#0: uint64 = (btoi item1%0#0) + let tmp%23#0: bytes = (txna ApplicationArgs 2) + let item0%1#0: bytes = (extract3 tmp%23#0 0u 8u) // on error: Index access is out of bounds + let item0%1%0#0: uint64 = (btoi item0%1#0) + let item1%1#0: bytes = (extract3 tmp%23#0 8u 8u) // on error: Index access is out of bounds + let item1%1%0#0: uint64 = (btoi item1%1#0) + tests/approvals/named-types.algo.ts::MyContract.test(item0%0%0#0, item1%0%0#0, item0%1%0#0, item1%1%0#0) + return 1u + block@6: // testing_route_L40 + let tmp%24#0: uint64 = (txn OnCompletion) + let tmp%25#0: bool = (== tmp%24#0 NoOp) + (assert tmp%25#0) // OnCompletion is not NoOp + let tmp%26#0: uint64 = (txn ApplicationID) + let tmp%27#0: bool = (!= tmp%26#0 0u) + (assert tmp%27#0) // can only call when not creating let (elements_to_encode%6#0: uint64, elements_to_encode%7#0: uint64, elements_to_encode%8#0: uint64, elements_to_encode%9#0: uint64, elements_to_encode%10#0: uint64, elements_to_encode%11#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.testing() let val_as_bytes%6#0: bytes = (itob elements_to_encode%6#0) let val_as_bytes%7#0: bytes = (itob elements_to_encode%7#0) @@ -105,50 +124,70 @@ contract tests/approvals/named-types.algo.ts::MyContract: let encoded_tuple_buffer%19#0: bytes = (concat encoded_tuple_buffer%18#0 encoded_tuple_buffer%11#0) let encoded_tuple_buffer%20#0: bytes = (concat encoded_tuple_buffer%19#0 encoded_tuple_buffer%14#0) let encoded_tuple_buffer%21#0: bytes = (concat encoded_tuple_buffer%20#0 encoded_tuple_buffer%17#0) - let tmp%22#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%21#0) - (log tmp%22#0) + let tmp%28#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%21#0) + (log tmp%28#0) return 1u - block@6: // switch_case_default_L21 - goto block@7 - block@7: // switch_case_next_L21 - goto block@12 - block@8: // bare_routing_L21 - let tmp%23#0: uint64 = (txn OnCompletion) - switch tmp%23#0 {0u => block@9, * => block@10} - block@9: // __algots__.defaultCreate_L21 - let tmp%24#0: uint64 = (txn ApplicationID) - let tmp%25#0: bool = (== tmp%24#0 0u) - (assert tmp%25#0) // is creating + block@7: // switch_case_default_L14 + goto block@8 + block@8: // switch_case_next_L14 + goto block@13 + block@9: // bare_routing_L14 + let tmp%29#0: uint64 = (txn OnCompletion) + switch tmp%29#0 {0u => block@10, * => block@11} + block@10: // __algots__.defaultCreate_L14 + let tmp%30#0: uint64 = (txn ApplicationID) + let tmp%31#0: bool = (== tmp%30#0 0u) + (assert tmp%31#0) // can only call when creating tests/approvals/named-types.algo.ts::MyContract.__algots__.defaultCreate() return 1u - block@10: // switch_case_default_L21 - goto block@11 - block@11: // switch_case_next_L21 + block@11: // switch_case_default_L14 goto block@12 - block@12: // after_if_else_L21 + block@12: // switch_case_next_L14 + goto block@13 + block@13: // after_if_else_L14 return 0u subroutine tests/approvals/named-types.algo.ts::MyContract.getXY() -> : - block@0: // L22 + block@0: // L15 return 1u 2u subroutine tests/approvals/named-types.algo.ts::MyContract.getYX() -> : - block@0: // L29 + block@0: // L22 return 111u 222u subroutine tests/approvals/named-types.algo.ts::MyContract.getAnon() -> : - block@0: // L36 + block@0: // L29 return 3u 4u + subroutine tests/approvals/named-types.algo.ts::MyContract.test(x.x: uint64, x.y: uint64, y.y: uint64, y.x: uint64) -> void: + block@0: // L36 + let tmp%0#0: bool = (== x.y#0 y.y#0) + goto tmp%0#0 ? block@1 : block@3 + block@1: // and_contd_L37 + let tmp%1#0: bool = (== x.x#0 y.x#0) + goto tmp%1#0 ? block@2 : block@3 + block@2: // bool_true_L37 + let and_result%0#0: bool = 1u + goto block@4 + block@3: // bool_false_L37 + let and_result%0#1: bool = 0u + goto block@4 + block@4: // bool_merge_L37 + let and_result%0#2: bool = φ(and_result%0#0 <- block@2, and_result%0#1 <- block@3) + (assert and_result%0#2) // assert target is match for conditions + return + subroutine tests/approvals/named-types.algo.ts::MyContract.testing() -> : - block@0: // L43 + block@0: // L40 let (a.x#0: uint64, a.y#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getXY() let (b.y#0: uint64, b.x#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getYX() - let (c.x#0: uint64, c.y#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getAnon() + let (awst_tmp%0#0: uint64, awst_tmp%1#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getAnon() + let (awst_tmp%2#0: uint64, awst_tmp%3#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getAnon() + let (c.x#0: uint64, c.y#0: uint64) = (awst_tmp%0#0, awst_tmp%3#0) return a.x#0 a.y#0 b.y#0 b.x#0 c.x#0 c.y#0 subroutine tests/approvals/named-types.algo.ts::MyContract.__algots__.defaultCreate() -> void: - block@0: // L21 + block@0: // L14 return program clear-state: diff --git a/tests/approvals/out/named-types/named-types.awst b/tests/approvals/out/named-types/named-types.awst index b54b3171..dcaf9256 100644 --- a/tests/approvals/out/named-types/named-types.awst +++ b/tests/approvals/out/named-types/named-types.awst @@ -15,24 +15,29 @@ contract MyContract getXY(): XY{ x: uint64, y: uint64 } { - return { x: (#9 = { x: 1, y: 2 }).x, y: #9.y } + return { x: (#0 = { x: 1, y: 2 }).x, y: #0.y } } getYX(): YX{ y: uint64, x: uint64 } { - return { y: (#10 = { x: 222, y: 111 }).y, x: #10.x } + return { y: (#1 = { x: 222, y: 111 }).y, x: #1.x } } - getAnon(): { x: uint64, y: uint64 } + getAnon(): getAnonResult{ x: uint64, y: uint64 } { - return { x: 3, y: 4 } + return { x: (#2 = { x: 3, y: 4 }).x, y: #2.y } + } + + test(): void + { + assert(x.y == y.y and x.x == y.x, comment=assert target is match for conditions) } testing(): readonlytuple[XY{ x: uint64, y: uint64 }, YX{ y: uint64, x: uint64 }, { x: uint64, y: uint64 }] { a: XY{ x: uint64, y: uint64 } = this.getXY() b: YX{ y: uint64, x: uint64 } = this.getYX() - c: { x: uint64, y: uint64 } = this.getAnon() + c: { x: uint64, y: uint64 } = { x: (#3 = this.getAnon()).x, y: #3.y } return [a, b, c] } @@ -43,11 +48,11 @@ contract MyContract Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/named-types/named-types.awst.json b/tests/approvals/out/named-types/named-types.awst.json index c48dff3b..604d3bb2 100644 --- a/tests/approvals/out/named-types/named-types.awst.json +++ b/tests/approvals/out/named-types/named-types.awst.json @@ -3,8 +3,8 @@ "_type": "Contract", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -109,8 +109,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -301,15 +300,15 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 22, - "end_line": 22, + "line": 15, + "end_line": 15, "column": 2, "end_column": 20 }, "args": [], "return_type": { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -338,8 +337,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 22, - "end_line": 27, + "line": 15, + "end_line": 20, "column": 21, "end_column": 3 }, @@ -348,8 +347,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 4, "end_column": 5 }, @@ -357,14 +356,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -394,8 +393,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, @@ -410,14 +409,14 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -446,14 +445,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -483,8 +482,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 17, + "end_line": 17, "column": 9, "end_column": 10 }, @@ -502,8 +501,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 18, + "end_line": 18, "column": 9, "end_column": 10 }, @@ -519,7 +518,7 @@ } ] }, - "id": "9" + "id": "0" }, "name": "x" }, @@ -527,8 +526,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, @@ -543,14 +542,14 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -579,14 +578,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -616,8 +615,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 17, + "end_line": 17, "column": 9, "end_column": 10 }, @@ -635,8 +634,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 18, + "end_line": 18, "column": 9, "end_column": 10 }, @@ -652,7 +651,7 @@ } ] }, - "id": "9" + "id": "0" }, "name": "y" } @@ -675,8 +674,8 @@ "_type": "ARC4ABIMethodConfig", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 22, - "end_line": 22, + "line": 15, + "end_line": 15, "column": 2, "end_column": 20 }, @@ -709,15 +708,15 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 29, - "end_line": 29, + "line": 22, + "end_line": 22, "column": 2, "end_column": 20 }, "args": [], "return_type": { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -746,8 +745,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 29, - "end_line": 34, + "line": 22, + "end_line": 27, "column": 21, "end_column": 3 }, @@ -756,8 +755,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 4, "end_column": 5 }, @@ -765,14 +764,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -802,8 +801,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, @@ -818,14 +817,14 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -854,14 +853,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -891,8 +890,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 31, - "end_line": 31, + "line": 24, + "end_line": 24, "column": 9, "end_column": 12 }, @@ -910,8 +909,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 25, + "end_line": 25, "column": 9, "end_column": 12 }, @@ -927,7 +926,7 @@ } ] }, - "id": "10" + "id": "1" }, "name": "y" }, @@ -935,8 +934,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, @@ -951,14 +950,14 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -987,14 +986,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1024,8 +1023,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 31, - "end_line": 31, + "line": 24, + "end_line": 24, "column": 9, "end_column": 12 }, @@ -1043,8 +1042,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 25, + "end_line": 25, "column": 9, "end_column": 12 }, @@ -1060,7 +1059,7 @@ } ] }, - "id": "10" + "id": "1" }, "name": "x" } @@ -1083,8 +1082,8 @@ "_type": "ARC4ABIMethodConfig", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 29, - "end_line": 29, + "line": 22, + "end_line": 22, "column": 2, "end_column": 20 }, @@ -1117,15 +1116,15 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 36, - "end_line": 36, + "line": 29, + "end_line": 29, "column": 2, "end_column": 18 }, "args": [], "return_type": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/named-types.algo.ts::getAnonResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1154,8 +1153,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 36, - "end_line": 41, + "line": 29, + "end_line": 34, "column": 19, "end_column": 3 }, @@ -1164,8 +1163,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 37, - "end_line": 40, + "line": 30, + "end_line": 33, "column": 4, "end_column": 5 }, @@ -1173,14 +1172,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 37, - "end_line": 40, + "line": 30, + "end_line": 33, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/named-types.algo.ts::getAnonResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1207,13 +1206,13 @@ }, "items": [ { - "_type": "IntegerConstant", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 38, - "end_line": 38, - "column": 16, - "end_column": 17 + "line": 30, + "end_line": 33, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -1222,17 +1221,131 @@ "ephemeral": false, "scalar_type": 2 }, - "value": "3", - "teal_alias": null + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 30, + "end_line": 33, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 30, + "end_line": 33, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "items": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 31, + "end_line": 31, + "column": 16, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "3", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 32, + "end_line": 32, + "column": 16, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "4", + "teal_alias": null + } + ] + }, + "id": "2" + }, + "name": "x" }, { - "_type": "IntegerConstant", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 39, - "end_line": 39, - "column": 16, - "end_column": 17 + "line": 30, + "end_line": 33, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -1241,51 +1354,634 @@ "ephemeral": false, "scalar_type": 2 }, - "value": "4", - "teal_alias": null - } - ] - } - } - ], - "label": null, - "comment": null - }, - "documentation": { - "_type": "MethodDocumentation", - "description": null, - "args": {}, - "returns": null - }, - "cref": "tests/approvals/named-types.algo.ts::MyContract", - "member_name": "getAnon", - "arc4_method_config": { - "_type": "ARC4ABIMethodConfig", - "source_location": { - "file": "tests/approvals/named-types.algo.ts", - "line": 36, - "end_line": 36, - "column": 2, - "end_column": 18 - }, - "name": "getAnon", - "is_bare": false, - "create": 3, - "readonly": false, - "allowed_completion_types": [ - 0 - ], - "default_args": {}, - "structs": { - "output": { - "name": "", - "elements": [ + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 30, + "end_line": 33, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 30, + "end_line": 33, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "items": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 31, + "end_line": 31, + "column": 16, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "3", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 32, + "end_line": 32, + "column": 16, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "4", + "teal_alias": null + } + ] + }, + "id": "2" + }, + "name": "y" + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/named-types.algo.ts::MyContract", + "member_name": "getAnon", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 29, + "end_line": 29, + "column": 2, + "end_column": 18 + }, + "name": "getAnon", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "output": { + "name": "getAnonResult", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + } + } + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 36, + "end_line": 36, + "column": 2, + "end_column": 27 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "x", + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::XY", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 36, + "end_line": 36, + "column": 14, + "end_column": 19 + } + }, + { + "_type": "SubroutineArgument", + "name": "y", + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::YX", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "y", + "x" + ] + }, + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 36, + "end_line": 36, + "column": 21, + "end_column": 26 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 36, + "end_line": 38, + "column": 28, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 16, + "end_column": 17 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::XY", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "name": "x" + }, + "name": "y" + }, + "operator": "==", + "rhs": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::YX", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "y", + "x" + ] + }, + "name": "y" + }, + "name": "y" + } + }, + "op": "and", + "right": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 16, + "end_column": 17 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::XY", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "name": "x" + }, + "name": "x" + }, + "operator": "==", + "rhs": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::YX", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "y", + "x" + ] + }, + "name": "y" + }, + "name": "x" + } + } + }, + "error_message": "assert target is match for conditions" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/named-types.algo.ts::MyContract", + "member_name": "test", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 36, + "end_line": 36, + "column": 2, + "end_column": 27 + }, + "name": "test", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "x": { + "name": "XY", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + }, + "y": { + "name": "YX", + "elements": [ [ - "x", + "y", "uint64" ], [ - "y", + "x", "uint64" ] ] @@ -1297,8 +1993,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 40, + "end_line": 40, "column": 2, "end_column": 18 }, @@ -1312,7 +2008,7 @@ "types": [ { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1339,7 +2035,7 @@ }, { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1366,7 +2062,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1397,8 +2093,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 43, - "end_line": 48, + "line": 40, + "end_line": 45, "column": 19, "end_column": 3 }, @@ -1407,8 +2103,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 44, - "end_line": 44, + "line": 41, + "end_line": 41, "column": 10, "end_column": 26 }, @@ -1416,14 +2112,14 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 44, - "end_line": 44, + "line": 41, + "end_line": 41, "column": 10, "end_column": 11 }, "wtype": { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1454,14 +2150,14 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 44, - "end_line": 44, + "line": 41, + "end_line": 41, "column": 14, "end_column": 26 }, "wtype": { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1497,8 +2193,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 42, + "end_line": 42, "column": 10, "end_column": 26 }, @@ -1506,14 +2202,14 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 42, + "end_line": 42, "column": 10, "end_column": 11 }, "wtype": { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1544,14 +2240,14 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 42, + "end_line": 42, "column": 14, "end_column": 26 }, "wtype": { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1587,8 +2283,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 43, + "end_line": 43, "column": 10, "end_column": 28 }, @@ -1596,14 +2292,14 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 43, + "end_line": 43, "column": 10, "end_column": 11 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1631,17 +2327,17 @@ "name": "c" }, "value": { - "_type": "SubroutineCallExpression", + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 43, + "end_line": 43, "column": 14, "end_column": 28 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1666,19 +2362,212 @@ "y" ] }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "getAnon" - }, - "args": [] + "items": [ + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 14, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 14, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::getAnonResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 14, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::getAnonResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "getAnon" + }, + "args": [] + }, + "id": "3" + }, + "name": "x" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 14, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 14, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::getAnonResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 14, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::getAnonResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "getAnon" + }, + "args": [] + }, + "id": "3" + }, + "name": "y" + } + ] } }, { "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 44, + "end_line": 44, "column": 4, "end_column": 29 }, @@ -1686,8 +2575,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 44, + "end_line": 44, "column": 11, "end_column": 20 }, @@ -1700,7 +2589,7 @@ "types": [ { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1727,7 +2616,7 @@ }, { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1754,7 +2643,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1786,14 +2675,14 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 44, + "end_line": 44, "column": 12, "end_column": 13 }, "wtype": { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1824,14 +2713,14 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 44, + "end_line": 44, "column": 15, "end_column": 16 }, "wtype": { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1862,14 +2751,14 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 44, + "end_line": 44, "column": 18, "end_column": 19 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1915,8 +2804,8 @@ "_type": "ARC4ABIMethodConfig", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 40, + "end_line": 40, "column": 2, "end_column": 18 }, @@ -1935,8 +2824,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -1952,8 +2841,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -1962,8 +2851,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -1971,8 +2860,8 @@ "_type": "VoidConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -2027,7 +2916,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -2069,42 +2993,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -2114,7 +3003,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, @@ -2122,8 +3011,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -2139,8 +3028,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -2160,8 +3049,8 @@ "_type": "ARC4BareMethodConfig", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -2180,6 +3069,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/non-arc4/HelloWorldContract.approval.teal b/tests/approvals/out/non-arc4/HelloWorldContract.approval.teal new file mode 100644 index 00000000..4188046c --- /dev/null +++ b/tests/approvals/out/non-arc4/HelloWorldContract.approval.teal @@ -0,0 +1,30 @@ +#pragma version 10 + +tests/approvals/non-arc4.algo.ts::HelloWorldContract.approvalProgram: + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/non-arc4.algo.ts:5 + // const name = String(op.Txn.applicationArgs(0)) + pushint 0 // 0 + txnas ApplicationArgs + // tests/approvals/non-arc4.algo.ts:6 + // log(`Hello, ${name}`) + pushbytes "Hello, " + swap + concat + log + // tests/approvals/non-arc4.algo.ts:7 + // return true + pushint 1 // 1 + return + + +// tests/approvals/non-arc4.algo.ts::HelloWorldContract.constructor() -> void: +constructor: + // tests/approvals/non-arc4.algo.ts:3 + // export default class HelloWorldContract extends BaseContract { + proto 0 0 + retsub diff --git a/tests/approvals/out/non-arc4/HelloWorldContract.clear.teal b/tests/approvals/out/non-arc4/HelloWorldContract.clear.teal new file mode 100644 index 00000000..095a92a3 --- /dev/null +++ b/tests/approvals/out/non-arc4/HelloWorldContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/non-arc4.algo.ts::HelloWorldContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/non-arc4/non-arc4.awst b/tests/approvals/out/non-arc4/non-arc4.awst index f5fe9150..7bdf1c6c 100644 --- a/tests/approvals/out/non-arc4/non-arc4.awst +++ b/tests/approvals/out/non-arc4/non-arc4.awst @@ -25,9 +25,8 @@ contract HelloWorldContract void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/non-arc4/non-arc4.awst.json b/tests/approvals/out/non-arc4/non-arc4.awst.json index 61600782..b15026a1 100644 --- a/tests/approvals/out/non-arc4/non-arc4.awst.json +++ b/tests/approvals/out/non-arc4/non-arc4.awst.json @@ -107,8 +107,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -256,8 +255,7 @@ "value": "0", "teal_alias": null } - ], - "comment": null + ] } } }, @@ -360,8 +358,7 @@ } } } - ], - "comment": null + ] } }, { @@ -649,42 +646,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -694,7 +656,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -706,6 +668,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/object-destructuring/object-destructuring.awst b/tests/approvals/out/object-destructuring/object-destructuring.awst index f363b04e..dcb36054 100644 --- a/tests/approvals/out/object-destructuring/object-destructuring.awst +++ b/tests/approvals/out/object-destructuring/object-destructuring.awst @@ -1,18 +1,18 @@ subroutine testPartialDestructure(arg: { x: uint64, y: uint64, z: uint64 }): void { { x: x, y: _, z: _₁ }: { x: uint64, y: uint64, z: uint64 } = arg - { nested: { y: y, x: _₂, z: _₃ } }: { nested: { y: uint64, x: uint64, z: uint64 } } = { nested: (#2 = { nested: { y: arg.y, x: arg.x, z: arg.z } }).nested } + { nested: { y: y, x: _₂, z: _₃ } }: { nested: { y: uint64, x: uint64, z: uint64 } } = { nested: (#0 = { nested: { y: arg.y, x: arg.x, z: arg.z } }).nested } } subroutine test(): void { - { a: a, b: b, c: c, d: d }: { a: uint64, b: bytes, c: bool, d: biguint } = tests/approvals/object-destructuring.algo.ts::produceItems() - { d: e, a: _, b: _₁, c: _₂ }: { d: biguint, a: uint64, b: bytes, c: bool } = { d: (#3 = tests/approvals/object-destructuring.algo.ts::produceItems()).d, a: #3.a, b: #3.b, c: #3.c } - f: { a: uint64, b: bytes, c: bool, d: biguint } = { a: (#5 = ({ a: g, d: i, b: _₃, c: _₄ } = { a: (#4 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, d: #4.d, b: #4.b, c: #4.c })).a, b: #5.b, c: #5.c, d: #5.d } - tests/approvals/object-destructuring.algo.ts::receivePartial({ a: (#6 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, d: #6.d }) + { a: a, b: b, c: c, d: d }: { a: uint64, b: bytes, c: bool, d: biguint } = { a: (#1 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, b: #1.b, c: #1.c, d: #1.d } + { d: e, a: _, b: _₁, c: _₂ }: { d: biguint, a: uint64, b: bytes, c: bool } = { d: (#2 = tests/approvals/object-destructuring.algo.ts::produceItems()).d, a: #2.a, b: #2.b, c: #2.c } + f: { a: uint64, b: bytes, c: bool, d: biguint } = { a: (#3 = ({ a: g, d: i, b: _₃, c: _₄ } = { a: (#4 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, d: #4.d, b: #4.b, c: #4.c })).a, b: #3.b, c: #3.c, d: #3.d } + tests/approvals/object-destructuring.algo.ts::receivePartial({ a: (#5 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, d: #5.d }) } -subroutine produceItems(): { a: uint64, b: bytes, c: bool, d: biguint } +subroutine produceItems(): produceItemsResult{ a: uint64, b: bytes, c: bool, d: biguint } { - return { a: (#7 = { a: 1, b: "", c: False, d: 999 }).a, b: #7.b, c: #7.c, d: #7.d } + return { a: (#6 = { a: 1, b: "", c: False, d: 999 }).a, b: #6.b, c: #6.c, d: #6.d } } subroutine receivePartial(x: { a: uint64, d: biguint }): void { @@ -25,7 +25,7 @@ subroutine testLiteralToLiteral(): void } subroutine testNumericResolution(): void { - x: { a: uint64 } = (y = { a: (#8 = { a: 434 }).a }) + x: { a: uint64 } = (y = { a: (#7 = { a: 434 }).a }) } subroutine test2(args: { x: bool, y: bool, z: readonlytuple[string, string] }): void { diff --git a/tests/approvals/out/object-destructuring/object-destructuring.awst.json b/tests/approvals/out/object-destructuring/object-destructuring.awst.json index 4f69a4ad..4c1f15ae 100644 --- a/tests/approvals/out/object-destructuring/object-destructuring.awst.json +++ b/tests/approvals/out/object-destructuring/object-destructuring.awst.json @@ -14,7 +14,7 @@ "name": "arg", "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -93,7 +93,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -194,7 +194,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -250,14 +250,14 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -307,7 +307,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -410,14 +410,14 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -467,7 +467,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -511,14 +511,14 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -567,14 +567,14 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -624,7 +624,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -685,7 +685,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -749,7 +749,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -813,7 +813,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -854,7 +854,7 @@ } ] }, - "id": "2" + "id": "0" }, "name": "nested" } @@ -921,7 +921,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1038,7 +1038,7 @@ ] }, "value": { - "_type": "SubroutineCallExpression", + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/object-destructuring.algo.ts", "line": 12, @@ -1048,7 +1048,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1089,11 +1089,528 @@ "d" ] }, - "target": { - "_type": "SubroutineID", - "target": "tests/approvals/object-destructuring.algo.ts::produceItems" - }, - "args": [] + "items": [ + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "source": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/object-destructuring.algo.ts::produceItems" + }, + "args": [] + }, + "id": "1" + }, + "name": "a" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "source": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/object-destructuring.algo.ts::produceItems" + }, + "args": [] + }, + "id": "1" + }, + "name": "b" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "source": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/object-destructuring.algo.ts::produceItems" + }, + "args": [] + }, + "id": "1" + }, + "name": "c" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "source": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/object-destructuring.algo.ts::produceItems" + }, + "args": [] + }, + "id": "1" + }, + "name": "d" + } + ] } }, { @@ -1116,7 +1633,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1243,7 +1760,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1312,7 +1829,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1364,7 +1881,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1411,7 +1928,7 @@ }, "args": [] }, - "id": "3" + "id": "2" }, "name": "d" }, @@ -1442,7 +1959,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1494,7 +2011,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1541,7 +2058,7 @@ }, "args": [] }, - "id": "3" + "id": "2" }, "name": "a" }, @@ -1572,7 +2089,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1624,7 +2141,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1671,7 +2188,7 @@ }, "args": [] }, - "id": "3" + "id": "2" }, "name": "b" }, @@ -1702,7 +2219,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1754,7 +2271,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1801,7 +2318,7 @@ }, "args": [] }, - "id": "3" + "id": "2" }, "name": "c" } @@ -1828,7 +2345,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1882,7 +2399,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1951,7 +2468,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2003,7 +2520,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2055,7 +2572,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2182,7 +2699,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2251,7 +2768,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2303,7 +2820,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2381,7 +2898,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2433,7 +2950,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2511,7 +3028,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2563,7 +3080,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2641,7 +3158,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2693,7 +3210,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2747,7 +3264,7 @@ ] } }, - "id": "5" + "id": "3" }, "name": "a" }, @@ -2778,7 +3295,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2830,7 +3347,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2882,7 +3399,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3009,7 +3526,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3078,7 +3595,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3130,7 +3647,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3208,7 +3725,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3260,7 +3777,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3338,7 +3855,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3390,7 +3907,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3468,7 +3985,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3520,7 +4037,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3574,7 +4091,7 @@ ] } }, - "id": "5" + "id": "3" }, "name": "b" }, @@ -3605,7 +4122,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3657,7 +4174,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3709,7 +4226,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3836,7 +4353,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3905,7 +4422,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3957,7 +4474,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4035,7 +4552,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4087,7 +4604,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4165,7 +4682,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4217,7 +4734,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4295,7 +4812,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4347,7 +4864,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4401,7 +4918,7 @@ ] } }, - "id": "5" + "id": "3" }, "name": "c" }, @@ -4432,7 +4949,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4484,7 +5001,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4536,7 +5053,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4663,7 +5180,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4732,7 +5249,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4784,7 +5301,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4862,7 +5379,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4914,7 +5431,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4992,7 +5509,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5044,7 +5561,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5122,7 +5639,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5174,7 +5691,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5228,7 +5745,7 @@ ] } }, - "id": "5" + "id": "3" }, "name": "d" } @@ -5279,7 +5796,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5332,7 +5849,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5384,7 +5901,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5431,7 +5948,7 @@ }, "args": [] }, - "id": "6" + "id": "5" }, "name": "a" }, @@ -5462,7 +5979,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5514,7 +6031,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5561,7 +6078,7 @@ }, "args": [] }, - "id": "6" + "id": "5" }, "name": "d" } @@ -5596,7 +6113,7 @@ "args": [], "return_type": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5667,7 +6184,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5736,7 +6253,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5788,7 +6305,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5907,7 +6424,7 @@ } ] }, - "id": "7" + "id": "6" }, "name": "a" }, @@ -5938,7 +6455,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5990,7 +6507,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6109,7 +6626,7 @@ } ] }, - "id": "7" + "id": "6" }, "name": "b" }, @@ -6140,7 +6657,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6192,7 +6709,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6311,7 +6828,7 @@ } ] }, - "id": "7" + "id": "6" }, "name": "c" }, @@ -6342,7 +6859,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6394,7 +6911,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6513,7 +7030,7 @@ } ] }, - "id": "7" + "id": "6" }, "name": "d" } @@ -6548,7 +7065,7 @@ "name": "x", "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6752,7 +7269,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6827,7 +7344,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6863,7 +7380,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6938,7 +7455,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7064,7 +7581,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7094,7 +7611,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7122,7 +7639,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7152,7 +7669,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7197,7 +7714,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7225,7 +7742,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7264,7 +7781,7 @@ } ] }, - "id": "8" + "id": "7" }, "name": "a" } @@ -7300,7 +7817,7 @@ "name": "args", "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7395,7 +7912,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7416,7 +7933,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7520,7 +8037,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7655,7 +8172,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7676,7 +8193,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7780,7 +8297,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7854,7 +8371,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7916,7 +8433,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -8045,7 +8562,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, diff --git a/tests/approvals/out/pre-approved-sale/PreApprovedSale.ssa.ir b/tests/approvals/out/pre-approved-sale/PreApprovedSale.ssa.ir index 8ff1ed0b..60afa8bf 100644 --- a/tests/approvals/out/pre-approved-sale/PreApprovedSale.ssa.ir +++ b/tests/approvals/out/pre-approved-sale/PreApprovedSale.ssa.ir @@ -1,6 +1,6 @@ program logicsig tests/approvals/pre-approved-sale.algo.ts::PreApprovedSale: subroutine tests/approvals/pre-approved-sale.algo.ts::program() -> bool: - block@0: // L5 + block@0: // L11 let seller#0: bytes = TemplateVar[bytes](TMPL_SELLER) let price#0: uint64 = TemplateVar[uint64](TMPL_PRICE) let asset#0: uint64 = TemplateVar[uint64](TMPL_ASSET) @@ -9,47 +9,47 @@ program logicsig tests/approvals/pre-approved-sale.algo.ts::PreApprovedSale: let tmp%0#0: bytes = ((gtxns Receiver) payTxn#0) let tmp%1#0: bool = (== tmp%0#0 seller#0) goto tmp%1#0 ? block@1 : block@3 - block@1: // and_contd_L12 + block@1: // and_contd_L18 let tmp%2#0: uint64 = ((gtxns Amount) payTxn#0) let tmp%3#0: bool = (== tmp%2#0 price#0) goto tmp%3#0 ? block@2 : block@3 - block@2: // bool_true_L12 + block@2: // bool_true_L18 let and_result%0#0: bool = 1u goto block@4 - block@3: // bool_false_L12 + block@3: // bool_false_L18 let and_result%0#1: bool = 0u goto block@4 - block@4: // bool_merge_L12 + block@4: // bool_merge_L18 let and_result%0#2: bool = φ(and_result%0#0 <- block@2, and_result%0#1 <- block@3) (assert and_result%0#2) // assert target is match for conditions let tmp%4#0: uint64 = ((gtxns AssetAmount) assetTxn#0) let tmp%5#0: bool = (== tmp%4#0 1u) goto tmp%5#0 ? block@5 : block@10 - block@5: // and_contd_L17 + block@5: // and_contd_L23 let tmp%6#0: bytes = ((gtxns Sender) assetTxn#0) let tmp%7#0: bool = (== tmp%6#0 seller#0) goto tmp%7#0 ? block@6 : block@10 - block@6: // and_contd_L17 + block@6: // and_contd_L23 let tmp%8#0: uint64 = ((gtxns XferAsset) assetTxn#0) let tmp%9#0: bool = (== tmp%8#0 asset#0) goto tmp%9#0 ? block@7 : block@10 - block@7: // and_contd_L17 + block@7: // and_contd_L23 let tmp%10#0: bytes = ((gtxns AssetCloseTo) assetTxn#0) let tmp%11#0: bytes = (global ZeroAddress) let tmp%12#0: bool = (== tmp%10#0 tmp%11#0) goto tmp%12#0 ? block@8 : block@10 - block@8: // and_contd_L17 + block@8: // and_contd_L23 let tmp%13#0: bytes = ((gtxns RekeyTo) assetTxn#0) let tmp%14#0: bytes = (global ZeroAddress) let tmp%15#0: bool = (== tmp%13#0 tmp%14#0) goto tmp%15#0 ? block@9 : block@10 - block@9: // bool_true_L17 + block@9: // bool_true_L23 let and_result%1#0: bool = 1u goto block@11 - block@10: // bool_false_L17 + block@10: // bool_false_L23 let and_result%1#1: bool = 0u goto block@11 - block@11: // bool_merge_L17 + block@11: // bool_merge_L23 let and_result%1#2: bool = φ(and_result%1#0 <- block@9, and_result%1#1 <- block@10) (assert and_result%1#2) // assert target is match for conditions return 1u \ No newline at end of file diff --git a/tests/approvals/out/pre-approved-sale/PreApprovedSale.teal b/tests/approvals/out/pre-approved-sale/PreApprovedSale.teal index e2f1f0f4..442f7ee1 100644 --- a/tests/approvals/out/pre-approved-sale/PreApprovedSale.teal +++ b/tests/approvals/out/pre-approved-sale/PreApprovedSale.teal @@ -3,22 +3,22 @@ tests/approvals/pre-approved-sale.algo.ts::PreApprovedSale: intcblock 1 0 TMPL_PRICE TMPL_ASSET bytecblock TMPL_SELLER - // tests/approvals/pre-approved-sale.algo.ts:6 + // tests/approvals/pre-approved-sale.algo.ts:12 // const seller = TemplateVar('SELLER') bytec_0 // TMPL_SELLER - // tests/approvals/pre-approved-sale.algo.ts:7 + dup + // tests/approvals/pre-approved-sale.algo.ts:13 // const price = TemplateVar('PRICE') intc_2 // TMPL_PRICE - // tests/approvals/pre-approved-sale.algo.ts:8 + swap + // tests/approvals/pre-approved-sale.algo.ts:14 // const asset = TemplateVar('ASSET') intc_3 // TMPL_ASSET - // tests/approvals/pre-approved-sale.algo.ts:6 - // const seller = TemplateVar('SELLER') - bytec_0 // TMPL_SELLER - // tests/approvals/pre-approved-sale.algo.ts:10 + swap + // tests/approvals/pre-approved-sale.algo.ts:16 // const payTxn = gtxn.PaymentTxn(0) intc_1 // 0 - // tests/approvals/pre-approved-sale.algo.ts:12-15 + // tests/approvals/pre-approved-sale.algo.ts:18-21 // assertMatch(payTxn, { // receiver: seller, // amount: price, @@ -26,10 +26,10 @@ tests/approvals/pre-approved-sale.algo.ts::PreApprovedSale: gtxns Receiver == bz main_bool_false@3 - // tests/approvals/pre-approved-sale.algo.ts:10 + // tests/approvals/pre-approved-sale.algo.ts:16 // const payTxn = gtxn.PaymentTxn(0) intc_1 // 0 - // tests/approvals/pre-approved-sale.algo.ts:12-15 + // tests/approvals/pre-approved-sale.algo.ts:18-21 // assertMatch(payTxn, { // receiver: seller, // amount: price, @@ -45,16 +45,16 @@ main_bool_false@3: intc_1 // 0 main_bool_merge@4: - // tests/approvals/pre-approved-sale.algo.ts:12-15 + // tests/approvals/pre-approved-sale.algo.ts:18-21 // assertMatch(payTxn, { // receiver: seller, // amount: price, // }) assert // assert target is match for conditions - // tests/approvals/pre-approved-sale.algo.ts:11 + // tests/approvals/pre-approved-sale.algo.ts:17 // const assetTxn = gtxn.AssetTransferTxn(1) intc_0 // 1 - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -63,10 +63,10 @@ main_bool_merge@4: // rekeyTo: Global.zeroAddress, // }) gtxns AssetAmount - // tests/approvals/pre-approved-sale.algo.ts:18 + // tests/approvals/pre-approved-sale.algo.ts:24 // assetAmount: Uint64(1), intc_0 // 1 - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -76,10 +76,10 @@ main_bool_merge@4: // }) == bz main_bool_false@10 - // tests/approvals/pre-approved-sale.algo.ts:11 + // tests/approvals/pre-approved-sale.algo.ts:17 // const assetTxn = gtxn.AssetTransferTxn(1) intc_0 // 1 - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -91,10 +91,10 @@ main_bool_merge@4: dig 3 == bz main_bool_false@10 - // tests/approvals/pre-approved-sale.algo.ts:11 + // tests/approvals/pre-approved-sale.algo.ts:17 // const assetTxn = gtxn.AssetTransferTxn(1) intc_0 // 1 - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -106,10 +106,10 @@ main_bool_merge@4: dig 1 == bz main_bool_false@10 - // tests/approvals/pre-approved-sale.algo.ts:11 + // tests/approvals/pre-approved-sale.algo.ts:17 // const assetTxn = gtxn.AssetTransferTxn(1) intc_0 // 1 - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -118,10 +118,10 @@ main_bool_merge@4: // rekeyTo: Global.zeroAddress, // }) gtxns AssetCloseTo - // tests/approvals/pre-approved-sale.algo.ts:21 + // tests/approvals/pre-approved-sale.algo.ts:27 // assetCloseTo: Global.zeroAddress, global ZeroAddress - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -131,10 +131,10 @@ main_bool_merge@4: // }) == bz main_bool_false@10 - // tests/approvals/pre-approved-sale.algo.ts:11 + // tests/approvals/pre-approved-sale.algo.ts:17 // const assetTxn = gtxn.AssetTransferTxn(1) intc_0 // 1 - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -143,10 +143,10 @@ main_bool_merge@4: // rekeyTo: Global.zeroAddress, // }) gtxns RekeyTo - // tests/approvals/pre-approved-sale.algo.ts:22 + // tests/approvals/pre-approved-sale.algo.ts:28 // rekeyTo: Global.zeroAddress, global ZeroAddress - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -163,7 +163,7 @@ main_bool_false@10: intc_1 // 0 main_bool_merge@11: - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -172,7 +172,7 @@ main_bool_merge@11: // rekeyTo: Global.zeroAddress, // }) assert // assert target is match for conditions - // tests/approvals/pre-approved-sale.algo.ts:25 + // tests/approvals/pre-approved-sale.algo.ts:31 // return true intc_0 // 1 return diff --git a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst index 66731d8a..ef81ebce 100644 --- a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst +++ b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst @@ -5,7 +5,7 @@ logicsig tests/approvals/pre-approved-sale.algo.ts::PreApprovedSale { asset: asset = TemplateVar[asset](TMPL_ASSET) payTxn: group_transaction_pay = reinterpret_cast(0) assetTxn: group_transaction_axfer = reinterpret_cast(1) - assert(gtxns(payTxn) == seller and gtxns(payTxn) == price) - assert(gtxns(assetTxn) == 1 and gtxns(assetTxn) == seller and gtxns(assetTxn) == asset and gtxns(assetTxn) == global() and gtxns(assetTxn) == global()) + assert(gtxns(payTxn) == seller and gtxns(payTxn) == price, comment=assert target is match for conditions) + assert(gtxns(assetTxn) == 1 and gtxns(assetTxn) == seller and gtxns(assetTxn) == asset and gtxns(assetTxn) == global() and gtxns(assetTxn) == global(), comment=assert target is match for conditions) return True } \ No newline at end of file diff --git a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json index 76cd6407..06a0b4d5 100644 --- a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json +++ b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json @@ -3,8 +3,8 @@ "_type": "LogicSignature", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 4, - "end_line": 4, + "line": 10, + "end_line": 10, "column": 0, "end_column": 47 }, @@ -14,8 +14,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 5, - "end_line": 5, + "line": 11, + "end_line": 11, "column": 2, "end_column": 11 }, @@ -31,8 +31,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 5, - "end_line": 26, + "line": 11, + "end_line": 32, "column": 12, "end_column": 3 }, @@ -41,8 +41,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 6, - "end_line": 6, + "line": 12, + "end_line": 12, "column": 10, "end_column": 49 }, @@ -50,8 +50,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 6, - "end_line": 6, + "line": 12, + "end_line": 12, "column": 10, "end_column": 16 }, @@ -68,8 +68,8 @@ "_type": "TemplateVar", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 6, - "end_line": 6, + "line": 12, + "end_line": 12, "column": 19, "end_column": 49 }, @@ -87,8 +87,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 7, - "end_line": 7, + "line": 13, + "end_line": 13, "column": 10, "end_column": 46 }, @@ -96,8 +96,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 7, - "end_line": 7, + "line": 13, + "end_line": 13, "column": 10, "end_column": 15 }, @@ -114,8 +114,8 @@ "_type": "TemplateVar", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 7, - "end_line": 7, + "line": 13, + "end_line": 13, "column": 18, "end_column": 46 }, @@ -133,8 +133,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 8, - "end_line": 8, + "line": 14, + "end_line": 14, "column": 10, "end_column": 45 }, @@ -142,8 +142,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 8, - "end_line": 8, + "line": 14, + "end_line": 14, "column": 10, "end_column": 15 }, @@ -160,8 +160,8 @@ "_type": "TemplateVar", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 8, - "end_line": 8, + "line": 14, + "end_line": 14, "column": 18, "end_column": 45 }, @@ -179,8 +179,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 10, - "end_line": 10, + "line": 16, + "end_line": 16, "column": 10, "end_column": 37 }, @@ -188,8 +188,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 10, - "end_line": 10, + "line": 16, + "end_line": 16, "column": 10, "end_column": 16 }, @@ -207,8 +207,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 10, - "end_line": 10, + "line": 16, + "end_line": 16, "column": 19, "end_column": 37 }, @@ -224,8 +224,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 10, - "end_line": 10, + "line": 16, + "end_line": 16, "column": 35, "end_column": 36 }, @@ -245,8 +245,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 11, - "end_line": 11, + "line": 17, + "end_line": 17, "column": 10, "end_column": 45 }, @@ -254,8 +254,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 11, - "end_line": 11, + "line": 17, + "end_line": 17, "column": 10, "end_column": 18 }, @@ -273,8 +273,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 11, - "end_line": 11, + "line": 17, + "end_line": 17, "column": 21, "end_column": 45 }, @@ -290,8 +290,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 11, - "end_line": 11, + "line": 17, + "end_line": 17, "column": 43, "end_column": 44 }, @@ -311,17 +311,17 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, + "line": 18, + "end_line": 21, "column": 4, "end_column": 6 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, + "line": 18, + "end_line": 21, "column": 4, "end_column": 6 }, @@ -332,15 +332,28 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BooleanBinaryOperation", + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 18, + "end_line": 21, + "column": 4, + "end_column": 6 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, + "line": 18, + "end_line": 21, "column": 4, "end_column": 6 }, @@ -351,185 +364,166 @@ "ephemeral": false, "scalar_type": 2 }, - "left": { - "_type": "BytesComparisonExpression", + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, + "line": 18, + "end_line": 21, "column": 4, "end_column": 6 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, - "column": 4, - "end_column": 6 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "gtxns", - "immediates": [ - "Receiver" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 12, - "column": 16, - "end_column": 22 - }, - "wtype": { - "_type": "WGroupTransaction", - "name": "group_transaction_pay", - "immutable": true, - "ephemeral": false, - "scalar_type": 2, - "transaction_type": 1 - }, - "name": "payTxn" - } - ], - "comment": null + "op_code": "gtxns", + "immediates": [ + "Receiver" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 18, + "end_line": 18, + "column": 16, + "end_column": 22 + }, + "wtype": { + "_type": "WGroupTransaction", + "name": "group_transaction_pay", + "immutable": true, + "ephemeral": false, + "scalar_type": 2, + "transaction_type": 1 + }, + "name": "payTxn" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 19, + "end_line": 19, + "column": 16, + "end_column": 22 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 13, - "end_line": 13, - "column": 16, - "end_column": 22 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "seller" - } + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "seller" + } + }, + "op": "and", + "right": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 18, + "end_line": 21, + "column": 4, + "end_column": 6 }, - "op": "and", - "right": { - "_type": "NumericComparisonExpression", + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, + "line": 18, + "end_line": 21, "column": 4, "end_column": 6 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, - "column": 4, - "end_column": 6 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "gtxns", - "immediates": [ - "Amount" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 12, - "column": 16, - "end_column": 22 - }, - "wtype": { - "_type": "WGroupTransaction", - "name": "group_transaction_pay", - "immutable": true, - "ephemeral": false, - "scalar_type": 2, - "transaction_type": 1 - }, - "name": "payTxn" - } - ], - "comment": null + "op_code": "gtxns", + "immediates": [ + "Amount" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 18, + "end_line": 18, + "column": 16, + "end_column": 22 + }, + "wtype": { + "_type": "WGroupTransaction", + "name": "group_transaction_pay", + "immutable": true, + "ephemeral": false, + "scalar_type": 2, + "transaction_type": 1 + }, + "name": "payTxn" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 20, + "end_line": 20, + "column": 14, + "end_column": 19 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 14, - "end_line": 14, - "column": 14, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "price" - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "price" } } - ], - "comment": "assert target is match for conditions" + }, + "error_message": "assert target is match for conditions" } }, { "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -540,15 +534,28 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 23, + "end_line": 29, + "column": 4, + "end_column": 6 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { "_type": "BooleanBinaryOperation", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -563,8 +570,8 @@ "_type": "BooleanBinaryOperation", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -579,8 +586,8 @@ "_type": "BooleanBinaryOperation", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -592,11 +599,11 @@ "scalar_type": 2 }, "left": { - "_type": "BooleanBinaryOperation", + "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -607,174 +614,76 @@ "ephemeral": false, "scalar_type": 2 }, - "left": { - "_type": "NumericComparisonExpression", + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, - "column": 4, - "end_column": 6 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "gtxns", - "immediates": [ - "AssetAmount" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 17, - "column": 16, - "end_column": 24 - }, - "wtype": { - "_type": "WGroupTransaction", - "name": "group_transaction_axfer", - "immutable": true, - "ephemeral": false, - "scalar_type": 2, - "transaction_type": 4 - }, - "name": "assetTxn" - } - ], - "comment": null - }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 18, - "end_line": 18, - "column": 26, - "end_column": 27 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "1", - "teal_alias": null - } + "op_code": "gtxns", + "immediates": [ + "AssetAmount" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 23, + "end_line": 23, + "column": 16, + "end_column": 24 + }, + "wtype": { + "_type": "WGroupTransaction", + "name": "group_transaction_axfer", + "immutable": true, + "ephemeral": false, + "scalar_type": 2, + "transaction_type": 4 + }, + "name": "assetTxn" + } + ] }, - "op": "and", - "right": { - "_type": "BytesComparisonExpression", + "operator": "==", + "rhs": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, - "column": 4, - "end_column": 6 + "line": 24, + "end_line": 24, + "column": 26, + "end_column": 27 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, - "column": 4, - "end_column": 6 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "gtxns", - "immediates": [ - "Sender" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 17, - "column": 16, - "end_column": 24 - }, - "wtype": { - "_type": "WGroupTransaction", - "name": "group_transaction_axfer", - "immutable": true, - "ephemeral": false, - "scalar_type": 2, - "transaction_type": 4 - }, - "name": "assetTxn" - } - ], - "comment": null - }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 19, - "end_line": 19, - "column": 14, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "seller" - } + "value": "1", + "teal_alias": null } }, "op": "and", "right": { - "_type": "NumericComparisonExpression", + "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -789,29 +698,29 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, "wtype": { "_type": "WType", - "name": "asset", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, "op_code": "gtxns", "immediates": [ - "XferAsset" + "Sender" ], "stack_args": [ { "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 17, + "line": 23, + "end_line": 23, "column": 16, "end_column": 24 }, @@ -825,37 +734,36 @@ }, "name": "assetTxn" } - ], - "comment": null + ] }, "operator": "==", "rhs": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 20, - "end_line": 20, - "column": 17, - "end_column": 22 + "line": 25, + "end_line": 25, + "column": 14, + "end_column": 20 }, "wtype": { "_type": "WType", - "name": "asset", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "name": "asset" + "name": "seller" } } }, "op": "and", "right": { - "_type": "BytesComparisonExpression", + "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -870,29 +778,29 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, "wtype": { "_type": "WType", - "name": "account", + "name": "asset", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, "op_code": "gtxns", "immediates": [ - "AssetCloseTo" + "XferAsset" ], "stack_args": [ { "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 17, + "line": 23, + "end_line": 23, "column": 16, "end_column": 24 }, @@ -906,32 +814,26 @@ }, "name": "assetTxn" } - ], - "comment": null + ] }, "operator": "==", "rhs": { - "_type": "IntrinsicCall", + "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 21, - "end_line": 21, - "column": 20, - "end_column": 38 + "line": 26, + "end_line": 26, + "column": 17, + "end_column": 22 }, "wtype": { "_type": "WType", - "name": "account", + "name": "asset", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "op_code": "global", - "immediates": [ - "ZeroAddress" - ], - "stack_args": [], - "comment": null + "name": "asset" } } }, @@ -940,8 +842,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -956,8 +858,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -970,15 +872,15 @@ }, "op_code": "gtxns", "immediates": [ - "RekeyTo" + "AssetCloseTo" ], "stack_args": [ { "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 17, + "line": 23, + "end_line": 23, "column": 16, "end_column": 24 }, @@ -992,18 +894,17 @@ }, "name": "assetTxn" } - ], - "comment": null + ] }, "operator": "==", "rhs": { "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 22, - "end_line": 22, - "column": 15, - "end_column": 33 + "line": 27, + "end_line": 27, + "column": 27, + "end_column": 38 }, "wtype": { "_type": "WType", @@ -1016,21 +917,103 @@ "immediates": [ "ZeroAddress" ], - "stack_args": [], - "comment": null + "stack_args": [] } } + }, + "op": "and", + "right": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 23, + "end_line": 29, + "column": 4, + "end_column": 6 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 23, + "end_line": 29, + "column": 4, + "end_column": 6 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "gtxns", + "immediates": [ + "RekeyTo" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 23, + "end_line": 23, + "column": 16, + "end_column": 24 + }, + "wtype": { + "_type": "WGroupTransaction", + "name": "group_transaction_axfer", + "immutable": true, + "ephemeral": false, + "scalar_type": 2, + "transaction_type": 4 + }, + "name": "assetTxn" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 28, + "end_line": 28, + "column": 22, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "global", + "immediates": [ + "ZeroAddress" + ], + "stack_args": [] + } } - ], - "comment": "assert target is match for conditions" + }, + "error_message": "assert target is match for conditions" } }, { "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 25, - "end_line": 25, + "line": 31, + "end_line": 31, "column": 4, "end_column": 15 }, @@ -1038,8 +1021,8 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 25, - "end_line": 25, + "line": 31, + "end_line": 31, "column": 11, "end_column": 15 }, @@ -1066,6 +1049,7 @@ "id": "tests/approvals/pre-approved-sale.algo.ts::program", "name": "program" }, - "docstring": "" + "docstring": "", + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/Hello.approval.teal b/tests/approvals/out/precompiled-apps/Hello.approval.teal new file mode 100644 index 00000000..1557f688 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/Hello.approval.teal @@ -0,0 +1,205 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::Hello.approvalProgram: + intcblock 0 1 + bytecblock "greeting" "" + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/precompiled-apps.algo.ts::Hello.constructor() -> void: +constructor: + // tests/approvals/precompiled-apps.algo.ts:17 + // export class Hello extends HelloBase { + proto 0 0 + callsub tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() -> void: +tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor: + // tests/approvals/precompiled-apps.algo.ts:3 + // abstract class HelloBase extends Contract { + proto 0 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + bytec_1 // "" + app_global_put + retsub + + +// tests/approvals/precompiled-apps.algo.ts::Hello.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/precompiled-apps.algo.ts:17 + // export class Hello extends HelloBase { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@8 + txna ApplicationArgs 0 + pushbytes 0x20df3a54 // method "create(string)void" + pushbytes 0x24378d3c // method "delete()void" + pushbytes 0xa0e81872 // method "update()void" + pushbytes 0xd0a28200 // method "greet(string)string" + uncover 4 + match __puya_arc4_router___create_route@2 __puya_arc4_router___delete_route@3 __puya_arc4_router___update_route@4 __puya_arc4_router___greet_route@5 + b __puya_arc4_router___switch_case_default@6 + +__puya_arc4_router___create_route@2: + // tests/approvals/precompiled-apps.algo.ts:18 + // @abimethod({ onCreate: 'require' }) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + // tests/approvals/precompiled-apps.algo.ts:17 + // export class Hello extends HelloBase { + txna ApplicationArgs 1 + extract 2 0 + // tests/approvals/precompiled-apps.algo.ts:18 + // @abimethod({ onCreate: 'require' }) + callsub create + intc_1 // 1 + retsub + +__puya_arc4_router___delete_route@3: + // tests/approvals/precompiled-apps.algo.ts:6 + // @abimethod({ allowActions: 'DeleteApplication' }) + txn OnCompletion + pushint 5 // DeleteApplication + == + assert // OnCompletion is not DeleteApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub delete + intc_1 // 1 + retsub + +__puya_arc4_router___update_route@4: + // tests/approvals/precompiled-apps.algo.ts:9 + // @abimethod({ allowActions: 'UpdateApplication' }) + txn OnCompletion + pushint 4 // UpdateApplication + == + assert // OnCompletion is not UpdateApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub update + intc_1 // 1 + retsub + +__puya_arc4_router___greet_route@5: + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/precompiled-apps.algo.ts:17 + // export class Hello extends HelloBase { + txna ApplicationArgs 1 + extract 2 0 + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + callsub greet + dup + len + itob + extract 6 2 + swap + concat + pushbytes 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@6: + b __puya_arc4_router___after_if_else@9 + +__puya_arc4_router___bare_routing@8: + +__puya_arc4_router___after_if_else@9: + // tests/approvals/precompiled-apps.algo.ts:17 + // export class Hello extends HelloBase { + intc_0 // 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::Hello.create(greeting: bytes) -> void: +create: + // tests/approvals/precompiled-apps.algo.ts:18-19 + // @abimethod({ onCreate: 'require' }) + // create(greeting: string) { + proto 1 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + // tests/approvals/precompiled-apps.algo.ts:20 + // this.greeting.value = greeting + frame_dig -1 + app_global_put + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() -> void: +delete: + // tests/approvals/precompiled-apps.algo.ts:6-7 + // @abimethod({ allowActions: 'DeleteApplication' }) + // delete() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.update() -> void: +update: + // tests/approvals/precompiled-apps.algo.ts:9-10 + // @abimethod({ allowActions: 'UpdateApplication' }) + // update() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(name: bytes) -> bytes: +greet: + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + proto 1 1 + // tests/approvals/precompiled-apps.algo.ts:13 + // return `${this.greeting.value} ${name}` + intc_0 // 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + // tests/approvals/precompiled-apps.algo.ts:13 + // return `${this.greeting.value} ${name}` + app_global_get_ex + assert // check GlobalState exists + bytec_1 // "" + swap + concat + pushbytes " " + concat + frame_dig -1 + concat + retsub diff --git a/tests/approvals/out/precompiled-apps/Hello.arc32.json b/tests/approvals/out/precompiled-apps/Hello.arc32.json new file mode 100644 index 00000000..faf5ac86 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/Hello.arc32.json @@ -0,0 +1,102 @@ +{ + "hints": { + "create(string)void": { + "call_config": { + "no_op": "CREATE" + } + }, + "delete()void": { + "call_config": { + "delete_application": "CALL" + } + }, + "update()void": { + "call_config": { + "update_application": "CALL" + } + }, + "greet(string)string": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsby5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBieXRlY2Jsb2NrICJncmVldGluZyIgIiIKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWFwcHMuYWxnby50czo6SGVsbG8uY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6M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dmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6MTMKICAgIC8vIHJldHVybiBgJHt0aGlzLmdyZWV0aW5nLnZhbHVlfSAke25hbWV9YAogICAgaW50Y18wIC8vIDAKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6NAogICAgLy8gZ3JlZXRpbmcgPSBHbG9iYWxTdGF0ZSh7IGluaXRpYWxWYWx1ZTogJycgfSkKICAgIGJ5dGVjXzAgLy8gImdyZWV0aW5nIgogICAgLy8gdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWFwcHMuYWxnby50czoxMwogICAgLy8gcmV0dXJuIGAke3RoaXMuZ3JlZXRpbmcudmFsdWV9ICR7bmFtZX1gCiAgICBhcHBfZ2xvYmFsX2dldF9leAogICAgYXNzZXJ0IC8vIGNoZWNrIEdsb2JhbFN0YXRlIGV4aXN0cwogICAgYnl0ZWNfMSAvLyAiIgogICAgc3dhcAogICAgY29uY2F0CiAgICBwdXNoYnl0ZXMgIiAiCiAgICBjb25jYXQKICAgIGZyYW1lX2RpZyAtMQogICAgY29uY2F0CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsby5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "state": { + "global": { + "num_byte_slices": 1, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": { + "greeting": { + "type": "bytes", + "key": "greeting" + } + }, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "Hello", + "methods": [ + { + "name": "create", + "args": [ + { + "type": "string", + "name": "greeting" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "delete", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "update", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "readonly": false, + "returns": { + "type": "string" + } + } + ], + "networks": {} + }, + "bare_call_config": {} +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/Hello.arc56.json b/tests/approvals/out/precompiled-apps/Hello.arc56.json new file mode 100644 index 00000000..8f350531 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/Hello.arc56.json @@ -0,0 +1,173 @@ +{ + "name": "Hello", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [ + { + "type": "string", + "name": "greeting" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "update", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "UpdateApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "greeting": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "Z3JlZXRpbmc=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 121 + ], + "errorMessage": "OnCompletion is not DeleteApplication" + }, + { + "pc": [ + 99, + 152 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 137 + ], + "errorMessage": "OnCompletion is not UpdateApplication" + }, + { + "pc": [ + 104 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 126, + 142, + 157 + ], + "errorMessage": "can only call when not creating" + }, + { + "pc": [ + 213 + ], + "errorMessage": "check GlobalState exists" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsby5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBieXRlY2Jsb2NrICJncmVldGluZyIgIiIKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWFwcHMuYWxnby50czo6SGVsbG8uY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6MTcKICAgIC8vIGV4cG9ydCBjbGFzcyBIZWxsbyBleHRlbmRzIEhlbGxvQmFzZSB7CiAgICBwcm90byAwIDAKICAgIGNhbGxzdWIgdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWFwcHMuYWxnby50czo6SGVsbG9CYXNlLmNvbnN0cnVjdG9yCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQ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WYWx1ZTogJycgfSkKICAgIGJ5dGVjXzAgLy8gImdyZWV0aW5nIgogICAgLy8gdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWFwcHMuYWxnby50czoxMwogICAgLy8gcmV0dXJuIGAke3RoaXMuZ3JlZXRpbmcudmFsdWV9ICR7bmFtZX1gCiAgICBhcHBfZ2xvYmFsX2dldF9leAogICAgYXNzZXJ0IC8vIGNoZWNrIEdsb2JhbFN0YXRlIGV4aXN0cwogICAgYnl0ZWNfMSAvLyAiIgogICAgc3dhcAogICAgY29uY2F0CiAgICBwdXNoYnl0ZXMgIiAiCiAgICBjb25jYXQKICAgIGZyYW1lX2RpZyAtMQogICAgY29uY2F0CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsby5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/Hello.clear.teal b/tests/approvals/out/precompiled-apps/Hello.clear.teal new file mode 100644 index 00000000..a33c7923 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/Hello.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::Hello.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/precompiled-apps/Hello.ssa.ir b/tests/approvals/out/precompiled-apps/Hello.ssa.ir new file mode 100644 index 00000000..6d7216ab --- /dev/null +++ b/tests/approvals/out/precompiled-apps/Hello.ssa.ir @@ -0,0 +1,112 @@ +contract tests/approvals/precompiled-apps.algo.ts::Hello: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/precompiled-apps.algo.ts::Hello.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/precompiled-apps.algo.ts::Hello.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/precompiled-apps.algo.ts::Hello.constructor() -> void: + block@0: // L17 + tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() -> void: + block@0: // L3 + (app_global_put "greeting" "") + return + + subroutine tests/approvals/precompiled-apps.algo.ts::Hello.__puya_arc4_router__() -> bool: + block@0: // L17 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@8 + block@1: // abi_routing_L17 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create(string)void" => block@2, method "delete()void" => block@3, method "update()void" => block@4, method "greet(string)string" => block@5, * => block@6} + block@2: // create_route_L18 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (== tmp%5#0 0u) + (assert tmp%6#0) // can only call when creating + let tmp%7#0: bytes = (txna ApplicationArgs 1) + let tmp%8#0: bytes = ((extract 2 0) tmp%7#0) + tests/approvals/precompiled-apps.algo.ts::Hello.create(tmp%8#0) + return 1u + block@3: // delete_route_L6 + let tmp%9#0: uint64 = (txn OnCompletion) + let tmp%10#0: bool = (== tmp%9#0 DeleteApplication) + (assert tmp%10#0) // OnCompletion is not DeleteApplication + let tmp%11#0: uint64 = (txn ApplicationID) + let tmp%12#0: bool = (!= tmp%11#0 0u) + (assert tmp%12#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() + return 1u + block@4: // update_route_L9 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (== tmp%13#0 UpdateApplication) + (assert tmp%14#0) // OnCompletion is not UpdateApplication + let tmp%15#0: uint64 = (txn ApplicationID) + let tmp%16#0: bool = (!= tmp%15#0 0u) + (assert tmp%16#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::HelloBase.update() + return 1u + block@5: // greet_route_L12 + let tmp%17#0: uint64 = (txn OnCompletion) + let tmp%18#0: bool = (== tmp%17#0 NoOp) + (assert tmp%18#0) // OnCompletion is not NoOp + let tmp%19#0: uint64 = (txn ApplicationID) + let tmp%20#0: bool = (!= tmp%19#0 0u) + (assert tmp%20#0) // can only call when not creating + let tmp%21#0: bytes = (txna ApplicationArgs 1) + let tmp%22#0: bytes = ((extract 2 0) tmp%21#0) + let to_encode%0#0: bytes = tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(tmp%22#0) + let length%0#0: uint64 = (len to_encode%0#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 to_encode%0#0) + let tmp%23#0: bytes = (concat 0x151f7c75 encoded_value%0#0) + (log tmp%23#0) + return 1u + block@6: // switch_case_default_L17 + goto block@7 + block@7: // switch_case_next_L17 + goto block@9 + block@8: // bare_routing_L17 + goto block@9 + block@9: // after_if_else_L17 + return 0u + + subroutine tests/approvals/precompiled-apps.algo.ts::Hello.create(greeting: bytes) -> void: + block@0: // L18 + (app_global_put "greeting" greeting#0) + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() -> void: + block@0: // L6 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.update() -> void: + block@0: // L9 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(name: bytes) -> bytes: + block@0: // L12 + let (maybe_value%0#0: bytes, maybe_exists%0#0: bool) = (app_global_get_ex 0u "greeting") + (assert maybe_exists%0#0) // check GlobalState exists + let tmp%0#0: bytes = (concat "" maybe_value%0#0) + let tmp%1#0: bytes = (concat tmp%0#0 " ") + let tmp%2#0: bytes = (concat tmp%1#0 name#0) + return tmp%2#0 + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/HelloTemplate.approval.teal b/tests/approvals/out/precompiled-apps/HelloTemplate.approval.teal new file mode 100644 index 00000000..bd1b4182 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplate.approval.teal @@ -0,0 +1,204 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::HelloTemplate.approvalProgram: + intcblock 0 1 + bytecblock "greeting" "" TMPL_GREETING + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/precompiled-apps.algo.ts::HelloTemplate.constructor() -> void: +constructor: + // tests/approvals/precompiled-apps.algo.ts:25-28 + // constructor() { + // super() + // this.greeting.value = TemplateVar('GREETING') + // } + proto 0 0 + // tests/approvals/precompiled-apps.algo.ts:26 + // super() + callsub tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + // tests/approvals/precompiled-apps.algo.ts:27 + // this.greeting.value = TemplateVar('GREETING') + bytec_2 // TMPL_GREETING + app_global_put + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() -> void: +tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor: + // tests/approvals/precompiled-apps.algo.ts:3 + // abstract class HelloBase extends Contract { + proto 0 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + bytec_1 // "" + app_global_put + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloTemplate.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/precompiled-apps.algo.ts:24 + // export class HelloTemplate extends HelloBase { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@8 + txna ApplicationArgs 0 + pushbytes 0x4c5c61ba // method "create()void" + pushbytes 0x24378d3c // method "delete()void" + pushbytes 0xa0e81872 // method "update()void" + pushbytes 0xd0a28200 // method "greet(string)string" + uncover 4 + match __puya_arc4_router___create_route@2 __puya_arc4_router___delete_route@3 __puya_arc4_router___update_route@4 __puya_arc4_router___greet_route@5 + b __puya_arc4_router___switch_case_default@6 + +__puya_arc4_router___create_route@2: + // tests/approvals/precompiled-apps.algo.ts:30 + // @abimethod({ onCreate: 'require' }) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub create + intc_1 // 1 + retsub + +__puya_arc4_router___delete_route@3: + // tests/approvals/precompiled-apps.algo.ts:6 + // @abimethod({ allowActions: 'DeleteApplication' }) + txn OnCompletion + pushint 5 // DeleteApplication + == + assert // OnCompletion is not DeleteApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub delete + intc_1 // 1 + retsub + +__puya_arc4_router___update_route@4: + // tests/approvals/precompiled-apps.algo.ts:9 + // @abimethod({ allowActions: 'UpdateApplication' }) + txn OnCompletion + pushint 4 // UpdateApplication + == + assert // OnCompletion is not UpdateApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub update + intc_1 // 1 + retsub + +__puya_arc4_router___greet_route@5: + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/precompiled-apps.algo.ts:24 + // export class HelloTemplate extends HelloBase { + txna ApplicationArgs 1 + extract 2 0 + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + callsub greet + dup + len + itob + extract 6 2 + swap + concat + pushbytes 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@6: + b __puya_arc4_router___after_if_else@9 + +__puya_arc4_router___bare_routing@8: + +__puya_arc4_router___after_if_else@9: + // tests/approvals/precompiled-apps.algo.ts:24 + // export class HelloTemplate extends HelloBase { + intc_0 // 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloTemplate.create() -> void: +create: + // tests/approvals/precompiled-apps.algo.ts:30-31 + // @abimethod({ onCreate: 'require' }) + // create() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() -> void: +delete: + // tests/approvals/precompiled-apps.algo.ts:6-7 + // @abimethod({ allowActions: 'DeleteApplication' }) + // delete() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.update() -> void: +update: + // tests/approvals/precompiled-apps.algo.ts:9-10 + // @abimethod({ allowActions: 'UpdateApplication' }) + // update() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(name: bytes) -> bytes: +greet: + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + proto 1 1 + // tests/approvals/precompiled-apps.algo.ts:13 + // return `${this.greeting.value} ${name}` + intc_0 // 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + // tests/approvals/precompiled-apps.algo.ts:13 + // return `${this.greeting.value} ${name}` + app_global_get_ex + assert // check GlobalState exists + bytec_1 // "" + swap + concat + pushbytes " " + concat + frame_dig -1 + concat + retsub diff --git a/tests/approvals/out/precompiled-apps/HelloTemplate.arc32.json b/tests/approvals/out/precompiled-apps/HelloTemplate.arc32.json new file mode 100644 index 00000000..cefc6382 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplate.arc32.json @@ -0,0 +1,97 @@ +{ + "hints": { + "create()void": { + "call_config": { + "no_op": "CREATE" + } + }, + "delete()void": { + "call_config": { + "delete_application": "CALL" + } + }, + "update()void": { + "call_config": { + "update_application": "CALL" + } + }, + "greet(string)string": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlLmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAwIDEKICAgIGJ5dGVjYmxvY2sgImdyZWV0aW5nIiAiIiBUTVBMX0dSRUVUSU5HCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAyCiAgICBjYWxsc3ViIGNvbnN0cnVjdG9yCgptYWluX2FmdGVyX2lmX2Vsc2VAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6OkhlbGxvVGVtcGxhdGUuY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6MjUtMjgKICAgIC8vIGNvbnN0cnVjdG9yKCkgewogICAgLy8gICBzdXBlcigpCiAgICAvLyAgIHRoaXMuZ3JlZXRpbmcudmFsdWUgPSBUZW1wbGF0ZVZhcjxzdHJpbmc+KCdHUkVFVElORycpCiAgICAvLyB9CiAgICBwcm90byAwIDAKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6MjYKICAgIC8vIHN1cGVyKCkKICAgIGNhbGxzdWIgdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWFwcHMuYWxnby50czo6SGVsbG9CYXNlLmNvbnN0cnVjdG9yCiAgICAvLy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bmFtZX1gCiAgICBhcHBfZ2xvYmFsX2dldF9leAogICAgYXNzZXJ0IC8vIGNoZWNrIEdsb2JhbFN0YXRlIGV4aXN0cwogICAgYnl0ZWNfMSAvLyAiIgogICAgc3dhcAogICAgY29uY2F0CiAgICBwdXNoYnl0ZXMgIiAiCiAgICBjb25jYXQKICAgIGZyYW1lX2RpZyAtMQogICAgY29uY2F0CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "state": { + "global": { + "num_byte_slices": 1, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": { + "greeting": { + "type": "bytes", + "key": "greeting" + } + }, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "HelloTemplate", + "methods": [ + { + "name": "create", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "delete", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "update", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "readonly": false, + "returns": { + "type": "string" + } + } + ], + "networks": {} + }, + "bare_call_config": {} +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/HelloTemplate.arc56.json b/tests/approvals/out/precompiled-apps/HelloTemplate.arc56.json new file mode 100644 index 00000000..891e5eee --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplate.arc56.json @@ -0,0 +1,172 @@ +{ + "name": "HelloTemplate", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "update", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "UpdateApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "greeting": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "Z3JlZXRpbmc=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 101 + ], + "errorMessage": "OnCompletion is not DeleteApplication" + }, + { + "pc": [ + 85, + 132 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 117 + ], + "errorMessage": "OnCompletion is not UpdateApplication" + }, + { + "pc": [ + 90 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 106, + 122, + 137 + ], + "errorMessage": "can only call when not creating" + }, + { + "pc": [ + 189 + ], + "errorMessage": "check GlobalState exists" + } + ], + "pcOffsetMethod": "cblocks" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlLmFwcHJvdmFsUHJvZ3JhbToKICAg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DEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "events": [], + "templateVariables": { + "GREETING": { + "type": "AVMString" + } + } +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/HelloTemplate.clear.teal b/tests/approvals/out/precompiled-apps/HelloTemplate.clear.teal new file mode 100644 index 00000000..13971dea --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplate.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::HelloTemplate.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/precompiled-apps/HelloTemplate.ssa.ir b/tests/approvals/out/precompiled-apps/HelloTemplate.ssa.ir new file mode 100644 index 00000000..e7d9b922 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplate.ssa.ir @@ -0,0 +1,110 @@ +contract tests/approvals/precompiled-apps.algo.ts::HelloTemplate: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/precompiled-apps.algo.ts::HelloTemplate.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/precompiled-apps.algo.ts::HelloTemplate.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloTemplate.constructor() -> void: + block@0: // L25 + tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() + (app_global_put "greeting" TemplateVar[bytes](TMPL_GREETING)) + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() -> void: + block@0: // L3 + (app_global_put "greeting" "") + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloTemplate.__puya_arc4_router__() -> bool: + block@0: // L24 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@8 + block@1: // abi_routing_L24 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "delete()void" => block@3, method "update()void" => block@4, method "greet(string)string" => block@5, * => block@6} + block@2: // create_route_L30 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (== tmp%5#0 0u) + (assert tmp%6#0) // can only call when creating + tests/approvals/precompiled-apps.algo.ts::HelloTemplate.create() + return 1u + block@3: // delete_route_L6 + let tmp%7#0: uint64 = (txn OnCompletion) + let tmp%8#0: bool = (== tmp%7#0 DeleteApplication) + (assert tmp%8#0) // OnCompletion is not DeleteApplication + let tmp%9#0: uint64 = (txn ApplicationID) + let tmp%10#0: bool = (!= tmp%9#0 0u) + (assert tmp%10#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() + return 1u + block@4: // update_route_L9 + let tmp%11#0: uint64 = (txn OnCompletion) + let tmp%12#0: bool = (== tmp%11#0 UpdateApplication) + (assert tmp%12#0) // OnCompletion is not UpdateApplication + let tmp%13#0: uint64 = (txn ApplicationID) + let tmp%14#0: bool = (!= tmp%13#0 0u) + (assert tmp%14#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::HelloBase.update() + return 1u + block@5: // greet_route_L12 + let tmp%15#0: uint64 = (txn OnCompletion) + let tmp%16#0: bool = (== tmp%15#0 NoOp) + (assert tmp%16#0) // OnCompletion is not NoOp + let tmp%17#0: uint64 = (txn ApplicationID) + let tmp%18#0: bool = (!= tmp%17#0 0u) + (assert tmp%18#0) // can only call when not creating + let tmp%19#0: bytes = (txna ApplicationArgs 1) + let tmp%20#0: bytes = ((extract 2 0) tmp%19#0) + let to_encode%0#0: bytes = tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(tmp%20#0) + let length%0#0: uint64 = (len to_encode%0#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 to_encode%0#0) + let tmp%21#0: bytes = (concat 0x151f7c75 encoded_value%0#0) + (log tmp%21#0) + return 1u + block@6: // switch_case_default_L24 + goto block@7 + block@7: // switch_case_next_L24 + goto block@9 + block@8: // bare_routing_L24 + goto block@9 + block@9: // after_if_else_L24 + return 0u + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloTemplate.create() -> void: + block@0: // L30 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() -> void: + block@0: // L6 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.update() -> void: + block@0: // L9 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(name: bytes) -> bytes: + block@0: // L12 + let (maybe_value%0#0: bytes, maybe_exists%0#0: bool) = (app_global_get_ex 0u "greeting") + (assert maybe_exists%0#0) // check GlobalState exists + let tmp%0#0: bytes = (concat "" maybe_value%0#0) + let tmp%1#0: bytes = (concat tmp%0#0 " ") + let tmp%2#0: bytes = (concat tmp%1#0 name#0) + return tmp%2#0 + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.approval.teal b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.approval.teal new file mode 100644 index 00000000..86914a38 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.approval.teal @@ -0,0 +1,204 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.approvalProgram: + intcblock 0 1 + bytecblock "greeting" "" PRFX_GREETING + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.constructor() -> void: +constructor: + // tests/approvals/precompiled-apps.algo.ts:35-38 + // constructor() { + // super() + // this.greeting.value = TemplateVar('GREETING', 'PRFX_') + // } + proto 0 0 + // tests/approvals/precompiled-apps.algo.ts:36 + // super() + callsub tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + // tests/approvals/precompiled-apps.algo.ts:37 + // this.greeting.value = TemplateVar('GREETING', 'PRFX_') + bytec_2 // PRFX_GREETING + app_global_put + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() -> void: +tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor: + // tests/approvals/precompiled-apps.algo.ts:3 + // abstract class HelloBase extends Contract { + proto 0 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + bytec_1 // "" + app_global_put + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/precompiled-apps.algo.ts:34 + // export class HelloTemplateCustomPrefix extends HelloBase { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@8 + txna ApplicationArgs 0 + pushbytes 0x4c5c61ba // method "create()void" + pushbytes 0x24378d3c // method "delete()void" + pushbytes 0xa0e81872 // method "update()void" + pushbytes 0xd0a28200 // method "greet(string)string" + uncover 4 + match __puya_arc4_router___create_route@2 __puya_arc4_router___delete_route@3 __puya_arc4_router___update_route@4 __puya_arc4_router___greet_route@5 + b __puya_arc4_router___switch_case_default@6 + +__puya_arc4_router___create_route@2: + // tests/approvals/precompiled-apps.algo.ts:40 + // @abimethod({ onCreate: 'require' }) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub create + intc_1 // 1 + retsub + +__puya_arc4_router___delete_route@3: + // tests/approvals/precompiled-apps.algo.ts:6 + // @abimethod({ allowActions: 'DeleteApplication' }) + txn OnCompletion + pushint 5 // DeleteApplication + == + assert // OnCompletion is not DeleteApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub delete + intc_1 // 1 + retsub + +__puya_arc4_router___update_route@4: + // tests/approvals/precompiled-apps.algo.ts:9 + // @abimethod({ allowActions: 'UpdateApplication' }) + txn OnCompletion + pushint 4 // UpdateApplication + == + assert // OnCompletion is not UpdateApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub update + intc_1 // 1 + retsub + +__puya_arc4_router___greet_route@5: + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/precompiled-apps.algo.ts:34 + // export class HelloTemplateCustomPrefix extends HelloBase { + txna ApplicationArgs 1 + extract 2 0 + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + callsub greet + dup + len + itob + extract 6 2 + swap + concat + pushbytes 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@6: + b __puya_arc4_router___after_if_else@9 + +__puya_arc4_router___bare_routing@8: + +__puya_arc4_router___after_if_else@9: + // tests/approvals/precompiled-apps.algo.ts:34 + // export class HelloTemplateCustomPrefix extends HelloBase { + intc_0 // 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.create() -> void: +create: + // tests/approvals/precompiled-apps.algo.ts:40-41 + // @abimethod({ onCreate: 'require' }) + // create() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() -> void: +delete: + // tests/approvals/precompiled-apps.algo.ts:6-7 + // @abimethod({ allowActions: 'DeleteApplication' }) + // delete() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.update() -> void: +update: + // tests/approvals/precompiled-apps.algo.ts:9-10 + // @abimethod({ allowActions: 'UpdateApplication' }) + // update() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(name: bytes) -> bytes: +greet: + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + proto 1 1 + // tests/approvals/precompiled-apps.algo.ts:13 + // return `${this.greeting.value} ${name}` + intc_0 // 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + // tests/approvals/precompiled-apps.algo.ts:13 + // return `${this.greeting.value} ${name}` + app_global_get_ex + assert // check GlobalState exists + bytec_1 // "" + swap + concat + pushbytes " " + concat + frame_dig -1 + concat + retsub diff --git a/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc32.json b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc32.json new file mode 100644 index 00000000..33927c0f --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc32.json @@ -0,0 +1,97 @@ +{ + "hints": { + "create()void": { + "call_config": { + "no_op": "CREATE" + } + }, + "delete()void": { + "call_config": { + "delete_application": "CALL" + } + }, + "update()void": { + "call_config": { + "update_application": "CALL" + } + }, + "greet(string)string": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlQ3VzdG9tUHJlZml4LmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAwIDEKIC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AiCiAgICBjb25jYXQKICAgIGZyYW1lX2RpZyAtMQogICAgY29uY2F0CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlQ3VzdG9tUHJlZml4LmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "state": { + "global": { + "num_byte_slices": 1, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": { + "greeting": { + "type": "bytes", + "key": "greeting" + } + }, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "HelloTemplateCustomPrefix", + "methods": [ + { + "name": "create", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "delete", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "update", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "readonly": false, + "returns": { + "type": "string" + } + } + ], + "networks": {} + }, + "bare_call_config": {} +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc56.json b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc56.json new file mode 100644 index 00000000..f5bcf0a4 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc56.json @@ -0,0 +1,172 @@ +{ + "name": "HelloTemplateCustomPrefix", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "update", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "UpdateApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "greeting": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "Z3JlZXRpbmc=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 101 + ], + "errorMessage": "OnCompletion is not DeleteApplication" + }, + { + "pc": [ + 85, + 132 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 117 + ], + "errorMessage": "OnCompletion is not UpdateApplication" + }, + { + "pc": [ + 90 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 106, + 122, + 137 + ], + "errorMessage": "can only call when not creating" + }, + { + "pc": [ + 189 + ], + "errorMessage": "check GlobalState exists" + } + ], + "pcOffsetMethod": "cblocks" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlQ3VzdG9tUHJlZml4LmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAwIDEKICAgIGJ5dGVjYmxvY2sgImdyZWV0aW5nIiAiIiBQUkZYX0dSRUVUSU5HCiAgICB0eG4g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clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlQ3VzdG9tUHJlZml4LmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "events": [], + "templateVariables": { + "PRFX_GREETING": { + "type": "AVMString" + } + } +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.clear.teal b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.clear.teal new file mode 100644 index 00000000..345b124b --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.ssa.ir b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.ssa.ir new file mode 100644 index 00000000..720f9017 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.ssa.ir @@ -0,0 +1,110 @@ +contract tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.constructor() -> void: + block@0: // L35 + tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() + (app_global_put "greeting" TemplateVar[bytes](PRFX_GREETING)) + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() -> void: + block@0: // L3 + (app_global_put "greeting" "") + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.__puya_arc4_router__() -> bool: + block@0: // L34 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@8 + block@1: // abi_routing_L34 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "delete()void" => block@3, method "update()void" => block@4, method "greet(string)string" => block@5, * => block@6} + block@2: // create_route_L40 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (== tmp%5#0 0u) + (assert tmp%6#0) // can only call when creating + tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.create() + return 1u + block@3: // delete_route_L6 + let tmp%7#0: uint64 = (txn OnCompletion) + let tmp%8#0: bool = (== tmp%7#0 DeleteApplication) + (assert tmp%8#0) // OnCompletion is not DeleteApplication + let tmp%9#0: uint64 = (txn ApplicationID) + let tmp%10#0: bool = (!= tmp%9#0 0u) + (assert tmp%10#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() + return 1u + block@4: // update_route_L9 + let tmp%11#0: uint64 = (txn OnCompletion) + let tmp%12#0: bool = (== tmp%11#0 UpdateApplication) + (assert tmp%12#0) // OnCompletion is not UpdateApplication + let tmp%13#0: uint64 = (txn ApplicationID) + let tmp%14#0: bool = (!= tmp%13#0 0u) + (assert tmp%14#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::HelloBase.update() + return 1u + block@5: // greet_route_L12 + let tmp%15#0: uint64 = (txn OnCompletion) + let tmp%16#0: bool = (== tmp%15#0 NoOp) + (assert tmp%16#0) // OnCompletion is not NoOp + let tmp%17#0: uint64 = (txn ApplicationID) + let tmp%18#0: bool = (!= tmp%17#0 0u) + (assert tmp%18#0) // can only call when not creating + let tmp%19#0: bytes = (txna ApplicationArgs 1) + let tmp%20#0: bytes = ((extract 2 0) tmp%19#0) + let to_encode%0#0: bytes = tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(tmp%20#0) + let length%0#0: uint64 = (len to_encode%0#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 to_encode%0#0) + let tmp%21#0: bytes = (concat 0x151f7c75 encoded_value%0#0) + (log tmp%21#0) + return 1u + block@6: // switch_case_default_L34 + goto block@7 + block@7: // switch_case_next_L34 + goto block@9 + block@8: // bare_routing_L34 + goto block@9 + block@9: // after_if_else_L34 + return 0u + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.create() -> void: + block@0: // L40 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() -> void: + block@0: // L6 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.update() -> void: + block@0: // L9 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(name: bytes) -> bytes: + block@0: // L12 + let (maybe_value%0#0: bytes, maybe_exists%0#0: bool) = (app_global_get_ex 0u "greeting") + (assert maybe_exists%0#0) // check GlobalState exists + let tmp%0#0: bytes = (concat "" maybe_value%0#0) + let tmp%1#0: bytes = (concat tmp%0#0 " ") + let tmp%2#0: bytes = (concat tmp%1#0 name#0) + return tmp%2#0 + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/LargeProgram.approval.teal b/tests/approvals/out/precompiled-apps/LargeProgram.approval.teal new file mode 100644 index 00000000..cb5b4258 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/LargeProgram.approval.teal @@ -0,0 +1,143 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::LargeProgram.approvalProgram: + intcblock 0 1 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/precompiled-apps.algo.ts::LargeProgram.constructor() -> void: +constructor: + // tests/approvals/precompiled-apps.algo.ts:48 + // export class LargeProgram extends Contract { + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::LargeProgram.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/precompiled-apps.algo.ts:48 + // export class LargeProgram extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@6 + txna ApplicationArgs 0 + pushbytes 0x02bf30cf // method "getBigBytesLength()uint64" + pushbytes 0x24378d3c // method "delete()void" + uncover 2 + match __puya_arc4_router___getBigBytesLength_route@2 __puya_arc4_router___delete_route@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___getBigBytesLength_route@2: + // tests/approvals/precompiled-apps.algo.ts:49 + // getBigBytesLength() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub getBigBytesLength + itob + pushbytes 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___delete_route@3: + // tests/approvals/precompiled-apps.algo.ts:53 + // @abimethod({ allowActions: 'DeleteApplication' }) + txn OnCompletion + pushint 5 // DeleteApplication + == + assert // OnCompletion is not DeleteApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub delete + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@4: + b __puya_arc4_router___after_if_else@10 + +__puya_arc4_router___bare_routing@6: + // tests/approvals/precompiled-apps.algo.ts:48 + // export class LargeProgram extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@7 + b __puya_arc4_router___switch_case_default@8 + +__puya_arc4_router_____algots__.defaultCreate@7: + // tests/approvals/precompiled-apps.algo.ts:48 + // export class LargeProgram extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@8: + +__puya_arc4_router___after_if_else@10: + // tests/approvals/precompiled-apps.algo.ts:48 + // export class LargeProgram extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::LargeProgram.getBigBytesLength() -> uint64: +getBigBytesLength: + // tests/approvals/precompiled-apps.algo.ts:49 + // getBigBytesLength() { + proto 0 1 + // tests/approvals/precompiled-apps.algo.ts:50 + // return getBigBytes().length + callsub getBigBytes + len + retsub + + +// tests/approvals/precompiled-apps.algo.ts::getBigBytes() -> bytes: +getBigBytes: + // tests/approvals/precompiled-apps.algo.ts:44 + // function getBigBytes() { + proto 0 1 + // tests/approvals/precompiled-apps.algo.ts:45 + // return op.bzero(4096) + pushint 4096 // 4096 + bzero + retsub + + +// tests/approvals/precompiled-apps.algo.ts::LargeProgram.delete() -> void: +delete: + // tests/approvals/precompiled-apps.algo.ts:53-54 + // @abimethod({ allowActions: 'DeleteApplication' }) + // delete() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::LargeProgram.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/precompiled-apps.algo.ts:48 + // export class LargeProgram extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/precompiled-apps/LargeProgram.arc32.json b/tests/approvals/out/precompiled-apps/LargeProgram.arc32.json new file mode 100644 index 00000000..dec6a332 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/LargeProgram.arc32.json @@ -0,0 +1,63 @@ +{ + "hints": { + "getBigBytesLength()uint64": { + "call_config": { + "no_op": "CALL" + } + }, + "delete()void": { + "call_config": { + "delete_application": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpMYXJnZVByb2dyYW0uYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICAgY2FsbHN1YiBjb25zdHJ1Y3RvcgoKbWFpbl9hZnRlcl9pZl9lbHNlQDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpMYXJnZVByb2dyYW0uY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6NDgKICAgIC8vIGV4cG9ydCBjbGFzcyBMYXJnZVByb2dyYW0gZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6OkxhcmdlUHJvZ3JhbS5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjQ4CiAgICAvLyBleHBvcnQgY2xhc3MgTGFyZ2VQcm9ncmFtIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAxCiAgICB0eG4gTnVtQXBwQXJncwogICAgaW50Y18wIC8vIDAKICAgICE9CiAgICBieiBfX3B1eWFfYX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bGdvLnRzOjpMYXJnZVByb2dyYW0uY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "LargeProgram", + "methods": [ + { + "name": "getBigBytesLength", + "args": [], + "readonly": false, + "returns": { + "type": "uint64" + } + }, + { + "name": "delete", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/LargeProgram.arc56.json b/tests/approvals/out/precompiled-apps/LargeProgram.arc56.json new file mode 100644 index 00000000..07ab80a4 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/LargeProgram.arc56.json @@ -0,0 +1,113 @@ +{ + "name": "LargeProgram", + "structs": {}, + "methods": [ + { + "name": "getBigBytesLength", + "args": [], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 87 + ], + "errorMessage": "OnCompletion is not DeleteApplication" + }, + { + "pc": [ + 61 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 116 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 66, + 92 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpMYXJnZVByb2dyYW0uYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICAgY2FsbHN1YiBjb25zdHJ1Y3RvcgoKbWFpbl9hZnRlcl9pZl9lbHNlQDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpMYXJnZVByb2dyYW0uY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6NDgKICAgIC8vIGV4cG9ydCBjbGFzcyBMYXJnZVByb2dyYW0gZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6OkxhcmdlUHJvZ3JhbS5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjQ4CiAgICAvLyBleHBvcnQgY2xhc3MgTGFyZ2VQcm9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sKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpMYXJnZVByb2dyYW0uY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/LargeProgram.clear.teal b/tests/approvals/out/precompiled-apps/LargeProgram.clear.teal new file mode 100644 index 00000000..7b795785 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/LargeProgram.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::LargeProgram.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/precompiled-apps/LargeProgram.ssa.ir b/tests/approvals/out/precompiled-apps/LargeProgram.ssa.ir new file mode 100644 index 00000000..a9d2b71a --- /dev/null +++ b/tests/approvals/out/precompiled-apps/LargeProgram.ssa.ir @@ -0,0 +1,89 @@ +contract tests/approvals/precompiled-apps.algo.ts::LargeProgram: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/precompiled-apps.algo.ts::LargeProgram.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/precompiled-apps.algo.ts::LargeProgram.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/precompiled-apps.algo.ts::LargeProgram.constructor() -> void: + block@0: // L48 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::LargeProgram.__puya_arc4_router__() -> bool: + block@0: // L48 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@6 + block@1: // abi_routing_L48 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "getBigBytesLength()uint64" => block@2, method "delete()void" => block@3, * => block@4} + block@2: // getBigBytesLength_route_L49 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + let to_encode%0#0: uint64 = tests/approvals/precompiled-apps.algo.ts::LargeProgram.getBigBytesLength() + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%7#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%7#0) + return 1u + block@3: // delete_route_L53 + let tmp%8#0: uint64 = (txn OnCompletion) + let tmp%9#0: bool = (== tmp%8#0 DeleteApplication) + (assert tmp%9#0) // OnCompletion is not DeleteApplication + let tmp%10#0: uint64 = (txn ApplicationID) + let tmp%11#0: bool = (!= tmp%10#0 0u) + (assert tmp%11#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::LargeProgram.delete() + return 1u + block@4: // switch_case_default_L48 + goto block@5 + block@5: // switch_case_next_L48 + goto block@10 + block@6: // bare_routing_L48 + let tmp%12#0: uint64 = (txn OnCompletion) + switch tmp%12#0 {0u => block@7, * => block@8} + block@7: // __algots__.defaultCreate_L48 + let tmp%13#0: uint64 = (txn ApplicationID) + let tmp%14#0: bool = (== tmp%13#0 0u) + (assert tmp%14#0) // can only call when creating + tests/approvals/precompiled-apps.algo.ts::LargeProgram.__algots__.defaultCreate() + return 1u + block@8: // switch_case_default_L48 + goto block@9 + block@9: // switch_case_next_L48 + goto block@10 + block@10: // after_if_else_L48 + return 0u + + subroutine tests/approvals/precompiled-apps.algo.ts::LargeProgram.getBigBytesLength() -> uint64: + block@0: // L49 + let tmp%0#0: bytes = tests/approvals/precompiled-apps.algo.ts::getBigBytes() + let tmp%1#0: uint64 = (len tmp%0#0) + return tmp%1#0 + + subroutine tests/approvals/precompiled-apps.algo.ts::getBigBytes() -> bytes: + block@0: // L44 + let tmp%0#0: bytes = (bzero 4096u) + return tmp%0#0 + + subroutine tests/approvals/precompiled-apps.algo.ts::LargeProgram.delete() -> void: + block@0: // L53 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::LargeProgram.__algots__.defaultCreate() -> void: + block@0: // L48 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/TerribleCustodialAccount.ssa.ir b/tests/approvals/out/precompiled-apps/TerribleCustodialAccount.ssa.ir new file mode 100644 index 00000000..548fd240 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/TerribleCustodialAccount.ssa.ir @@ -0,0 +1,4 @@ +program logicsig tests/approvals/precompiled-apps.algo.ts::TerribleCustodialAccount: + subroutine tests/approvals/precompiled-apps.algo.ts::program() -> bool: + block@0: // L62 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/TerribleCustodialAccount.teal b/tests/approvals/out/precompiled-apps/TerribleCustodialAccount.teal new file mode 100644 index 00000000..a225946a --- /dev/null +++ b/tests/approvals/out/precompiled-apps/TerribleCustodialAccount.teal @@ -0,0 +1,7 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::TerribleCustodialAccount: + // tests/approvals/precompiled-apps.algo.ts:63 + // return true + pushint 1 // 1 + return diff --git a/tests/approvals/out/precompiled-apps/precompiled-apps.awst b/tests/approvals/out/precompiled-apps/precompiled-apps.awst new file mode 100644 index 00000000..a2f2e674 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/precompiled-apps.awst @@ -0,0 +1,222 @@ +contract Hello +{ + globals { + ["greeting"]: string + } + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + create(): void + { + GlobalState["greeting"]: string = greeting + } + + constructor(): void + { + super.constructor() + } + + HelloBase::delete(): void + { + } + + HelloBase::update(): void + { + } + + HelloBase::greet(): string + { + return "" + GlobalState["greeting"] + " " + name + } + + HelloBase::constructor(): void + { + void + GlobalState["greeting"]: string = "" + } + + Contract::constructor(): void + { + this.constructor() + } + + BaseContract::constructor(): void + { + } + +} +contract HelloTemplate +{ + globals { + ["greeting"]: string + } + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + create(): void + { + } + + constructor(): void + { + super.constructor() + GlobalState["greeting"]: string = TemplateVar[string](TMPL_GREETING) + } + + HelloBase::delete(): void + { + } + + HelloBase::update(): void + { + } + + HelloBase::greet(): string + { + return "" + GlobalState["greeting"] + " " + name + } + + HelloBase::constructor(): void + { + void + GlobalState["greeting"]: string = "" + } + + Contract::constructor(): void + { + this.constructor() + } + + BaseContract::constructor(): void + { + } + +} +contract HelloTemplateCustomPrefix +{ + globals { + ["greeting"]: string + } + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + create(): void + { + } + + constructor(): void + { + super.constructor() + GlobalState["greeting"]: string = TemplateVar[string](PRFX_GREETING) + } + + HelloBase::delete(): void + { + } + + HelloBase::update(): void + { + } + + HelloBase::greet(): string + { + return "" + GlobalState["greeting"] + " " + name + } + + HelloBase::constructor(): void + { + void + GlobalState["greeting"]: string = "" + } + + Contract::constructor(): void + { + this.constructor() + } + + BaseContract::constructor(): void + { + } + +} +subroutine getBigBytes(): bytes +{ + return bzero(4096) +} +contract LargeProgram +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + getBigBytesLength(): uint64 + { + return len(tests/approvals/precompiled-apps.algo.ts::getBigBytes()) + } + + delete(): void + { + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + + BaseContract::constructor(): void + { + } + + __algots__.defaultCreate(): void + { + } + +} + +logicsig tests/approvals/precompiled-apps.algo.ts::TerribleCustodialAccount { + return True +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/precompiled-apps.awst.json b/tests/approvals/out/precompiled-apps/precompiled-apps.awst.json new file mode 100644 index 00000000..823d9a69 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/precompiled-apps.awst.json @@ -0,0 +1,4382 @@ +[ + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 17, + "end_line": 17, + "column": 0, + "end_column": 38 + }, + "id": "tests/approvals/precompiled-apps.algo.ts::Hello", + "name": "Hello", + "description": null, + "method_resolution_order": [ + "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 18, + "end_line": 19, + "column": 2, + "end_column": 26 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "greeting", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 19, + "end_line": 19, + "column": 9, + "end_column": 25 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 19, + "end_line": 21, + "column": 27, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 20, + "end_line": 20, + "column": 4, + "end_column": 34 + }, + "target": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 20, + "end_line": 20, + "column": 26, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "greeting" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::Hello", + "member_name": "create", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 18, + "end_line": 18, + "column": 3, + "end_column": 37 + }, + "name": "create", + "is_bare": false, + "create": 2, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 17, + "end_line": 17, + "column": 0, + "end_column": 38 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 17, + "end_line": 17, + "column": 0, + "end_column": 38 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 17, + "end_line": 17, + "column": 0, + "end_column": 38 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 17, + "end_line": 17, + "column": 0, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceSuperMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::Hello", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 6, + "end_line": 7, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 7, + "end_line": 7, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "delete", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 6, + "end_line": 6, + "column": 3, + "end_column": 51 + }, + "name": "delete", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 5 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 9, + "end_line": 10, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "update", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 9, + "end_line": 9, + "column": 3, + "end_column": 51 + }, + "name": "update", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 4 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 29 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "name", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 8, + "end_column": 20 + } + } + ], + "return_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 14, + "column": 30, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 43 + }, + "value": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "" + }, + "op": "+", + "right": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 28, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" + } + }, + "op": "+", + "right": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": " " + } + }, + "op": "+", + "right": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 37, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "name" + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "greet", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 29 + }, + "name": "greet", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 46 + }, + "target": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 41, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + } + ], + "app_state": [ + { + "_type": "AppStorageDefinition", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "member_name": "greeting", + "kind": 1, + "storage_wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key_wtype": null, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "description": null + } + ], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + }, + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 24, + "end_line": 24, + "column": 0, + "end_column": 46 + }, + "id": "tests/approvals/precompiled-apps.algo.ts::HelloTemplate", + "name": "HelloTemplate", + "description": null, + "method_resolution_order": [ + "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 30, + "end_line": 31, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloTemplate", + "member_name": "create", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 30, + "end_line": 30, + "column": 3, + "end_column": 37 + }, + "name": "create", + "is_bare": false, + "create": 2, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 25, + "end_line": 28, + "column": 2, + "end_column": 3 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 25, + "end_line": 28, + "column": 16, + "end_column": 3 + }, + "body": [ + { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 26, + "end_line": 26, + "column": 4, + "end_column": 11 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 26, + "end_line": 26, + "column": 4, + "end_column": 11 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 26, + "end_line": 26, + "column": 4, + "end_column": 11 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceSuperMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 27, + "end_line": 27, + "column": 4, + "end_column": 57 + }, + "target": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 27, + "end_line": 27, + "column": 18, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" + }, + "value": { + "_type": "TemplateVar", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "TMPL_GREETING" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloTemplate", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 6, + "end_line": 7, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 7, + "end_line": 7, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "delete", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 6, + "end_line": 6, + "column": 3, + "end_column": 51 + }, + "name": "delete", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 5 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 9, + "end_line": 10, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "update", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 9, + "end_line": 9, + "column": 3, + "end_column": 51 + }, + "name": "update", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 4 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 29 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "name", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 8, + "end_column": 20 + } + } + ], + "return_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 14, + "column": 30, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 43 + }, + "value": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "" + }, + "op": "+", + "right": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 28, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" + } + }, + "op": "+", + "right": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": " " + } + }, + "op": "+", + "right": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 37, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "name" + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "greet", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 29 + }, + "name": "greet", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 46 + }, + "target": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 41, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + } + ], + "app_state": [ + { + "_type": "AppStorageDefinition", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "member_name": "greeting", + "kind": 1, + "storage_wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key_wtype": null, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "description": null + } + ], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + }, + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 34, + "end_line": 34, + "column": 0, + "end_column": 58 + }, + "id": "tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix", + "name": "HelloTemplateCustomPrefix", + "description": null, + "method_resolution_order": [ + "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 40, + "end_line": 41, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 41, + "end_line": 41, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix", + "member_name": "create", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 40, + "end_line": 40, + "column": 3, + "end_column": 37 + }, + "name": "create", + "is_bare": false, + "create": 2, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 35, + "end_line": 38, + "column": 2, + "end_column": 3 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 35, + "end_line": 38, + "column": 16, + "end_column": 3 + }, + "body": [ + { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 36, + "end_line": 36, + "column": 4, + "end_column": 11 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 36, + "end_line": 36, + "column": 4, + "end_column": 11 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 36, + "end_line": 36, + "column": 4, + "end_column": 11 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceSuperMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 66 + }, + "target": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 37, + "end_line": 37, + "column": 18, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" + }, + "value": { + "_type": "TemplateVar", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 37, + "end_line": 37, + "column": 26, + "end_column": 66 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "PRFX_GREETING" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 6, + "end_line": 7, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 7, + "end_line": 7, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "delete", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 6, + "end_line": 6, + "column": 3, + "end_column": 51 + }, + "name": "delete", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 5 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 9, + "end_line": 10, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "update", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 9, + "end_line": 9, + "column": 3, + "end_column": 51 + }, + "name": "update", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 4 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 29 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "name", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 8, + "end_column": 20 + } + } + ], + "return_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 14, + "column": 30, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 43 + }, + "value": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "" + }, + "op": "+", + "right": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 28, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" + } + }, + "op": "+", + "right": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": " " + } + }, + "op": "+", + "right": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 37, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "name" + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "greet", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 29 + }, + "name": "greet", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 46 + }, + "target": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 41, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + } + ], + "app_state": [ + { + "_type": "AppStorageDefinition", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "member_name": "greeting", + "kind": 1, + "storage_wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key_wtype": null, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "description": null + } + ], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + }, + { + "_type": "Subroutine", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 44, + "end_line": 44, + "column": 0, + "end_column": 22 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 44, + "end_line": 46, + "column": 23, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 45, + "end_line": 45, + "column": 2, + "end_column": 23 + }, + "value": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 45, + "end_line": 45, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "bzero", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 45, + "end_line": 45, + "column": 18, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "4096", + "teal_alias": null + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/precompiled-apps.algo.ts::getBigBytes", + "name": "getBigBytes" + }, + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "id": "tests/approvals/precompiled-apps.algo.ts::LargeProgram", + "name": "LargeProgram", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 49, + "end_line": 49, + "column": 2, + "end_column": 21 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 49, + "end_line": 51, + "column": 22, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 50, + "end_line": 50, + "column": 4, + "end_column": 31 + }, + "value": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 50, + "end_line": 50, + "column": 25, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 50, + "end_line": 50, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/precompiled-apps.algo.ts::getBigBytes" + }, + "args": [] + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::LargeProgram", + "member_name": "getBigBytesLength", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 49, + "end_line": 49, + "column": 2, + "end_column": 21 + }, + "name": "getBigBytesLength", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 53, + "end_line": 54, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 54, + "end_line": 54, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::LargeProgram", + "member_name": "delete", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 53, + "end_line": 53, + "column": 3, + "end_column": 51 + }, + "name": "delete", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 5 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::LargeProgram", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::LargeProgram", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true + } + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + }, + { + "_type": "LogicSignature", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 61, + "end_line": 61, + "column": 0, + "end_column": 56 + }, + "id": "tests/approvals/precompiled-apps.algo.ts::TerribleCustodialAccount", + "short_name": "TerribleCustodialAccount", + "program": { + "_type": "Subroutine", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 62, + "end_line": 62, + "column": 2, + "end_column": 11 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 62, + "end_line": 64, + "column": 12, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 63, + "end_line": 63, + "column": 4, + "end_column": 15 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 63, + "end_line": 63, + "column": 11, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/precompiled-apps.algo.ts::program", + "name": "program" + }, + "docstring": "", + "avm_version": null + } +] \ No newline at end of file diff --git a/tests/approvals/out/precompiled-factory/HelloFactory.approval.teal b/tests/approvals/out/precompiled-factory/HelloFactory.approval.teal new file mode 100644 index 00000000..45406ca0 --- /dev/null +++ b/tests/approvals/out/precompiled-factory/HelloFactory.approval.teal @@ -0,0 +1,803 @@ +#pragma version 10 + +tests/approvals/precompiled-factory.algo.ts::HelloFactory.approvalProgram: + intcblock 0 6 1 5 + bytecblock 0x "world" base64(CoEBQw==) 0x151f7c75 0x24378d3c 0xd0a28200 "hello" 0x4c5c61ba + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.constructor() -> void: +constructor: + // tests/approvals/precompiled-factory.algo.ts:6 + // class HelloFactory extends Contract { + proto 0 0 + retsub + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/precompiled-factory.algo.ts:6 + // class HelloFactory extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@8 + txna ApplicationArgs 0 + pushbytes 0x2a17995c // method "test_compile_contract()void" + pushbytes 0xe3254bc9 // method "test_compile_contract_with_template()void" + pushbytes 0xe2b7c692 // method "test_compile_contract_with_template_and_custom_prefix()void" + pushbytes 0x02947ca2 // method "test_compile_contract_large()void" + uncover 4 + match __puya_arc4_router___test_compile_contract_route@2 __puya_arc4_router___test_compile_contract_with_template_route@3 __puya_arc4_router___test_compile_contract_with_template_and_custom_prefix_route@4 __puya_arc4_router___test_compile_contract_large_route@5 + b __puya_arc4_router___switch_case_default@6 + +__puya_arc4_router___test_compile_contract_route@2: + // tests/approvals/precompiled-factory.algo.ts:7 + // test_compile_contract() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub test_compile_contract + intc_2 // 1 + retsub + +__puya_arc4_router___test_compile_contract_with_template_route@3: + // tests/approvals/precompiled-factory.algo.ts:38 + // test_compile_contract_with_template() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub test_compile_contract_with_template + intc_2 // 1 + retsub + +__puya_arc4_router___test_compile_contract_with_template_and_custom_prefix_route@4: + // tests/approvals/precompiled-factory.algo.ts:69 + // test_compile_contract_with_template_and_custom_prefix() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub test_compile_contract_with_template_and_custom_prefix + intc_2 // 1 + retsub + +__puya_arc4_router___test_compile_contract_large_route@5: + // tests/approvals/precompiled-factory.algo.ts:100 + // test_compile_contract_large() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub test_compile_contract_large + intc_2 // 1 + retsub + +__puya_arc4_router___switch_case_default@6: + b __puya_arc4_router___after_if_else@12 + +__puya_arc4_router___bare_routing@8: + // tests/approvals/precompiled-factory.algo.ts:6 + // class HelloFactory extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@9 + b __puya_arc4_router___switch_case_default@10 + +__puya_arc4_router_____algots__.defaultCreate@9: + // tests/approvals/precompiled-factory.algo.ts:6 + // class HelloFactory extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_2 // 1 + retsub + +__puya_arc4_router___switch_case_default@10: + +__puya_arc4_router___after_if_else@12: + // tests/approvals/precompiled-factory.algo.ts:6 + // class HelloFactory extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract() -> void: +test_compile_contract: + // tests/approvals/precompiled-factory.algo.ts:7 + // test_compile_contract() { + proto 0 0 + // tests/approvals/precompiled-factory.algo.ts:10-17 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:12 + // appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + bytec 6 // "hello" + len + itob + extract 6 2 + bytec 6 // "hello" + concat + // tests/approvals/precompiled-factory.algo.ts:15 + // globalNumBytes: 1, + intc_2 // 1 + itxn_field GlobalNumByteSlice + // tests/approvals/precompiled-factory.algo.ts:8 + // const compiled = compile(Hello) + bytec_2 // base64(CoEBQw==) + itxn_field ClearStateProgramPages + bytec_0 // 0x + itxn_field ClearStateProgramPages + pushbytes base64(CiACAAEmAghncmVldGluZwAxGEAAA4gABIgAD0OKAACIAAGJigAAKClniYoAATEbIhNBAIg2GgCABCDfOlSABCQ3jTyABKDoGHKABNCiggBPBI4EAAMAGAAoADhCAFsxGSISRDEYIhJENhoBVwIAiABNI4kxGYEFEkQxGCITRIgARSOJMRmBBBJEMRgiE0SIADkjiTEZIhJEMRgiE0Q2GgFXAgCIAChJFRZXBgJMUIAEFR98dUxQsCOJQgAAIomKAQAoi/9niYoAAImKAACJigEBIihlRClMUIABIFCL/1CJ) + itxn_field ApprovalProgramPages + bytec_0 // 0x + itxn_field ApprovalProgramPages + // tests/approvals/precompiled-factory.algo.ts:12 + // appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + pushbytes 0x20df3a54 // method "create(string)void" + itxn_field ApplicationArgs + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:10-16 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:10-17 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + itxn_submit + // tests/approvals/precompiled-factory.algo.ts:17 + // .submit().createdApp + itxn CreatedApplicationID + // tests/approvals/precompiled-factory.algo.ts:10-17 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + dup + // tests/approvals/precompiled-factory.algo.ts:19-24 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:21 + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + bytec_1 // "world" + len + itob + extract 6 2 + bytec_1 // "world" + concat + // tests/approvals/precompiled-factory.algo.ts:22 + // appId: helloApp, + swap + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:21 + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + bytec 5 // method "greet(string)string" + itxn_field ApplicationArgs + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:19-23 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:19-24 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + // .submit() + itxn_submit + itxn LastLog + // tests/approvals/precompiled-factory.algo.ts:25 + // const result = decodeArc4(txn.lastLog, 'log') + dup + extract 4 0 + swap + extract 0 4 + bytec_3 // 0x151f7c75 + == + assert // Bytes has valid prefix + extract 2 0 + // tests/approvals/precompiled-factory.algo.ts:27 + // assert(result === 'hello world') + pushbytes "hello world" + == + assert + // tests/approvals/precompiled-factory.algo.ts:29-35 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:33 + // onCompletion: OnCompleteAction.DeleteApplication, + intc_3 // 5 + itxn_field OnCompletion + // tests/approvals/precompiled-factory.algo.ts:32 + // appArgs: [methodSelector('delete()void')], + bytec 4 // method "delete()void" + itxn_field ApplicationArgs + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:29-34 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:29-35 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_submit + retsub + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_with_template() -> void: +test_compile_contract_with_template: + // tests/approvals/precompiled-factory.algo.ts:38 + // test_compile_contract_with_template() { + proto 0 0 + // tests/approvals/precompiled-factory.algo.ts:41-48 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:46 + // globalNumBytes: 1, + intc_2 // 1 + itxn_field GlobalNumByteSlice + // tests/approvals/precompiled-factory.algo.ts:39 + // const compiled = compile(HelloTemplate, { templateVars: { GREETING: 'hey' } }) + bytec_2 // base64(CoEBQw==) + itxn_field ClearStateProgramPages + bytec_0 // 0x + itxn_field ClearStateProgramPages + pushbytes base64(CiACAAEmAwhncmVldGluZwADaGV5MRhAAAOIAASIABJDigAAiAAEKCpniYoAACgpZ4mKAAExGyITQQCCNhoAgARMXGG6gAQkN408gASg6BhygATQooIATwSOBAADABIAIgAyQgBVMRkiEkQxGCISRIgATSOJMRmBBRJEMRgiE0SIAEEjiTEZgQQSRDEYIhNEiAA1I4kxGSISRDEYIhNENhoBVwIAiAAkSRUWVwYCTFCABBUffHVMULAjiUIAACKJigAAiYoAAImKAACJigEBIihlRClMUIABIFCL/1CJ) + itxn_field ApprovalProgramPages + bytec_0 // 0x + itxn_field ApprovalProgramPages + // tests/approvals/precompiled-factory.algo.ts:43 + // appArgs: [methodSelector('create()void')], + bytec 7 // method "create()void" + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:41-47 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:41-48 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + itxn_submit + // tests/approvals/precompiled-factory.algo.ts:48 + // .submit().createdApp + itxn CreatedApplicationID + // tests/approvals/precompiled-factory.algo.ts:41-48 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + dup + // tests/approvals/precompiled-factory.algo.ts:50-55 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:52 + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + bytec_1 // "world" + len + itob + extract 6 2 + bytec_1 // "world" + concat + // tests/approvals/precompiled-factory.algo.ts:53 + // appId: helloApp, + swap + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:52 + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + bytec 5 // method "greet(string)string" + itxn_field ApplicationArgs + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:50-54 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:50-55 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + // .submit() + itxn_submit + itxn LastLog + // tests/approvals/precompiled-factory.algo.ts:56 + // const result = decodeArc4(txn.lastLog, 'log') + dup + extract 4 0 + swap + extract 0 4 + bytec_3 // 0x151f7c75 + == + assert // Bytes has valid prefix + extract 2 0 + // tests/approvals/precompiled-factory.algo.ts:58 + // assert(result === 'hey world') + pushbytes "hey world" + == + assert + // tests/approvals/precompiled-factory.algo.ts:60-66 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:64 + // onCompletion: OnCompleteAction.DeleteApplication, + intc_3 // 5 + itxn_field OnCompletion + // tests/approvals/precompiled-factory.algo.ts:63 + // appArgs: [methodSelector('delete()void')], + bytec 4 // method "delete()void" + itxn_field ApplicationArgs + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:60-65 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:60-66 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_submit + retsub + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_with_template_and_custom_prefix() -> void: +test_compile_contract_with_template_and_custom_prefix: + // tests/approvals/precompiled-factory.algo.ts:69 + // test_compile_contract_with_template_and_custom_prefix() { + proto 0 0 + // tests/approvals/precompiled-factory.algo.ts:72-79 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:77 + // globalNumBytes: 1, + intc_2 // 1 + itxn_field GlobalNumByteSlice + // tests/approvals/precompiled-factory.algo.ts:70 + // const compiled = compile(HelloTemplateCustomPrefix, { templateVars: { GREETING: 'bonjour' }, templateVarsPrefix: 'PRFX_' }) + bytec_2 // base64(CoEBQw==) + itxn_field ClearStateProgramPages + bytec_0 // 0x + itxn_field ClearStateProgramPages + pushbytes base64(CiACAAEmAwhncmVldGluZwAHYm9uam91cjEYQAADiAAEiAASQ4oAAIgABCgqZ4mKAAAoKWeJigABMRsiE0EAgjYaAIAETFxhuoAEJDeNPIAEoOgYcoAE0KKCAE8EjgQAAwASACIAMkIAVTEZIhJEMRgiEkSIAE0jiTEZgQUSRDEYIhNEiABBI4kxGYEEEkQxGCITRIgANSOJMRkiEkQxGCITRDYaAVcCAIgAJEkVFlcGAkxQgAQVH3x1TFCwI4lCAAAiiYoAAImKAACJigAAiYoBASIoZUQpTFCAASBQi/9QiQ==) + itxn_field ApprovalProgramPages + bytec_0 // 0x + itxn_field ApprovalProgramPages + // tests/approvals/precompiled-factory.algo.ts:74 + // appArgs: [methodSelector('create()void')], + bytec 7 // method "create()void" + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:72-78 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:72-79 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + itxn_submit + // tests/approvals/precompiled-factory.algo.ts:79 + // .submit().createdApp + itxn CreatedApplicationID + // tests/approvals/precompiled-factory.algo.ts:72-79 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + dup + // tests/approvals/precompiled-factory.algo.ts:81-86 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:83 + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + bytec_1 // "world" + len + itob + extract 6 2 + bytec_1 // "world" + concat + // tests/approvals/precompiled-factory.algo.ts:84 + // appId: helloApp, + swap + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:83 + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + bytec 5 // method "greet(string)string" + itxn_field ApplicationArgs + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:81-85 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:81-86 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + // .submit() + itxn_submit + itxn LastLog + // tests/approvals/precompiled-factory.algo.ts:87 + // const result = decodeArc4(txn.lastLog, 'log') + dup + extract 4 0 + swap + extract 0 4 + bytec_3 // 0x151f7c75 + == + assert // Bytes has valid prefix + extract 2 0 + // tests/approvals/precompiled-factory.algo.ts:89 + // assert(result === 'bonjour world') + pushbytes "bonjour world" + == + assert + // tests/approvals/precompiled-factory.algo.ts:91-97 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:95 + // onCompletion: OnCompleteAction.DeleteApplication, + intc_3 // 5 + itxn_field OnCompletion + // tests/approvals/precompiled-factory.algo.ts:94 + // appArgs: [methodSelector('delete()void')], + bytec 4 // method "delete()void" + itxn_field ApplicationArgs + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:91-96 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:91-97 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_submit + retsub + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_large() -> void: +test_compile_contract_large: + // tests/approvals/precompiled-factory.algo.ts:100 + // test_compile_contract_large() { + proto 0 0 + // tests/approvals/precompiled-factory.algo.ts:103-110 + // const largeApp = itxn + // .applicationCall({ + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // extraProgramPages: compiled.extraProgramPages, + // globalNumBytes: compiled.globalBytes, + // }) + // .submit().createdApp + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:101 + // const compiled = compile(LargeProgram) + intc_0 // 0 + itxn_field GlobalNumByteSlice + intc_0 // 0 + itxn_field ExtraProgramPages + bytec_2 // base64(CoEBQw==) + itxn_field ClearStateProgramPages + bytec_0 // 0x + itxn_field ClearStateProgramPages + pushbytes base64(CiACAAExGEAAA4gABIgABUOKAACJigABMRsiE0EARjYaAIAEAr8wz4AEJDeNPE8CjgIAAwAcQgApMRkiEkQxGCITRIgANhaABBUffHVMULAjiTEZgQUSRDEYIhNEiAAsI4lCABUxGSJMjgEAA0IACjEYIhJEiAAYI4kiiYoAAYgAAhWJigABgYAgr4mKAACJigAAiQ==) + itxn_field ApprovalProgramPages + bytec_0 // 0x + itxn_field ApprovalProgramPages + // tests/approvals/precompiled-factory.algo.ts:103-109 + // const largeApp = itxn + // .applicationCall({ + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // extraProgramPages: compiled.extraProgramPages, + // globalNumBytes: compiled.globalBytes, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:103-110 + // const largeApp = itxn + // .applicationCall({ + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // extraProgramPages: compiled.extraProgramPages, + // globalNumBytes: compiled.globalBytes, + // }) + // .submit().createdApp + itxn_submit + // tests/approvals/precompiled-factory.algo.ts:110 + // .submit().createdApp + itxn CreatedApplicationID + // tests/approvals/precompiled-factory.algo.ts:103-110 + // const largeApp = itxn + // .applicationCall({ + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // extraProgramPages: compiled.extraProgramPages, + // globalNumBytes: compiled.globalBytes, + // }) + // .submit().createdApp + dup + // tests/approvals/precompiled-factory.algo.ts:112-117 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('getBigBytesLength()uint64')], + // appId: largeApp, + // }) + // .submit() + itxn_begin + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:114 + // appArgs: [methodSelector('getBigBytesLength()uint64')], + pushbytes 0x02bf30cf // method "getBigBytesLength()uint64" + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:112-116 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('getBigBytesLength()uint64')], + // appId: largeApp, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:112-117 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('getBigBytesLength()uint64')], + // appId: largeApp, + // }) + // .submit() + itxn_submit + itxn LastLog + // tests/approvals/precompiled-factory.algo.ts:118 + // const result = decodeArc4(txn.lastLog, 'log') + dup + extract 4 0 + swap + extract 0 4 + bytec_3 // 0x151f7c75 + == + assert // Bytes has valid prefix + btoi + // tests/approvals/precompiled-factory.algo.ts:120 + // assert(result === 4096) + pushint 4096 // 4096 + == + assert + // tests/approvals/precompiled-factory.algo.ts:122-128 + // itxn + // .applicationCall({ + // appId: largeApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:126 + // onCompletion: OnCompleteAction.DeleteApplication, + intc_3 // 5 + itxn_field OnCompletion + // tests/approvals/precompiled-factory.algo.ts:125 + // appArgs: [methodSelector('delete()void')], + bytec 4 // method "delete()void" + itxn_field ApplicationArgs + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:122-127 + // itxn + // .applicationCall({ + // appId: largeApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:122-128 + // itxn + // .applicationCall({ + // appId: largeApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_submit + retsub + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/precompiled-factory.algo.ts:6 + // class HelloFactory extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/precompiled-factory/HelloFactory.arc32.json b/tests/approvals/out/precompiled-factory/HelloFactory.arc32.json new file mode 100644 index 00000000..da7d1586 --- /dev/null +++ b/tests/approvals/out/precompiled-factory/HelloFactory.arc32.json @@ -0,0 +1,89 @@ +{ + "hints": { + "test_compile_contract()void": { + "call_config": { + "no_op": "CALL" + } + }, + "test_compile_contract_with_template()void": { + "call_config": { + "no_op": "CALL" + } + }, + "test_compile_contract_with_template_and_custom_prefix()void": { + "call_config": { + "no_op": "CALL" + } + }, + "test_compile_contract_large()void": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjpIZWxsb0ZhY3RvcnkuYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgNiAxIDUKICAgIGJ5dGVjYmxvY2sgMHggIndvcmxkIiBiYXNlNjQoQ29FQlF3PT0pIDB4MTUxZjdjNzUgMHgyNDM3OGQzYyAweGQwYTI4MjAwICJoZWxsbyIgMHg0YzVjNjFiYQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICAgY2FsbHN1YiBjb25zdHJ1Y3RvcgoKbWFpbl9hZnRlcl9pZl9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ZUFwcGxpY2F0aW9uLAogICAgLy8gICB9KQogICAgaW50Y18xIC8vIDYKICAgIGl0eG5fZmllbGQgVHlwZUVudW0KICAgIGludGNfMCAvLyAwCiAgICBpdHhuX2ZpZWxkIEZlZQogICAgLy8gdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWZhY3RvcnkuYWxnby50czoxMjItMTI4CiAgICAvLyBpdHhuCiAgICAvLyAgIC5hcHBsaWNhdGlvbkNhbGwoewogICAgLy8gICAgIGFwcElkOiBsYXJnZUFwcCwKICAgIC8vICAgICBhcHBBcmdzOiBbbWV0aG9kU2VsZWN0b3IoJ2RlbGV0ZSgpdm9pZCcpXSwKICAgIC8vICAgICBvbkNvbXBsZXRpb246IE9uQ29tcGxldGVBY3Rpb24uRGVsZXRlQXBwbGljYXRpb24sCiAgICAvLyAgIH0pCiAgICAvLyAgIC5zdWJtaXQoKQogICAgaXR4bl9zdWJtaXQKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1mYWN0b3J5LmFsZ28udHM6OkhlbGxvRmFjdG9yeS5fX2FsZ290c19fLmRlZmF1bHRDcmVhdGUoKSAtPiB2b2lkOgpfX2FsZ290c19fLmRlZmF1bHRDcmVhdGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjYKICAgIC8vIGNsYXNzIEhlbGxvRmFjdG9yeSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjpIZWxsb0ZhY3RvcnkuY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "HelloFactory", + "methods": [ + { + "name": "test_compile_contract", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "test_compile_contract_with_template", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "test_compile_contract_with_template_and_custom_prefix", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "test_compile_contract_large", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-factory/HelloFactory.arc56.json b/tests/approvals/out/precompiled-factory/HelloFactory.arc56.json new file mode 100644 index 00000000..3b3eaee7 --- /dev/null +++ b/tests/approvals/out/precompiled-factory/HelloFactory.arc56.json @@ -0,0 +1,153 @@ +{ + "name": "HelloFactory", + "structs": {}, + "methods": [ + { + "name": "test_compile_contract", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_compile_contract_with_template", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_compile_contract_with_template_and_custom_prefix", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_compile_contract_large", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 514, + 845, + 1178, + 1429 + ], + "errorMessage": "Bytes has valid prefix" + }, + { + "pc": [ + 119, + 134, + 149, + 164 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 193 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 124, + 139, + 154, + 169 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjpIZWxsb0ZhY3RvcnkuYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgNiAxIDUKICAgIGJ5dGVjYmxvY2sgMHggIndvcmxkIiBiYXNlNjQoQ29FQlF3PT0pIDB4MTUxZjdjNzUgMHgyNDM3OGQzYyAweGQwYTI4MjAwICJoZWxsbyIgMHg0YzVjNjFiYQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICAgY2FsbHN1YiBjb25zdHJ1Y3RvcgoKbWFpbl9hZnRlcl9pZl9lbHNlQDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjpIZWxsb0ZhY3RvcnkuY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1mYWN0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ogICAgLy8gICAgIGFwcElkOiBsYXJnZUFwcCwKICAgIC8vICAgICBhcHBBcmdzOiBbbWV0aG9kU2VsZWN0b3IoJ2RlbGV0ZSgpdm9pZCcpXSwKICAgIC8vICAgICBvbkNvbXBsZXRpb246IE9uQ29tcGxldGVBY3Rpb24uRGVsZXRlQXBwbGljYXRpb24sCiAgICAvLyAgIH0pCiAgICAvLyAgIC5zdWJtaXQoKQogICAgaXR4bl9zdWJtaXQKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1mYWN0b3J5LmFsZ28udHM6OkhlbGxvRmFjdG9yeS5fX2FsZ290c19fLmRlZmF1bHRDcmVhdGUoKSAtPiB2b2lkOgpfX2FsZ290c19fLmRlZmF1bHRDcmVhdGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjYKICAgIC8vIGNsYXNzIEhlbGxvRmFjdG9yeSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjpIZWxsb0ZhY3RvcnkuY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-factory/HelloFactory.clear.teal b/tests/approvals/out/precompiled-factory/HelloFactory.clear.teal new file mode 100644 index 00000000..2093729d --- /dev/null +++ b/tests/approvals/out/precompiled-factory/HelloFactory.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/precompiled-factory.algo.ts::HelloFactory.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/precompiled-factory/HelloFactory.ssa.ir b/tests/approvals/out/precompiled-factory/HelloFactory.ssa.ir new file mode 100644 index 00000000..52d4e0ea --- /dev/null +++ b/tests/approvals/out/precompiled-factory/HelloFactory.ssa.ir @@ -0,0 +1,1225 @@ +contract tests/approvals/precompiled-factory.algo.ts::HelloFactory: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/precompiled-factory.algo.ts::HelloFactory.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/precompiled-factory.algo.ts::HelloFactory.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.constructor() -> void: + block@0: // L6 + return + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.__puya_arc4_router__() -> bool: + block@0: // L6 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@8 + block@1: // abi_routing_L6 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_compile_contract()void" => block@2, method "test_compile_contract_with_template()void" => block@3, method "test_compile_contract_with_template_and_custom_prefix()void" => block@4, method "test_compile_contract_large()void" => block@5, * => block@6} + block@2: // test_compile_contract_route_L7 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract() + return 1u + block@3: // test_compile_contract_with_template_route_L38 + let tmp%7#0: uint64 = (txn OnCompletion) + let tmp%8#0: bool = (== tmp%7#0 NoOp) + (assert tmp%8#0) // OnCompletion is not NoOp + let tmp%9#0: uint64 = (txn ApplicationID) + let tmp%10#0: bool = (!= tmp%9#0 0u) + (assert tmp%10#0) // can only call when not creating + tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_with_template() + return 1u + block@4: // test_compile_contract_with_template_and_custom_prefix_route_L69 + let tmp%11#0: uint64 = (txn OnCompletion) + let tmp%12#0: bool = (== tmp%11#0 NoOp) + (assert tmp%12#0) // OnCompletion is not NoOp + let tmp%13#0: uint64 = (txn ApplicationID) + let tmp%14#0: bool = (!= tmp%13#0 0u) + (assert tmp%14#0) // can only call when not creating + tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_with_template_and_custom_prefix() + return 1u + block@5: // test_compile_contract_large_route_L100 + let tmp%15#0: uint64 = (txn OnCompletion) + let tmp%16#0: bool = (== tmp%15#0 NoOp) + (assert tmp%16#0) // OnCompletion is not NoOp + let tmp%17#0: uint64 = (txn ApplicationID) + let tmp%18#0: bool = (!= tmp%17#0 0u) + (assert tmp%18#0) // can only call when not creating + tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_large() + return 1u + block@6: // switch_case_default_L6 + goto block@7 + block@7: // switch_case_next_L6 + goto block@12 + block@8: // bare_routing_L6 + let tmp%19#0: uint64 = (txn OnCompletion) + switch tmp%19#0 {0u => block@9, * => block@10} + block@9: // __algots__.defaultCreate_L6 + let tmp%20#0: uint64 = (txn ApplicationID) + let tmp%21#0: bool = (== tmp%20#0 0u) + (assert tmp%21#0) // can only call when creating + tests/approvals/precompiled-factory.algo.ts::HelloFactory.__algots__.defaultCreate() + return 1u + block@10: // switch_case_default_L6 + goto block@11 + block@11: // switch_case_next_L6 + goto block@12 + block@12: // after_if_else_L6 + return 0u + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract() -> void: + block@0: // L7 + let (compiled.approvalProgram.0#0: bytes, compiled.approvalProgram.1#0: bytes, compiled.clearStateProgram.0#0: bytes, compiled.clearStateProgram.1#0: bytes, compiled.extraProgramPages#0: uint64, compiled.globalUints#0: uint64, compiled.globalBytes#0: uint64, compiled.localUints#0: uint64, compiled.localBytes#0: uint64) = (compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=ApprovalProgramPages, program_page=0), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=ApprovalProgramPages, program_page=1), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=ClearStateProgramPages, program_page=0), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=ClearStateProgramPages, program_page=1), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=ExtraProgramPages, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=GlobalNumUint, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=GlobalNumByteSlice, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=LocalNumUint, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=LocalNumByteSlice, program_page=None)) + itxn_begin + let inner_txn_params%0#0: itxn_field_set = itxn_field_set(0) + let inner_txn_params%0%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%0%%Fee_length#0: uint64 = 1u + let inner_txn_params%0%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%0%%TypeEnum_length#0: uint64 = 1u + let length%0#0: uint64 = (len "hello") + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 "hello") + let inner_txn_params%0%%param_ApplicationArgs_idx_0#0: bytes = method "create(string)void" + let inner_txn_params%0%%param_ApplicationArgs_idx_1#0: bytes = encoded_value%0#0 + let inner_txn_params%0%%ApplicationArgs_length#0: uint64 = 2u + let inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0: bytes = compiled.approvalProgram.0#0 + let inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0: bytes = compiled.approvalProgram.1#0 + let inner_txn_params%0%%ApprovalProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0: bytes = compiled.clearStateProgram.0#0 + let inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0: bytes = compiled.clearStateProgram.1#0 + let inner_txn_params%0%%ClearStateProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0: uint64 = 1u + let inner_txn_params%0%%GlobalNumByteSlice_length#0: uint64 = 1u + let inner_txn_params%0%%Sender_length#0: uint64 = 0u + let inner_txn_params%0%%Note_length#0: uint64 = 0u + let inner_txn_params%0%%Receiver_length#0: uint64 = 0u + let inner_txn_params%0%%Amount_length#0: uint64 = 0u + let inner_txn_params%0%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%0%%VotePK_length#0: uint64 = 0u + let inner_txn_params%0%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%0%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%0%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%0%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%0%%Type_length#0: uint64 = 0u + let inner_txn_params%0%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%0%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%0%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%0%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%0%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%0%%ApplicationID_length#0: uint64 = 0u + let inner_txn_params%0%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%0%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%0%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%0%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%0%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%0%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%0%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%0%%Accounts_length#0: uint64 = 0u + let inner_txn_params%0%%Assets_length#0: uint64 = 0u + let inner_txn_params%0%%Applications_length#0: uint64 = 0u + ((itxn_field GlobalNumByteSlice) inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0) + ((itxn_field ApplicationArgs) inner_txn_params%0%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%0%%param_ApplicationArgs_idx_1#0) + ((itxn_field TypeEnum) inner_txn_params%0%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%0%%param_Fee_idx_0#0) + goto block@1 + block@1: // next_txn_L10 + itxn_submit + let helloApp#0: uint64 = itxn[itxn_group_idx(0)].CreatedApplicationID + itxn_begin + let inner_txn_params%1#0: itxn_field_set = itxn_field_set(1) + let inner_txn_params%1%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%1%%Fee_length#0: uint64 = 1u + let inner_txn_params%1%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%1%%TypeEnum_length#0: uint64 = 1u + let length%1#0: uint64 = (len "world") + let as_bytes%1#0: bytes = (itob length%1#0) + let length_uint16%1#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_value%1#0: bytes = (concat length_uint16%1#0 "world") + let inner_txn_params%1%%param_ApplicationArgs_idx_0#0: bytes = method "greet(string)string" + let inner_txn_params%1%%param_ApplicationArgs_idx_1#0: bytes = encoded_value%1#0 + let inner_txn_params%1%%ApplicationArgs_length#0: uint64 = 2u + let inner_txn_params%1%%param_ApplicationID_idx_0#0: uint64 = helloApp#0 + let inner_txn_params%1%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%1%%Sender_length#0: uint64 = 0u + let inner_txn_params%1%%Note_length#0: uint64 = 0u + let inner_txn_params%1%%Receiver_length#0: uint64 = 0u + let inner_txn_params%1%%Amount_length#0: uint64 = 0u + let inner_txn_params%1%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%1%%VotePK_length#0: uint64 = 0u + let inner_txn_params%1%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%1%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%1%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%1%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%1%%Type_length#0: uint64 = 0u + let inner_txn_params%1%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%1%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%1%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%1%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%1%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%1%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%1%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%1%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%1%%Accounts_length#0: uint64 = 0u + let inner_txn_params%1%%Assets_length#0: uint64 = 0u + let inner_txn_params%1%%Applications_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field ApplicationID) inner_txn_params%1%%param_ApplicationID_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_1#0) + ((itxn_field TypeEnum) inner_txn_params%1%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%1%%param_Fee_idx_0#0) + goto block@2 + block@2: // next_txn_L19 + itxn_submit + let txn#0: itxn_group_idx = itxn_group_idx(0) + let txn._is_last#0: bool = 1u + let txn.Sender#0: bytes = itxn[txn#0].Sender + let txn.Fee#0: uint64 = itxn[txn#0].Fee + let txn.FirstValid#0: uint64 = itxn[txn#0].FirstValid + let txn.FirstValidTime#0: uint64 = itxn[txn#0].FirstValidTime + let txn.LastValid#0: uint64 = itxn[txn#0].LastValid + let txn.Note#0: bytes = itxn[txn#0].Note + let txn.Lease#0: bytes = itxn[txn#0].Lease + let txn.Receiver#0: bytes = itxn[txn#0].Receiver + let txn.Amount#0: uint64 = itxn[txn#0].Amount + let txn.CloseRemainderTo#0: bytes = itxn[txn#0].CloseRemainderTo + let txn.VotePK#0: bytes = itxn[txn#0].VotePK + let txn.SelectionPK#0: bytes = itxn[txn#0].SelectionPK + let txn.VoteFirst#0: uint64 = itxn[txn#0].VoteFirst + let txn.VoteLast#0: uint64 = itxn[txn#0].VoteLast + let txn.VoteKeyDilution#0: uint64 = itxn[txn#0].VoteKeyDilution + let txn.Type#0: bytes = itxn[txn#0].Type + let txn.TypeEnum#0: uint64 = itxn[txn#0].TypeEnum + let txn.XferAsset#0: uint64 = itxn[txn#0].XferAsset + let txn.AssetAmount#0: uint64 = itxn[txn#0].AssetAmount + let txn.AssetSender#0: bytes = itxn[txn#0].AssetSender + let txn.AssetReceiver#0: bytes = itxn[txn#0].AssetReceiver + let txn.AssetCloseTo#0: bytes = itxn[txn#0].AssetCloseTo + let txn.GroupIndex#0: uint64 = itxn[txn#0].GroupIndex + let txn.TxID#0: bytes = itxn[txn#0].TxID + let txn.ApplicationID#0: uint64 = itxn[txn#0].ApplicationID + let txn.OnCompletion#0: uint64 = itxn[txn#0].OnCompletion + let txn.NumAppArgs#0: uint64 = itxn[txn#0].NumAppArgs + let txn.NumAccounts#0: uint64 = itxn[txn#0].NumAccounts + let txn.ApprovalProgram#0: bytes = itxn[txn#0].ApprovalProgram + let txn.ClearStateProgram#0: bytes = itxn[txn#0].ClearStateProgram + let txn.RekeyTo#0: bytes = itxn[txn#0].RekeyTo + let txn.ConfigAsset#0: uint64 = itxn[txn#0].ConfigAsset + let txn.ConfigAssetTotal#0: uint64 = itxn[txn#0].ConfigAssetTotal + let txn.ConfigAssetDecimals#0: uint64 = itxn[txn#0].ConfigAssetDecimals + let txn.ConfigAssetDefaultFrozen#0: bool = itxn[txn#0].ConfigAssetDefaultFrozen + let txn.ConfigAssetUnitName#0: bytes = itxn[txn#0].ConfigAssetUnitName + let txn.ConfigAssetName#0: bytes = itxn[txn#0].ConfigAssetName + let txn.ConfigAssetURL#0: bytes = itxn[txn#0].ConfigAssetURL + let txn.ConfigAssetMetadataHash#0: bytes = itxn[txn#0].ConfigAssetMetadataHash + let txn.ConfigAssetManager#0: bytes = itxn[txn#0].ConfigAssetManager + let txn.ConfigAssetReserve#0: bytes = itxn[txn#0].ConfigAssetReserve + let txn.ConfigAssetFreeze#0: bytes = itxn[txn#0].ConfigAssetFreeze + let txn.ConfigAssetClawback#0: bytes = itxn[txn#0].ConfigAssetClawback + let txn.FreezeAsset#0: uint64 = itxn[txn#0].FreezeAsset + let txn.FreezeAssetAccount#0: bytes = itxn[txn#0].FreezeAssetAccount + let txn.FreezeAssetFrozen#0: bool = itxn[txn#0].FreezeAssetFrozen + let txn.NumAssets#0: uint64 = itxn[txn#0].NumAssets + let txn.NumApplications#0: uint64 = itxn[txn#0].NumApplications + let txn.GlobalNumUint#0: uint64 = itxn[txn#0].GlobalNumUint + let txn.GlobalNumByteSlice#0: uint64 = itxn[txn#0].GlobalNumByteSlice + let txn.LocalNumUint#0: uint64 = itxn[txn#0].LocalNumUint + let txn.LocalNumByteSlice#0: uint64 = itxn[txn#0].LocalNumByteSlice + let txn.ExtraProgramPages#0: uint64 = itxn[txn#0].ExtraProgramPages + let txn.Nonparticipation#0: bool = itxn[txn#0].Nonparticipation + let txn.NumLogs#0: uint64 = itxn[txn#0].NumLogs + let txn.CreatedAssetID#0: uint64 = itxn[txn#0].CreatedAssetID + let txn.CreatedApplicationID#0: uint64 = itxn[txn#0].CreatedApplicationID + let txn.LastLog#0: bytes = itxn[txn#0].LastLog + let txn.StateProofPK#0: bytes = itxn[txn#0].StateProofPK + let txn.NumApprovalProgramPages#0: uint64 = itxn[txn#0].NumApprovalProgramPages + let txn.NumClearStateProgramPages#0: uint64 = itxn[txn#0].NumClearStateProgramPages + let tmp%0#0: bytes = ((extract 4 0) txn.LastLog#0) + let tmp%1#0: bytes = ((extract 0 4) txn.LastLog#0) + let tmp%2#0: bool = (== tmp%1#0 0x151f7c75) + (assert tmp%2#0) // Bytes has valid prefix + let result#0: bytes = ((extract 2 0) tmp%0#0) + let tmp%3#0: bool = (== result#0 "hello world") + (assert tmp%3#0) + itxn_begin + let inner_txn_params%2#0: itxn_field_set = itxn_field_set(2) + let inner_txn_params%2%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%2%%Fee_length#0: uint64 = 1u + let inner_txn_params%2%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%2%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationID_idx_0#0: uint64 = helloApp#0 + let inner_txn_params%2%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationArgs_idx_0#0: bytes = method "delete()void" + let inner_txn_params%2%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%2%%param_OnCompletion_idx_0#0: uint64 = 5u + let inner_txn_params%2%%OnCompletion_length#0: uint64 = 1u + let inner_txn_params%2%%Sender_length#0: uint64 = 0u + let inner_txn_params%2%%Note_length#0: uint64 = 0u + let inner_txn_params%2%%Receiver_length#0: uint64 = 0u + let inner_txn_params%2%%Amount_length#0: uint64 = 0u + let inner_txn_params%2%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%2%%VotePK_length#0: uint64 = 0u + let inner_txn_params%2%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%2%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%2%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%2%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%2%%Type_length#0: uint64 = 0u + let inner_txn_params%2%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%2%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%2%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%2%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%2%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%2%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%2%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%2%%Accounts_length#0: uint64 = 0u + let inner_txn_params%2%%Assets_length#0: uint64 = 0u + let inner_txn_params%2%%Applications_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field OnCompletion) inner_txn_params%2%%param_OnCompletion_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%2%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationID) inner_txn_params%2%%param_ApplicationID_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%2%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%2%%param_Fee_idx_0#0) + goto block@3 + block@3: // next_txn_L29 + itxn_submit + return + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_with_template() -> void: + block@0: // L38 + let (compiled.approvalProgram.0#0: bytes, compiled.approvalProgram.1#0: bytes, compiled.clearStateProgram.0#0: bytes, compiled.clearStateProgram.1#0: bytes, compiled.extraProgramPages#0: uint64, compiled.globalUints#0: uint64, compiled.globalBytes#0: uint64, compiled.localUints#0: uint64, compiled.localBytes#0: uint64) = (compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=ApprovalProgramPages, program_page=0, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=ApprovalProgramPages, program_page=1, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=ClearStateProgramPages, program_page=0, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=ClearStateProgramPages, program_page=1, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=ExtraProgramPages, program_page=None, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=GlobalNumUint, program_page=None, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=GlobalNumByteSlice, program_page=None, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=LocalNumUint, program_page=None, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=LocalNumByteSlice, program_page=None, TMPL_GREETING="hey")) + itxn_begin + let inner_txn_params%0#0: itxn_field_set = itxn_field_set(0) + let inner_txn_params%0%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%0%%Fee_length#0: uint64 = 1u + let inner_txn_params%0%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%0%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%0%%param_ApplicationArgs_idx_0#0: bytes = method "create()void" + let inner_txn_params%0%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0: bytes = compiled.approvalProgram.0#0 + let inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0: bytes = compiled.approvalProgram.1#0 + let inner_txn_params%0%%ApprovalProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0: bytes = compiled.clearStateProgram.0#0 + let inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0: bytes = compiled.clearStateProgram.1#0 + let inner_txn_params%0%%ClearStateProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0: uint64 = 1u + let inner_txn_params%0%%GlobalNumByteSlice_length#0: uint64 = 1u + let inner_txn_params%0%%Sender_length#0: uint64 = 0u + let inner_txn_params%0%%Note_length#0: uint64 = 0u + let inner_txn_params%0%%Receiver_length#0: uint64 = 0u + let inner_txn_params%0%%Amount_length#0: uint64 = 0u + let inner_txn_params%0%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%0%%VotePK_length#0: uint64 = 0u + let inner_txn_params%0%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%0%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%0%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%0%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%0%%Type_length#0: uint64 = 0u + let inner_txn_params%0%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%0%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%0%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%0%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%0%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%0%%ApplicationID_length#0: uint64 = 0u + let inner_txn_params%0%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%0%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%0%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%0%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%0%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%0%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%0%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%0%%Accounts_length#0: uint64 = 0u + let inner_txn_params%0%%Assets_length#0: uint64 = 0u + let inner_txn_params%0%%Applications_length#0: uint64 = 0u + ((itxn_field GlobalNumByteSlice) inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0) + ((itxn_field ApplicationArgs) inner_txn_params%0%%param_ApplicationArgs_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%0%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%0%%param_Fee_idx_0#0) + goto block@1 + block@1: // next_txn_L41 + itxn_submit + let helloApp#0: uint64 = itxn[itxn_group_idx(0)].CreatedApplicationID + itxn_begin + let inner_txn_params%1#0: itxn_field_set = itxn_field_set(1) + let inner_txn_params%1%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%1%%Fee_length#0: uint64 = 1u + let inner_txn_params%1%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%1%%TypeEnum_length#0: uint64 = 1u + let length%0#0: uint64 = (len "world") + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 "world") + let inner_txn_params%1%%param_ApplicationArgs_idx_0#0: bytes = method "greet(string)string" + let inner_txn_params%1%%param_ApplicationArgs_idx_1#0: bytes = encoded_value%0#0 + let inner_txn_params%1%%ApplicationArgs_length#0: uint64 = 2u + let inner_txn_params%1%%param_ApplicationID_idx_0#0: uint64 = helloApp#0 + let inner_txn_params%1%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%1%%Sender_length#0: uint64 = 0u + let inner_txn_params%1%%Note_length#0: uint64 = 0u + let inner_txn_params%1%%Receiver_length#0: uint64 = 0u + let inner_txn_params%1%%Amount_length#0: uint64 = 0u + let inner_txn_params%1%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%1%%VotePK_length#0: uint64 = 0u + let inner_txn_params%1%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%1%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%1%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%1%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%1%%Type_length#0: uint64 = 0u + let inner_txn_params%1%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%1%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%1%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%1%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%1%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%1%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%1%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%1%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%1%%Accounts_length#0: uint64 = 0u + let inner_txn_params%1%%Assets_length#0: uint64 = 0u + let inner_txn_params%1%%Applications_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field ApplicationID) inner_txn_params%1%%param_ApplicationID_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_1#0) + ((itxn_field TypeEnum) inner_txn_params%1%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%1%%param_Fee_idx_0#0) + goto block@2 + block@2: // next_txn_L50 + itxn_submit + let txn#0: itxn_group_idx = itxn_group_idx(0) + let txn._is_last#0: bool = 1u + let txn.Sender#0: bytes = itxn[txn#0].Sender + let txn.Fee#0: uint64 = itxn[txn#0].Fee + let txn.FirstValid#0: uint64 = itxn[txn#0].FirstValid + let txn.FirstValidTime#0: uint64 = itxn[txn#0].FirstValidTime + let txn.LastValid#0: uint64 = itxn[txn#0].LastValid + let txn.Note#0: bytes = itxn[txn#0].Note + let txn.Lease#0: bytes = itxn[txn#0].Lease + let txn.Receiver#0: bytes = itxn[txn#0].Receiver + let txn.Amount#0: uint64 = itxn[txn#0].Amount + let txn.CloseRemainderTo#0: bytes = itxn[txn#0].CloseRemainderTo + let txn.VotePK#0: bytes = itxn[txn#0].VotePK + let txn.SelectionPK#0: bytes = itxn[txn#0].SelectionPK + let txn.VoteFirst#0: uint64 = itxn[txn#0].VoteFirst + let txn.VoteLast#0: uint64 = itxn[txn#0].VoteLast + let txn.VoteKeyDilution#0: uint64 = itxn[txn#0].VoteKeyDilution + let txn.Type#0: bytes = itxn[txn#0].Type + let txn.TypeEnum#0: uint64 = itxn[txn#0].TypeEnum + let txn.XferAsset#0: uint64 = itxn[txn#0].XferAsset + let txn.AssetAmount#0: uint64 = itxn[txn#0].AssetAmount + let txn.AssetSender#0: bytes = itxn[txn#0].AssetSender + let txn.AssetReceiver#0: bytes = itxn[txn#0].AssetReceiver + let txn.AssetCloseTo#0: bytes = itxn[txn#0].AssetCloseTo + let txn.GroupIndex#0: uint64 = itxn[txn#0].GroupIndex + let txn.TxID#0: bytes = itxn[txn#0].TxID + let txn.ApplicationID#0: uint64 = itxn[txn#0].ApplicationID + let txn.OnCompletion#0: uint64 = itxn[txn#0].OnCompletion + let txn.NumAppArgs#0: uint64 = itxn[txn#0].NumAppArgs + let txn.NumAccounts#0: uint64 = itxn[txn#0].NumAccounts + let txn.ApprovalProgram#0: bytes = itxn[txn#0].ApprovalProgram + let txn.ClearStateProgram#0: bytes = itxn[txn#0].ClearStateProgram + let txn.RekeyTo#0: bytes = itxn[txn#0].RekeyTo + let txn.ConfigAsset#0: uint64 = itxn[txn#0].ConfigAsset + let txn.ConfigAssetTotal#0: uint64 = itxn[txn#0].ConfigAssetTotal + let txn.ConfigAssetDecimals#0: uint64 = itxn[txn#0].ConfigAssetDecimals + let txn.ConfigAssetDefaultFrozen#0: bool = itxn[txn#0].ConfigAssetDefaultFrozen + let txn.ConfigAssetUnitName#0: bytes = itxn[txn#0].ConfigAssetUnitName + let txn.ConfigAssetName#0: bytes = itxn[txn#0].ConfigAssetName + let txn.ConfigAssetURL#0: bytes = itxn[txn#0].ConfigAssetURL + let txn.ConfigAssetMetadataHash#0: bytes = itxn[txn#0].ConfigAssetMetadataHash + let txn.ConfigAssetManager#0: bytes = itxn[txn#0].ConfigAssetManager + let txn.ConfigAssetReserve#0: bytes = itxn[txn#0].ConfigAssetReserve + let txn.ConfigAssetFreeze#0: bytes = itxn[txn#0].ConfigAssetFreeze + let txn.ConfigAssetClawback#0: bytes = itxn[txn#0].ConfigAssetClawback + let txn.FreezeAsset#0: uint64 = itxn[txn#0].FreezeAsset + let txn.FreezeAssetAccount#0: bytes = itxn[txn#0].FreezeAssetAccount + let txn.FreezeAssetFrozen#0: bool = itxn[txn#0].FreezeAssetFrozen + let txn.NumAssets#0: uint64 = itxn[txn#0].NumAssets + let txn.NumApplications#0: uint64 = itxn[txn#0].NumApplications + let txn.GlobalNumUint#0: uint64 = itxn[txn#0].GlobalNumUint + let txn.GlobalNumByteSlice#0: uint64 = itxn[txn#0].GlobalNumByteSlice + let txn.LocalNumUint#0: uint64 = itxn[txn#0].LocalNumUint + let txn.LocalNumByteSlice#0: uint64 = itxn[txn#0].LocalNumByteSlice + let txn.ExtraProgramPages#0: uint64 = itxn[txn#0].ExtraProgramPages + let txn.Nonparticipation#0: bool = itxn[txn#0].Nonparticipation + let txn.NumLogs#0: uint64 = itxn[txn#0].NumLogs + let txn.CreatedAssetID#0: uint64 = itxn[txn#0].CreatedAssetID + let txn.CreatedApplicationID#0: uint64 = itxn[txn#0].CreatedApplicationID + let txn.LastLog#0: bytes = itxn[txn#0].LastLog + let txn.StateProofPK#0: bytes = itxn[txn#0].StateProofPK + let txn.NumApprovalProgramPages#0: uint64 = itxn[txn#0].NumApprovalProgramPages + let txn.NumClearStateProgramPages#0: uint64 = itxn[txn#0].NumClearStateProgramPages + let tmp%0#0: bytes = ((extract 4 0) txn.LastLog#0) + let tmp%1#0: bytes = ((extract 0 4) txn.LastLog#0) + let tmp%2#0: bool = (== tmp%1#0 0x151f7c75) + (assert tmp%2#0) // Bytes has valid prefix + let result#0: bytes = ((extract 2 0) tmp%0#0) + let tmp%3#0: bool = (== result#0 "hey world") + (assert tmp%3#0) + itxn_begin + let inner_txn_params%2#0: itxn_field_set = itxn_field_set(2) + let inner_txn_params%2%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%2%%Fee_length#0: uint64 = 1u + let inner_txn_params%2%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%2%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationID_idx_0#0: uint64 = helloApp#0 + let inner_txn_params%2%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationArgs_idx_0#0: bytes = method "delete()void" + let inner_txn_params%2%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%2%%param_OnCompletion_idx_0#0: uint64 = 5u + let inner_txn_params%2%%OnCompletion_length#0: uint64 = 1u + let inner_txn_params%2%%Sender_length#0: uint64 = 0u + let inner_txn_params%2%%Note_length#0: uint64 = 0u + let inner_txn_params%2%%Receiver_length#0: uint64 = 0u + let inner_txn_params%2%%Amount_length#0: uint64 = 0u + let inner_txn_params%2%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%2%%VotePK_length#0: uint64 = 0u + let inner_txn_params%2%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%2%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%2%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%2%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%2%%Type_length#0: uint64 = 0u + let inner_txn_params%2%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%2%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%2%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%2%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%2%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%2%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%2%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%2%%Accounts_length#0: uint64 = 0u + let inner_txn_params%2%%Assets_length#0: uint64 = 0u + let inner_txn_params%2%%Applications_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field OnCompletion) inner_txn_params%2%%param_OnCompletion_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%2%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationID) inner_txn_params%2%%param_ApplicationID_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%2%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%2%%param_Fee_idx_0#0) + goto block@3 + block@3: // next_txn_L60 + itxn_submit + return + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_with_template_and_custom_prefix() -> void: + block@0: // L69 + let (compiled.approvalProgram.0#0: bytes, compiled.approvalProgram.1#0: bytes, compiled.clearStateProgram.0#0: bytes, compiled.clearStateProgram.1#0: bytes, compiled.extraProgramPages#0: uint64, compiled.globalUints#0: uint64, compiled.globalBytes#0: uint64, compiled.localUints#0: uint64, compiled.localBytes#0: uint64) = (compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=ApprovalProgramPages, program_page=0, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=ApprovalProgramPages, program_page=1, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=ClearStateProgramPages, program_page=0, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=ClearStateProgramPages, program_page=1, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=ExtraProgramPages, program_page=None, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=GlobalNumUint, program_page=None, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=GlobalNumByteSlice, program_page=None, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=LocalNumUint, program_page=None, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=LocalNumByteSlice, program_page=None, PRFX_GREETING="bonjour")) + itxn_begin + let inner_txn_params%0#0: itxn_field_set = itxn_field_set(0) + let inner_txn_params%0%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%0%%Fee_length#0: uint64 = 1u + let inner_txn_params%0%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%0%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%0%%param_ApplicationArgs_idx_0#0: bytes = method "create()void" + let inner_txn_params%0%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0: bytes = compiled.approvalProgram.0#0 + let inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0: bytes = compiled.approvalProgram.1#0 + let inner_txn_params%0%%ApprovalProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0: bytes = compiled.clearStateProgram.0#0 + let inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0: bytes = compiled.clearStateProgram.1#0 + let inner_txn_params%0%%ClearStateProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0: uint64 = 1u + let inner_txn_params%0%%GlobalNumByteSlice_length#0: uint64 = 1u + let inner_txn_params%0%%Sender_length#0: uint64 = 0u + let inner_txn_params%0%%Note_length#0: uint64 = 0u + let inner_txn_params%0%%Receiver_length#0: uint64 = 0u + let inner_txn_params%0%%Amount_length#0: uint64 = 0u + let inner_txn_params%0%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%0%%VotePK_length#0: uint64 = 0u + let inner_txn_params%0%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%0%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%0%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%0%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%0%%Type_length#0: uint64 = 0u + let inner_txn_params%0%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%0%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%0%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%0%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%0%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%0%%ApplicationID_length#0: uint64 = 0u + let inner_txn_params%0%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%0%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%0%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%0%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%0%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%0%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%0%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%0%%Accounts_length#0: uint64 = 0u + let inner_txn_params%0%%Assets_length#0: uint64 = 0u + let inner_txn_params%0%%Applications_length#0: uint64 = 0u + ((itxn_field GlobalNumByteSlice) inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0) + ((itxn_field ApplicationArgs) inner_txn_params%0%%param_ApplicationArgs_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%0%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%0%%param_Fee_idx_0#0) + goto block@1 + block@1: // next_txn_L72 + itxn_submit + let helloApp#0: uint64 = itxn[itxn_group_idx(0)].CreatedApplicationID + itxn_begin + let inner_txn_params%1#0: itxn_field_set = itxn_field_set(1) + let inner_txn_params%1%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%1%%Fee_length#0: uint64 = 1u + let inner_txn_params%1%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%1%%TypeEnum_length#0: uint64 = 1u + let length%0#0: uint64 = (len "world") + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 "world") + let inner_txn_params%1%%param_ApplicationArgs_idx_0#0: bytes = method "greet(string)string" + let inner_txn_params%1%%param_ApplicationArgs_idx_1#0: bytes = encoded_value%0#0 + let inner_txn_params%1%%ApplicationArgs_length#0: uint64 = 2u + let inner_txn_params%1%%param_ApplicationID_idx_0#0: uint64 = helloApp#0 + let inner_txn_params%1%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%1%%Sender_length#0: uint64 = 0u + let inner_txn_params%1%%Note_length#0: uint64 = 0u + let inner_txn_params%1%%Receiver_length#0: uint64 = 0u + let inner_txn_params%1%%Amount_length#0: uint64 = 0u + let inner_txn_params%1%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%1%%VotePK_length#0: uint64 = 0u + let inner_txn_params%1%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%1%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%1%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%1%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%1%%Type_length#0: uint64 = 0u + let inner_txn_params%1%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%1%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%1%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%1%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%1%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%1%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%1%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%1%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%1%%Accounts_length#0: uint64 = 0u + let inner_txn_params%1%%Assets_length#0: uint64 = 0u + let inner_txn_params%1%%Applications_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field ApplicationID) inner_txn_params%1%%param_ApplicationID_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_1#0) + ((itxn_field TypeEnum) inner_txn_params%1%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%1%%param_Fee_idx_0#0) + goto block@2 + block@2: // next_txn_L81 + itxn_submit + let txn#0: itxn_group_idx = itxn_group_idx(0) + let txn._is_last#0: bool = 1u + let txn.Sender#0: bytes = itxn[txn#0].Sender + let txn.Fee#0: uint64 = itxn[txn#0].Fee + let txn.FirstValid#0: uint64 = itxn[txn#0].FirstValid + let txn.FirstValidTime#0: uint64 = itxn[txn#0].FirstValidTime + let txn.LastValid#0: uint64 = itxn[txn#0].LastValid + let txn.Note#0: bytes = itxn[txn#0].Note + let txn.Lease#0: bytes = itxn[txn#0].Lease + let txn.Receiver#0: bytes = itxn[txn#0].Receiver + let txn.Amount#0: uint64 = itxn[txn#0].Amount + let txn.CloseRemainderTo#0: bytes = itxn[txn#0].CloseRemainderTo + let txn.VotePK#0: bytes = itxn[txn#0].VotePK + let txn.SelectionPK#0: bytes = itxn[txn#0].SelectionPK + let txn.VoteFirst#0: uint64 = itxn[txn#0].VoteFirst + let txn.VoteLast#0: uint64 = itxn[txn#0].VoteLast + let txn.VoteKeyDilution#0: uint64 = itxn[txn#0].VoteKeyDilution + let txn.Type#0: bytes = itxn[txn#0].Type + let txn.TypeEnum#0: uint64 = itxn[txn#0].TypeEnum + let txn.XferAsset#0: uint64 = itxn[txn#0].XferAsset + let txn.AssetAmount#0: uint64 = itxn[txn#0].AssetAmount + let txn.AssetSender#0: bytes = itxn[txn#0].AssetSender + let txn.AssetReceiver#0: bytes = itxn[txn#0].AssetReceiver + let txn.AssetCloseTo#0: bytes = itxn[txn#0].AssetCloseTo + let txn.GroupIndex#0: uint64 = itxn[txn#0].GroupIndex + let txn.TxID#0: bytes = itxn[txn#0].TxID + let txn.ApplicationID#0: uint64 = itxn[txn#0].ApplicationID + let txn.OnCompletion#0: uint64 = itxn[txn#0].OnCompletion + let txn.NumAppArgs#0: uint64 = itxn[txn#0].NumAppArgs + let txn.NumAccounts#0: uint64 = itxn[txn#0].NumAccounts + let txn.ApprovalProgram#0: bytes = itxn[txn#0].ApprovalProgram + let txn.ClearStateProgram#0: bytes = itxn[txn#0].ClearStateProgram + let txn.RekeyTo#0: bytes = itxn[txn#0].RekeyTo + let txn.ConfigAsset#0: uint64 = itxn[txn#0].ConfigAsset + let txn.ConfigAssetTotal#0: uint64 = itxn[txn#0].ConfigAssetTotal + let txn.ConfigAssetDecimals#0: uint64 = itxn[txn#0].ConfigAssetDecimals + let txn.ConfigAssetDefaultFrozen#0: bool = itxn[txn#0].ConfigAssetDefaultFrozen + let txn.ConfigAssetUnitName#0: bytes = itxn[txn#0].ConfigAssetUnitName + let txn.ConfigAssetName#0: bytes = itxn[txn#0].ConfigAssetName + let txn.ConfigAssetURL#0: bytes = itxn[txn#0].ConfigAssetURL + let txn.ConfigAssetMetadataHash#0: bytes = itxn[txn#0].ConfigAssetMetadataHash + let txn.ConfigAssetManager#0: bytes = itxn[txn#0].ConfigAssetManager + let txn.ConfigAssetReserve#0: bytes = itxn[txn#0].ConfigAssetReserve + let txn.ConfigAssetFreeze#0: bytes = itxn[txn#0].ConfigAssetFreeze + let txn.ConfigAssetClawback#0: bytes = itxn[txn#0].ConfigAssetClawback + let txn.FreezeAsset#0: uint64 = itxn[txn#0].FreezeAsset + let txn.FreezeAssetAccount#0: bytes = itxn[txn#0].FreezeAssetAccount + let txn.FreezeAssetFrozen#0: bool = itxn[txn#0].FreezeAssetFrozen + let txn.NumAssets#0: uint64 = itxn[txn#0].NumAssets + let txn.NumApplications#0: uint64 = itxn[txn#0].NumApplications + let txn.GlobalNumUint#0: uint64 = itxn[txn#0].GlobalNumUint + let txn.GlobalNumByteSlice#0: uint64 = itxn[txn#0].GlobalNumByteSlice + let txn.LocalNumUint#0: uint64 = itxn[txn#0].LocalNumUint + let txn.LocalNumByteSlice#0: uint64 = itxn[txn#0].LocalNumByteSlice + let txn.ExtraProgramPages#0: uint64 = itxn[txn#0].ExtraProgramPages + let txn.Nonparticipation#0: bool = itxn[txn#0].Nonparticipation + let txn.NumLogs#0: uint64 = itxn[txn#0].NumLogs + let txn.CreatedAssetID#0: uint64 = itxn[txn#0].CreatedAssetID + let txn.CreatedApplicationID#0: uint64 = itxn[txn#0].CreatedApplicationID + let txn.LastLog#0: bytes = itxn[txn#0].LastLog + let txn.StateProofPK#0: bytes = itxn[txn#0].StateProofPK + let txn.NumApprovalProgramPages#0: uint64 = itxn[txn#0].NumApprovalProgramPages + let txn.NumClearStateProgramPages#0: uint64 = itxn[txn#0].NumClearStateProgramPages + let tmp%0#0: bytes = ((extract 4 0) txn.LastLog#0) + let tmp%1#0: bytes = ((extract 0 4) txn.LastLog#0) + let tmp%2#0: bool = (== tmp%1#0 0x151f7c75) + (assert tmp%2#0) // Bytes has valid prefix + let result#0: bytes = ((extract 2 0) tmp%0#0) + let tmp%3#0: bool = (== result#0 "bonjour world") + (assert tmp%3#0) + itxn_begin + let inner_txn_params%2#0: itxn_field_set = itxn_field_set(2) + let inner_txn_params%2%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%2%%Fee_length#0: uint64 = 1u + let inner_txn_params%2%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%2%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationID_idx_0#0: uint64 = helloApp#0 + let inner_txn_params%2%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationArgs_idx_0#0: bytes = method "delete()void" + let inner_txn_params%2%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%2%%param_OnCompletion_idx_0#0: uint64 = 5u + let inner_txn_params%2%%OnCompletion_length#0: uint64 = 1u + let inner_txn_params%2%%Sender_length#0: uint64 = 0u + let inner_txn_params%2%%Note_length#0: uint64 = 0u + let inner_txn_params%2%%Receiver_length#0: uint64 = 0u + let inner_txn_params%2%%Amount_length#0: uint64 = 0u + let inner_txn_params%2%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%2%%VotePK_length#0: uint64 = 0u + let inner_txn_params%2%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%2%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%2%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%2%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%2%%Type_length#0: uint64 = 0u + let inner_txn_params%2%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%2%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%2%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%2%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%2%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%2%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%2%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%2%%Accounts_length#0: uint64 = 0u + let inner_txn_params%2%%Assets_length#0: uint64 = 0u + let inner_txn_params%2%%Applications_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field OnCompletion) inner_txn_params%2%%param_OnCompletion_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%2%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationID) inner_txn_params%2%%param_ApplicationID_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%2%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%2%%param_Fee_idx_0#0) + goto block@3 + block@3: // next_txn_L91 + itxn_submit + return + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_large() -> void: + block@0: // L100 + let (compiled.approvalProgram.0#0: bytes, compiled.approvalProgram.1#0: bytes, compiled.clearStateProgram.0#0: bytes, compiled.clearStateProgram.1#0: bytes, compiled.extraProgramPages#0: uint64, compiled.globalUints#0: uint64, compiled.globalBytes#0: uint64, compiled.localUints#0: uint64, compiled.localBytes#0: uint64) = (compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=ApprovalProgramPages, program_page=0), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=ApprovalProgramPages, program_page=1), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=ClearStateProgramPages, program_page=0), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=ClearStateProgramPages, program_page=1), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=ExtraProgramPages, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=GlobalNumUint, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=GlobalNumByteSlice, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=LocalNumUint, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=LocalNumByteSlice, program_page=None)) + itxn_begin + let inner_txn_params%0#0: itxn_field_set = itxn_field_set(0) + let inner_txn_params%0%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%0%%Fee_length#0: uint64 = 1u + let inner_txn_params%0%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%0%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0: bytes = compiled.approvalProgram.0#0 + let inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0: bytes = compiled.approvalProgram.1#0 + let inner_txn_params%0%%ApprovalProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0: bytes = compiled.clearStateProgram.0#0 + let inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0: bytes = compiled.clearStateProgram.1#0 + let inner_txn_params%0%%ClearStateProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_ExtraProgramPages_idx_0#0: uint64 = compiled.extraProgramPages#0 + let inner_txn_params%0%%ExtraProgramPages_length#0: uint64 = 1u + let inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0: uint64 = compiled.globalBytes#0 + let inner_txn_params%0%%GlobalNumByteSlice_length#0: uint64 = 1u + let inner_txn_params%0%%Sender_length#0: uint64 = 0u + let inner_txn_params%0%%Note_length#0: uint64 = 0u + let inner_txn_params%0%%Receiver_length#0: uint64 = 0u + let inner_txn_params%0%%Amount_length#0: uint64 = 0u + let inner_txn_params%0%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%0%%VotePK_length#0: uint64 = 0u + let inner_txn_params%0%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%0%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%0%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%0%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%0%%Type_length#0: uint64 = 0u + let inner_txn_params%0%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%0%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%0%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%0%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%0%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%0%%ApplicationID_length#0: uint64 = 0u + let inner_txn_params%0%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%0%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%0%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%0%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%0%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%0%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%0%%ApplicationArgs_length#0: uint64 = 0u + let inner_txn_params%0%%Accounts_length#0: uint64 = 0u + let inner_txn_params%0%%Assets_length#0: uint64 = 0u + let inner_txn_params%0%%Applications_length#0: uint64 = 0u + ((itxn_field GlobalNumByteSlice) inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0) + ((itxn_field ExtraProgramPages) inner_txn_params%0%%param_ExtraProgramPages_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0) + ((itxn_field TypeEnum) inner_txn_params%0%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%0%%param_Fee_idx_0#0) + goto block@1 + block@1: // next_txn_L103 + itxn_submit + let largeApp#0: uint64 = itxn[itxn_group_idx(0)].CreatedApplicationID + itxn_begin + let inner_txn_params%1#0: itxn_field_set = itxn_field_set(1) + let inner_txn_params%1%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%1%%Fee_length#0: uint64 = 1u + let inner_txn_params%1%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%1%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%1%%param_ApplicationArgs_idx_0#0: bytes = method "getBigBytesLength()uint64" + let inner_txn_params%1%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%1%%param_ApplicationID_idx_0#0: uint64 = largeApp#0 + let inner_txn_params%1%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%1%%Sender_length#0: uint64 = 0u + let inner_txn_params%1%%Note_length#0: uint64 = 0u + let inner_txn_params%1%%Receiver_length#0: uint64 = 0u + let inner_txn_params%1%%Amount_length#0: uint64 = 0u + let inner_txn_params%1%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%1%%VotePK_length#0: uint64 = 0u + let inner_txn_params%1%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%1%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%1%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%1%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%1%%Type_length#0: uint64 = 0u + let inner_txn_params%1%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%1%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%1%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%1%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%1%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%1%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%1%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%1%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%1%%Accounts_length#0: uint64 = 0u + let inner_txn_params%1%%Assets_length#0: uint64 = 0u + let inner_txn_params%1%%Applications_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field ApplicationID) inner_txn_params%1%%param_ApplicationID_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%1%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%1%%param_Fee_idx_0#0) + goto block@2 + block@2: // next_txn_L112 + itxn_submit + let txn#0: itxn_group_idx = itxn_group_idx(0) + let txn._is_last#0: bool = 1u + let txn.Sender#0: bytes = itxn[txn#0].Sender + let txn.Fee#0: uint64 = itxn[txn#0].Fee + let txn.FirstValid#0: uint64 = itxn[txn#0].FirstValid + let txn.FirstValidTime#0: uint64 = itxn[txn#0].FirstValidTime + let txn.LastValid#0: uint64 = itxn[txn#0].LastValid + let txn.Note#0: bytes = itxn[txn#0].Note + let txn.Lease#0: bytes = itxn[txn#0].Lease + let txn.Receiver#0: bytes = itxn[txn#0].Receiver + let txn.Amount#0: uint64 = itxn[txn#0].Amount + let txn.CloseRemainderTo#0: bytes = itxn[txn#0].CloseRemainderTo + let txn.VotePK#0: bytes = itxn[txn#0].VotePK + let txn.SelectionPK#0: bytes = itxn[txn#0].SelectionPK + let txn.VoteFirst#0: uint64 = itxn[txn#0].VoteFirst + let txn.VoteLast#0: uint64 = itxn[txn#0].VoteLast + let txn.VoteKeyDilution#0: uint64 = itxn[txn#0].VoteKeyDilution + let txn.Type#0: bytes = itxn[txn#0].Type + let txn.TypeEnum#0: uint64 = itxn[txn#0].TypeEnum + let txn.XferAsset#0: uint64 = itxn[txn#0].XferAsset + let txn.AssetAmount#0: uint64 = itxn[txn#0].AssetAmount + let txn.AssetSender#0: bytes = itxn[txn#0].AssetSender + let txn.AssetReceiver#0: bytes = itxn[txn#0].AssetReceiver + let txn.AssetCloseTo#0: bytes = itxn[txn#0].AssetCloseTo + let txn.GroupIndex#0: uint64 = itxn[txn#0].GroupIndex + let txn.TxID#0: bytes = itxn[txn#0].TxID + let txn.ApplicationID#0: uint64 = itxn[txn#0].ApplicationID + let txn.OnCompletion#0: uint64 = itxn[txn#0].OnCompletion + let txn.NumAppArgs#0: uint64 = itxn[txn#0].NumAppArgs + let txn.NumAccounts#0: uint64 = itxn[txn#0].NumAccounts + let txn.ApprovalProgram#0: bytes = itxn[txn#0].ApprovalProgram + let txn.ClearStateProgram#0: bytes = itxn[txn#0].ClearStateProgram + let txn.RekeyTo#0: bytes = itxn[txn#0].RekeyTo + let txn.ConfigAsset#0: uint64 = itxn[txn#0].ConfigAsset + let txn.ConfigAssetTotal#0: uint64 = itxn[txn#0].ConfigAssetTotal + let txn.ConfigAssetDecimals#0: uint64 = itxn[txn#0].ConfigAssetDecimals + let txn.ConfigAssetDefaultFrozen#0: bool = itxn[txn#0].ConfigAssetDefaultFrozen + let txn.ConfigAssetUnitName#0: bytes = itxn[txn#0].ConfigAssetUnitName + let txn.ConfigAssetName#0: bytes = itxn[txn#0].ConfigAssetName + let txn.ConfigAssetURL#0: bytes = itxn[txn#0].ConfigAssetURL + let txn.ConfigAssetMetadataHash#0: bytes = itxn[txn#0].ConfigAssetMetadataHash + let txn.ConfigAssetManager#0: bytes = itxn[txn#0].ConfigAssetManager + let txn.ConfigAssetReserve#0: bytes = itxn[txn#0].ConfigAssetReserve + let txn.ConfigAssetFreeze#0: bytes = itxn[txn#0].ConfigAssetFreeze + let txn.ConfigAssetClawback#0: bytes = itxn[txn#0].ConfigAssetClawback + let txn.FreezeAsset#0: uint64 = itxn[txn#0].FreezeAsset + let txn.FreezeAssetAccount#0: bytes = itxn[txn#0].FreezeAssetAccount + let txn.FreezeAssetFrozen#0: bool = itxn[txn#0].FreezeAssetFrozen + let txn.NumAssets#0: uint64 = itxn[txn#0].NumAssets + let txn.NumApplications#0: uint64 = itxn[txn#0].NumApplications + let txn.GlobalNumUint#0: uint64 = itxn[txn#0].GlobalNumUint + let txn.GlobalNumByteSlice#0: uint64 = itxn[txn#0].GlobalNumByteSlice + let txn.LocalNumUint#0: uint64 = itxn[txn#0].LocalNumUint + let txn.LocalNumByteSlice#0: uint64 = itxn[txn#0].LocalNumByteSlice + let txn.ExtraProgramPages#0: uint64 = itxn[txn#0].ExtraProgramPages + let txn.Nonparticipation#0: bool = itxn[txn#0].Nonparticipation + let txn.NumLogs#0: uint64 = itxn[txn#0].NumLogs + let txn.CreatedAssetID#0: uint64 = itxn[txn#0].CreatedAssetID + let txn.CreatedApplicationID#0: uint64 = itxn[txn#0].CreatedApplicationID + let txn.LastLog#0: bytes = itxn[txn#0].LastLog + let txn.StateProofPK#0: bytes = itxn[txn#0].StateProofPK + let txn.NumApprovalProgramPages#0: uint64 = itxn[txn#0].NumApprovalProgramPages + let txn.NumClearStateProgramPages#0: uint64 = itxn[txn#0].NumClearStateProgramPages + let tmp%0#0: bytes = ((extract 4 0) txn.LastLog#0) + let tmp%1#0: bytes = ((extract 0 4) txn.LastLog#0) + let tmp%2#0: bool = (== tmp%1#0 0x151f7c75) + (assert tmp%2#0) // Bytes has valid prefix + let result#0: uint64 = (btoi tmp%0#0) + let tmp%3#0: bool = (== result#0 4096u) + (assert tmp%3#0) + itxn_begin + let inner_txn_params%2#0: itxn_field_set = itxn_field_set(2) + let inner_txn_params%2%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%2%%Fee_length#0: uint64 = 1u + let inner_txn_params%2%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%2%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationID_idx_0#0: uint64 = largeApp#0 + let inner_txn_params%2%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationArgs_idx_0#0: bytes = method "delete()void" + let inner_txn_params%2%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%2%%param_OnCompletion_idx_0#0: uint64 = 5u + let inner_txn_params%2%%OnCompletion_length#0: uint64 = 1u + let inner_txn_params%2%%Sender_length#0: uint64 = 0u + let inner_txn_params%2%%Note_length#0: uint64 = 0u + let inner_txn_params%2%%Receiver_length#0: uint64 = 0u + let inner_txn_params%2%%Amount_length#0: uint64 = 0u + let inner_txn_params%2%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%2%%VotePK_length#0: uint64 = 0u + let inner_txn_params%2%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%2%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%2%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%2%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%2%%Type_length#0: uint64 = 0u + let inner_txn_params%2%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%2%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%2%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%2%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%2%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%2%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%2%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%2%%Accounts_length#0: uint64 = 0u + let inner_txn_params%2%%Assets_length#0: uint64 = 0u + let inner_txn_params%2%%Applications_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field OnCompletion) inner_txn_params%2%%param_OnCompletion_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%2%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationID) inner_txn_params%2%%param_ApplicationID_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%2%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%2%%param_Fee_idx_0#0) + goto block@3 + block@3: // next_txn_L122 + itxn_submit + return + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.__algots__.defaultCreate() -> void: + block@0: // L6 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/precompiled-factory/precompiled-factory.awst b/tests/approvals/out/precompiled-factory/precompiled-factory.awst new file mode 100644 index 00000000..35c2c95d --- /dev/null +++ b/tests/approvals/out/precompiled-factory/precompiled-factory.awst @@ -0,0 +1,74 @@ +contract HelloFactory +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + test_compile_contract(): void + { + compiled: CompiledContract{ approvalProgram: readonlytuple[bytes, bytes], clearStateProgram: readonlytuple[bytes, bytes], extraProgramPages: uint64, globalUints: uint64, globalBytes: uint64, localUints: uint64, localBytes: uint64 } = compile(tests/approvals/precompiled-apps.algo.ts::Hello + helloApp: application = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("create(string)void"), reinterpret_cast(ARC4_ENCODE("hello", wtype=arc4.dynamic_array))], ApprovalProgramPages=[compiled.approvalProgram.0, compiled.approvalProgram.1], ClearStateProgramPages=[compiled.clearStateProgram.0, compiled.clearStateProgram.1], GlobalNumByteSlice=1)).CreatedApplicationID + txn: inner_transaction_appl = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("greet(string)string"), reinterpret_cast(ARC4_ENCODE("world", wtype=arc4.dynamic_array))], ApplicationID=helloApp)) + result: string = ARC4_DECODE(reinterpret_cast>(checked_maybe([extract<4, 0>((#0 = txn.LastLog)), extract<0, 4>(#0) == 0x151f7c75], comment=Bytes has valid prefix))) + assert(result == "hello world") + submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationID=helloApp, ApplicationArgs=[Method("delete()void")], OnCompletion=5)) + } + + test_compile_contract_with_template(): void + { + compiled: CompiledContract{ approvalProgram: readonlytuple[bytes, bytes], clearStateProgram: readonlytuple[bytes, bytes], extraProgramPages: uint64, globalUints: uint64, globalBytes: uint64, localUints: uint64, localBytes: uint64 } = compile(tests/approvals/precompiled-apps.algo.ts::HelloTemplate, GREETING="hey" + helloApp: application = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("create()void")], ApprovalProgramPages=[compiled.approvalProgram.0, compiled.approvalProgram.1], ClearStateProgramPages=[compiled.clearStateProgram.0, compiled.clearStateProgram.1], GlobalNumByteSlice=1)).CreatedApplicationID + txn: inner_transaction_appl = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("greet(string)string"), reinterpret_cast(ARC4_ENCODE("world", wtype=arc4.dynamic_array))], ApplicationID=helloApp)) + result: string = ARC4_DECODE(reinterpret_cast>(checked_maybe([extract<4, 0>((#1 = txn.LastLog)), extract<0, 4>(#1) == 0x151f7c75], comment=Bytes has valid prefix))) + assert(result == "hey world") + submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationID=helloApp, ApplicationArgs=[Method("delete()void")], OnCompletion=5)) + } + + test_compile_contract_with_template_and_custom_prefix(): void + { + compiled: CompiledContract{ approvalProgram: readonlytuple[bytes, bytes], clearStateProgram: readonlytuple[bytes, bytes], extraProgramPages: uint64, globalUints: uint64, globalBytes: uint64, localUints: uint64, localBytes: uint64 } = compile(tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix, prefix=PRFX_, GREETING="bonjour" + helloApp: application = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("create()void")], ApprovalProgramPages=[compiled.approvalProgram.0, compiled.approvalProgram.1], ClearStateProgramPages=[compiled.clearStateProgram.0, compiled.clearStateProgram.1], GlobalNumByteSlice=1)).CreatedApplicationID + txn: inner_transaction_appl = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("greet(string)string"), reinterpret_cast(ARC4_ENCODE("world", wtype=arc4.dynamic_array))], ApplicationID=helloApp)) + result: string = ARC4_DECODE(reinterpret_cast>(checked_maybe([extract<4, 0>((#2 = txn.LastLog)), extract<0, 4>(#2) == 0x151f7c75], comment=Bytes has valid prefix))) + assert(result == "bonjour world") + submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationID=helloApp, ApplicationArgs=[Method("delete()void")], OnCompletion=5)) + } + + test_compile_contract_large(): void + { + compiled: CompiledContract{ approvalProgram: readonlytuple[bytes, bytes], clearStateProgram: readonlytuple[bytes, bytes], extraProgramPages: uint64, globalUints: uint64, globalBytes: uint64, localUints: uint64, localBytes: uint64 } = compile(tests/approvals/precompiled-apps.algo.ts::LargeProgram + largeApp: application = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApprovalProgramPages=[compiled.approvalProgram.0, compiled.approvalProgram.1], ClearStateProgramPages=[compiled.clearStateProgram.0, compiled.clearStateProgram.1], ExtraProgramPages=compiled.extraProgramPages, GlobalNumByteSlice=compiled.globalBytes)).CreatedApplicationID + txn: inner_transaction_appl = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("getBigBytesLength()uint64")], ApplicationID=largeApp)) + result: uint64 = ARC4_DECODE(reinterpret_cast(checked_maybe([extract<4, 0>((#3 = txn.LastLog)), extract<0, 4>(#3) == 0x151f7c75], comment=Bytes has valid prefix))) + assert(result == 4096) + submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationID=largeApp, ApplicationArgs=[Method("delete()void")], OnCompletion=5)) + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + + BaseContract::constructor(): void + { + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-factory/precompiled-factory.awst.json b/tests/approvals/out/precompiled-factory/precompiled-factory.awst.json new file mode 100644 index 00000000..97a8350f --- /dev/null +++ b/tests/approvals/out/precompiled-factory/precompiled-factory.awst.json @@ -0,0 +1,8945 @@ +[ + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "id": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "name": "HelloFactory", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 7, + "end_line": 7, + "column": 2, + "end_column": 25 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 7, + "end_line": 36, + "column": 26, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 8, + "end_line": 8, + "column": 10, + "end_column": 35 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 8, + "end_line": 8, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "value": { + "_type": "CompiledContract", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "contract": "tests/approvals/precompiled-apps.algo.ts::Hello", + "allocation_overrides": {}, + "prefix": null, + "template_variables": {} + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 10, + "end_line": 17, + "column": 10, + "end_column": 26 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 10, + "end_line": 10, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + }, + "value": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 17, + "end_line": 17, + "column": 16, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "itxn": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 10, + "end_line": 17, + "column": 21, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 10, + "end_line": 16, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 10, + "end_line": 16, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 10, + "end_line": 16, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 12, + "end_line": 12, + "column": 17, + "end_column": 76 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 12, + "end_line": 12, + "column": 18, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "create(string)void" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 12, + "end_line": 12, + "column": 56, + "end_column": 75 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 12, + "end_line": 12, + "column": 56, + "end_column": 75 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 12, + "end_line": 12, + "column": 67, + "end_column": 74 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "hello" + } + } + } + ] + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "1" + } + ] + }, + "ClearStateProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "1" + } + ] + }, + "GlobalNumByteSlice": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + } + } + } + ] + }, + "field": "CreatedApplicationID", + "array_index": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 19, + "end_line": 24, + "column": 10, + "end_column": 15 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 19, + "end_line": 19, + "column": 10, + "end_column": 13 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "value": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 19, + "end_line": 24, + "column": 16, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 19, + "end_line": 23, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 19, + "end_line": 23, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 19, + "end_line": 23, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 21, + "end_line": 21, + "column": 17, + "end_column": 77 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 55 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "greet(string)string" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 21, + "end_line": 21, + "column": 57, + "end_column": 76 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 21, + "end_line": 21, + "column": 57, + "end_column": 76 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 21, + "end_line": 21, + "column": 68, + "end_column": 75 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "world" + } + } + } + ] + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 22, + "end_line": 22, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + } + } + } + ] + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 10, + "end_column": 57 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 10, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "result" + }, + "value": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "items": [ + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 4, + 0 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "0" + } + ] + }, + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 0, + 4 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "0" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 51, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "6(4+c", + "encoding": "unknown" + } + } + ] + }, + "comment": "Bytes has valid prefix" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 27, + "end_line": 27, + "column": 4, + "end_column": 36 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 27, + "end_line": 27, + "column": 4, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 27, + "end_line": 27, + "column": 11, + "end_column": 35 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 27, + "end_line": 27, + "column": 11, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "result" + }, + "operator": "==", + "rhs": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 27, + "end_line": 27, + "column": 22, + "end_column": 35 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "hello world" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 29, + "end_line": 35, + "column": 4, + "end_column": 15 + }, + "expr": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 29, + "end_line": 35, + "column": 4, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 29, + "end_line": 34, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 29, + "end_line": 34, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 29, + "end_line": 34, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 31, + "end_line": 31, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 32, + "end_line": 32, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 32, + "end_line": 32, + "column": 18, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "delete()void" + } + ] + }, + "OnCompletion": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 33, + "end_line": 33, + "column": 39, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "5", + "teal_alias": null + } + } + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "member_name": "test_compile_contract", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 7, + "end_line": 7, + "column": 2, + "end_column": 25 + }, + "name": "test_compile_contract", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 38, + "end_line": 38, + "column": 2, + "end_column": 39 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 38, + "end_line": 67, + "column": 40, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 39, + "end_line": 39, + "column": 10, + "end_column": 82 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 39, + "end_line": 39, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "value": { + "_type": "CompiledContract", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 39, + "end_line": 39, + "column": 21, + "end_column": 82 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "contract": "tests/approvals/precompiled-apps.algo.ts::HelloTemplate", + "allocation_overrides": {}, + "prefix": null, + "template_variables": { + "GREETING": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 39, + "end_line": 39, + "column": 72, + "end_column": 77 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "hey" + } + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 41, + "end_line": 48, + "column": 10, + "end_column": 26 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 41, + "end_line": 41, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + }, + "value": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 48, + "end_line": 48, + "column": 16, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "itxn": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 41, + "end_line": 48, + "column": 21, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 41, + "end_line": 47, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 41, + "end_line": 47, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 41, + "end_line": 47, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 43, + "end_line": 43, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 43, + "end_line": 43, + "column": 18, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "create()void" + } + ] + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "1" + } + ] + }, + "ClearStateProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "1" + } + ] + }, + "GlobalNumByteSlice": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 46, + "end_line": 46, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + } + } + } + ] + }, + "field": "CreatedApplicationID", + "array_index": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 50, + "end_line": 55, + "column": 10, + "end_column": 15 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 50, + "end_line": 50, + "column": 10, + "end_column": 13 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "value": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 50, + "end_line": 55, + "column": 16, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 50, + "end_line": 54, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 50, + "end_line": 54, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 50, + "end_line": 54, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 52, + "end_line": 52, + "column": 17, + "end_column": 77 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 52, + "end_line": 52, + "column": 18, + "end_column": 55 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "greet(string)string" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 52, + "end_line": 52, + "column": 57, + "end_column": 76 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 52, + "end_line": 52, + "column": 57, + "end_column": 76 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 52, + "end_line": 52, + "column": 68, + "end_column": 75 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "world" + } + } + } + ] + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 53, + "end_line": 53, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + } + } + } + ] + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 10, + "end_column": 57 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 10, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "result" + }, + "value": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "items": [ + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 4, + 0 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "1" + } + ] + }, + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 0, + 4 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "1" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 51, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "6(4+c", + "encoding": "unknown" + } + } + ] + }, + "comment": "Bytes has valid prefix" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 58, + "end_line": 58, + "column": 4, + "end_column": 34 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 58, + "end_line": 58, + "column": 4, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 58, + "end_line": 58, + "column": 11, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 58, + "end_line": 58, + "column": 11, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "result" + }, + "operator": "==", + "rhs": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 58, + "end_line": 58, + "column": 22, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "hey world" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 60, + "end_line": 66, + "column": 4, + "end_column": 15 + }, + "expr": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 60, + "end_line": 66, + "column": 4, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 60, + "end_line": 65, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 60, + "end_line": 65, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 60, + "end_line": 65, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 62, + "end_line": 62, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 63, + "end_line": 63, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 63, + "end_line": 63, + "column": 18, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "delete()void" + } + ] + }, + "OnCompletion": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 64, + "end_line": 64, + "column": 39, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "5", + "teal_alias": null + } + } + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "member_name": "test_compile_contract_with_template", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 38, + "end_line": 38, + "column": 2, + "end_column": 39 + }, + "name": "test_compile_contract_with_template", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 69, + "end_line": 69, + "column": 2, + "end_column": 57 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 69, + "end_line": 98, + "column": 58, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 70, + "end_line": 70, + "column": 10, + "end_column": 127 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 70, + "end_line": 70, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "value": { + "_type": "CompiledContract", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 70, + "end_line": 70, + "column": 21, + "end_column": 127 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "contract": "tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix", + "allocation_overrides": {}, + "prefix": "PRFX_", + "template_variables": { + "GREETING": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 70, + "end_line": 70, + "column": 84, + "end_column": 93 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "bonjour" + } + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 72, + "end_line": 79, + "column": 10, + "end_column": 26 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 72, + "end_line": 72, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + }, + "value": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 79, + "end_line": 79, + "column": 16, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "itxn": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 72, + "end_line": 79, + "column": 21, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 72, + "end_line": 78, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 72, + "end_line": 78, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 72, + "end_line": 78, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 74, + "end_line": 74, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 74, + "end_line": 74, + "column": 18, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "create()void" + } + ] + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "1" + } + ] + }, + "ClearStateProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "1" + } + ] + }, + "GlobalNumByteSlice": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 77, + "end_line": 77, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + } + } + } + ] + }, + "field": "CreatedApplicationID", + "array_index": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 81, + "end_line": 86, + "column": 10, + "end_column": 15 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 81, + "end_line": 81, + "column": 10, + "end_column": 13 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "value": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 81, + "end_line": 86, + "column": 16, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 81, + "end_line": 85, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 81, + "end_line": 85, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 81, + "end_line": 85, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 83, + "end_line": 83, + "column": 17, + "end_column": 77 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 83, + "end_line": 83, + "column": 18, + "end_column": 55 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "greet(string)string" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 83, + "end_line": 83, + "column": 57, + "end_column": 76 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 83, + "end_line": 83, + "column": 57, + "end_column": 76 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 83, + "end_line": 83, + "column": 68, + "end_column": 75 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "world" + } + } + } + ] + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 84, + "end_line": 84, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + } + } + } + ] + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 10, + "end_column": 57 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 10, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "result" + }, + "value": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "items": [ + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 4, + 0 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "2" + } + ] + }, + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 0, + 4 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "2" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 51, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "6(4+c", + "encoding": "unknown" + } + } + ] + }, + "comment": "Bytes has valid prefix" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 89, + "end_line": 89, + "column": 4, + "end_column": 38 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 89, + "end_line": 89, + "column": 4, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 89, + "end_line": 89, + "column": 11, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 89, + "end_line": 89, + "column": 11, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "result" + }, + "operator": "==", + "rhs": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 89, + "end_line": 89, + "column": 22, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "bonjour world" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 91, + "end_line": 97, + "column": 4, + "end_column": 15 + }, + "expr": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 91, + "end_line": 97, + "column": 4, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 91, + "end_line": 96, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 91, + "end_line": 96, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 91, + "end_line": 96, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 93, + "end_line": 93, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 94, + "end_line": 94, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 94, + "end_line": 94, + "column": 18, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "delete()void" + } + ] + }, + "OnCompletion": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 95, + "end_line": 95, + "column": 39, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "5", + "teal_alias": null + } + } + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "member_name": "test_compile_contract_with_template_and_custom_prefix", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 69, + "end_line": 69, + "column": 2, + "end_column": 57 + }, + "name": "test_compile_contract_with_template_and_custom_prefix", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 100, + "end_line": 100, + "column": 2, + "end_column": 31 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 100, + "end_line": 129, + "column": 32, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 101, + "end_line": 101, + "column": 10, + "end_column": 42 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 101, + "end_line": 101, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "value": { + "_type": "CompiledContract", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 101, + "end_line": 101, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "contract": "tests/approvals/precompiled-apps.algo.ts::LargeProgram", + "allocation_overrides": {}, + "prefix": null, + "template_variables": {} + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 103, + "end_line": 110, + "column": 10, + "end_column": 26 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 103, + "end_line": 103, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "largeApp" + }, + "value": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 110, + "end_line": 110, + "column": 16, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "itxn": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 103, + "end_line": 110, + "column": 21, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 103, + "end_line": 109, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 103, + "end_line": 109, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 103, + "end_line": 109, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "1" + } + ] + }, + "ClearStateProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "1" + } + ] + }, + "ExtraProgramPages": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 107, + "end_line": 107, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 107, + "end_line": 107, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "extraProgramPages" + }, + "GlobalNumByteSlice": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 108, + "end_line": 108, + "column": 33, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 108, + "end_line": 108, + "column": 24, + "end_column": 32 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "globalBytes" + } + } + } + ] + }, + "field": "CreatedApplicationID", + "array_index": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 112, + "end_line": 117, + "column": 10, + "end_column": 15 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 112, + "end_line": 112, + "column": 10, + "end_column": 13 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "value": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 112, + "end_line": 117, + "column": 16, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 112, + "end_line": 116, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 112, + "end_line": 116, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 112, + "end_line": 116, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 114, + "end_line": 114, + "column": 17, + "end_column": 62 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 114, + "end_line": 114, + "column": 18, + "end_column": 61 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "getBigBytesLength()uint64" + } + ] + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 115, + "end_line": 115, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "largeApp" + } + } + } + ] + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 10, + "end_column": 57 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 10, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "result" + }, + "value": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "items": [ + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 4, + 0 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "3" + } + ] + }, + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 0, + 4 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "3" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 51, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "6(4+c", + "encoding": "unknown" + } + } + ] + }, + "comment": "Bytes has valid prefix" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 120, + "end_line": 120, + "column": 4, + "end_column": 27 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 120, + "end_line": 120, + "column": 4, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 120, + "end_line": 120, + "column": 11, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 120, + "end_line": 120, + "column": 11, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "result" + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 120, + "end_line": 120, + "column": 22, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "4096", + "teal_alias": null + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 122, + "end_line": 128, + "column": 4, + "end_column": 15 + }, + "expr": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 122, + "end_line": 128, + "column": 4, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 122, + "end_line": 127, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 122, + "end_line": 127, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 122, + "end_line": 127, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 124, + "end_line": 124, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "largeApp" + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 125, + "end_line": 125, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 125, + "end_line": 125, + "column": 18, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "delete()void" + } + ] + }, + "OnCompletion": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 126, + "end_line": 126, + "column": 39, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "5", + "teal_alias": null + } + } + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "member_name": "test_compile_contract_large", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 100, + "end_line": 100, + "column": 2, + "end_column": 31 + }, + "name": "test_compile_contract_large", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true + } + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + } +] \ No newline at end of file diff --git a/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst.json b/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst.json index 6e1808dc..6728ba7a 100644 --- a/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst.json +++ b/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst.json @@ -1000,8 +1000,7 @@ }, "name": "y" } - ], - "comment": null + ] } } } diff --git a/tests/approvals/out/property-ordering/Demo.approval.teal b/tests/approvals/out/property-ordering/Demo.approval.teal new file mode 100644 index 00000000..1ac9bce7 --- /dev/null +++ b/tests/approvals/out/property-ordering/Demo.approval.teal @@ -0,0 +1,45 @@ +#pragma version 10 + +tests/approvals/property-ordering.algo.ts::Demo.approvalProgram: + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/property-ordering.algo.ts:20 + // test_assign_from_literal(4) + pushint 4 // 4 + callsub test_assign_from_literal + // tests/approvals/property-ordering.algo.ts:22 + // test_assign_from_var({ a: 3, b: 4 }) + pushint 3 // 3 + pushint 4 // 4 + callsub test_assign_from_var + // tests/approvals/property-ordering.algo.ts:24 + // return true + pushint 1 // 1 + return + + +// tests/approvals/property-ordering.algo.ts::Demo.constructor() -> void: +constructor: + // tests/approvals/property-ordering.algo.ts:18 + // export class Demo extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/property-ordering.algo.ts::test_assign_from_literal(x: uint64) -> void: +test_assign_from_literal: + // tests/approvals/property-ordering.algo.ts:10 + // function test_assign_from_literal(x: uint64) { + proto 1 0 + retsub + + +// tests/approvals/property-ordering.algo.ts::test_assign_from_var(x.a: uint64, x.b: uint64) -> void: +test_assign_from_var: + // tests/approvals/property-ordering.algo.ts:6 + // function test_assign_from_var(x: { a: uint64; b: uint64 }) { + proto 2 0 + retsub diff --git a/tests/approvals/out/property-ordering/Demo.clear.teal b/tests/approvals/out/property-ordering/Demo.clear.teal new file mode 100644 index 00000000..70c45f2c --- /dev/null +++ b/tests/approvals/out/property-ordering/Demo.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/property-ordering.algo.ts::Demo.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/property-ordering/property-ordering.awst b/tests/approvals/out/property-ordering/property-ordering.awst index cbbc3c74..e10b73d1 100644 --- a/tests/approvals/out/property-ordering/property-ordering.awst +++ b/tests/approvals/out/property-ordering/property-ordering.awst @@ -28,9 +28,8 @@ contract Demo void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/property-ordering/property-ordering.awst.json b/tests/approvals/out/property-ordering/property-ordering.awst.json index be37efda..eee2cc02 100644 --- a/tests/approvals/out/property-ordering/property-ordering.awst.json +++ b/tests/approvals/out/property-ordering/property-ordering.awst.json @@ -14,7 +14,7 @@ "name": "x", "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -85,7 +85,7 @@ }, "wtype": { "_type": "WTuple", - "name": "BthenA", + "name": "tests/approvals/property-ordering.algo.ts::BthenA", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -123,7 +123,7 @@ }, "wtype": { "_type": "WTuple", - "name": "BthenA", + "name": "tests/approvals/property-ordering.algo.ts::BthenA", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -176,7 +176,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -232,7 +232,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -343,7 +343,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -381,7 +381,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -434,7 +434,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -470,7 +470,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -637,7 +637,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -673,7 +673,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -937,8 +937,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -1103,7 +1102,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1156,7 +1155,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1192,7 +1191,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1289,7 +1288,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1325,7 +1324,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1617,42 +1616,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1662,7 +1626,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -1674,6 +1638,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.approval.teal b/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.approval.teal new file mode 100644 index 00000000..ac2c5172 --- /dev/null +++ b/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.approval.teal @@ -0,0 +1,87 @@ +#pragma version 10 + +tests/approvals/shadowed-variables.algo.ts::ShadowedVariablesAlgo.approvalProgram: + bytecblock "123" + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/shadowed-variables.algo.ts:8 + // const [b, u, f] = this.getValues() + callsub getValues + cover 2 + cover 2 + swap + cover 2 + // tests/approvals/shadowed-variables.algo.ts:4 + // const a = Bytes('123') + bytec_0 // "123" + // tests/approvals/shadowed-variables.algo.ts:9 + // assert(a === b, 'a should be module const (bytes)') + == + assert // a should be module const (bytes) + // tests/approvals/shadowed-variables.algo.ts:12 + // assert(a === 123, 'a should be local const (uint)') + dup + pushint 123 // 123 + == + assert // a should be local const (uint) + // tests/approvals/shadowed-variables.algo.ts:14 + // let a = f + swap + // tests/approvals/shadowed-variables.algo.ts:15 + // assert(!a, 'a should be local let (bool)') + dup + ! + assert // a should be local let (bool) + // tests/approvals/shadowed-variables.algo.ts:17 + // a = !a + ! + // tests/approvals/shadowed-variables.algo.ts:18 + // assert(a, 'a should be modified local let (bool)') + dup + assert // a should be modified local let (bool) + // tests/approvals/shadowed-variables.algo.ts:20 + // assert(a, 'a should still be modified local let (bool)') + assert // a should still be modified local let (bool) + // tests/approvals/shadowed-variables.algo.ts:22 + // assert(a === 123, 'a should be local const (uint)') + pushint 123 // 123 + == + assert // a should be local const (uint) + // tests/approvals/shadowed-variables.algo.ts:4 + // const a = Bytes('123') + bytec_0 // "123" + // tests/approvals/shadowed-variables.algo.ts:24 + // assert(a === Bytes('123'), 'a should be module const (bytes)') + dup + == + assert // a should be module const (bytes) + // tests/approvals/shadowed-variables.algo.ts:25 + // return true + pushint 1 // 1 + return + + +// tests/approvals/shadowed-variables.algo.ts::ShadowedVariablesAlgo.constructor() -> void: +constructor: + // tests/approvals/shadowed-variables.algo.ts:6 + // class ShadowedVariablesAlgo extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/shadowed-variables.algo.ts::ShadowedVariablesAlgo.getValues() -> bytes, uint64, uint64: +getValues: + // tests/approvals/shadowed-variables.algo.ts:28 + // private getValues(): [bytes, uint64, boolean] { + proto 0 3 + // tests/approvals/shadowed-variables.algo.ts:4 + // const a = Bytes('123') + bytec_0 // "123" + // tests/approvals/shadowed-variables.algo.ts:29 + // return [a, Uint64(123), false] + pushint 123 // 123 + pushint 0 // 0 + retsub diff --git a/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.clear.teal b/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.clear.teal new file mode 100644 index 00000000..5638c66c --- /dev/null +++ b/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/shadowed-variables.algo.ts::ShadowedVariablesAlgo.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/shadowed-variables/shadowed-variables.awst b/tests/approvals/out/shadowed-variables/shadowed-variables.awst index 31daf2f6..3682f781 100644 --- a/tests/approvals/out/shadowed-variables/shadowed-variables.awst +++ b/tests/approvals/out/shadowed-variables/shadowed-variables.awst @@ -6,16 +6,16 @@ contract ShadowedVariablesAlgo this.constructor() } [b, u, f]: readonlytuple[bytes, uint64, bool] = this.getValues() - assert("123" == b) + assert("123" == b, comment=a should be module const (bytes)) a: uint64 = u - assert(a == 123) + assert(a == 123, comment=a should be local const (uint)) a₁: bool = f - assert(!a₁) + assert(!a₁, comment=a should be local let (bool)) a₁: bool = !a₁ - assert(a₁) - assert(a₁) - assert(a == 123) - assert("123" == "123") + assert(a₁, comment=a should be modified local let (bool)) + assert(a₁, comment=a should still be modified local let (bool)) + assert(a == 123, comment=a should be local const (uint)) + assert("123" == "123", comment=a should be module const (bytes)) return True } @@ -34,9 +34,8 @@ contract ShadowedVariablesAlgo void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json b/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json index da17e006..01f94e99 100644 --- a/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json +++ b/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json @@ -107,8 +107,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -334,7 +333,7 @@ "end_column": 55 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 9, @@ -349,66 +348,62 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 4, + "end_line": 4, + "column": 16, + "end_column": 21 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "F)}j", + "encoding": "utf8" + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 9, "end_line": 9, - "column": 11, + "column": 17, "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 4, - "end_line": 4, - "column": 16, - "end_column": 21 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "F)}j", - "encoding": "utf8" + "scalar_type": 1 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 9, - "end_line": 9, - "column": 17, - "end_column": 18 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "b" - } + "name": "b" } - ], - "comment": "a should be module const (bytes)" + }, + "error_message": "a should be module const (bytes)" } }, { @@ -477,7 +472,7 @@ "end_column": 57 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 12, @@ -492,66 +487,62 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 12, + "end_line": 12, + "column": 13, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 12, "end_line": 12, "column": 13, - "end_column": 22 + "end_column": 14 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 12, - "end_line": 12, - "column": 13, - "end_column": 14 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" + "name": "a" + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 12, + "end_line": 12, + "column": 19, + "end_column": 22 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 12, - "end_line": 12, - "column": 19, - "end_column": 22 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "123", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "123", + "teal_alias": null } - ], - "comment": "a should be local const (uint)" + }, + "error_message": "a should be local const (uint)" } }, { @@ -620,7 +611,7 @@ "end_column": 50 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 15, @@ -635,16 +626,29 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 15, + "end_line": 15, + "column": 15, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 15, "end_line": 15, - "column": 15, + "column": 16, "end_column": 17 }, "wtype": { @@ -654,27 +658,10 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 15, - "end_line": 15, - "column": 16, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a₁" - } + "name": "a₁" } - ], - "comment": "a should be local let (bool)" + }, + "error_message": "a should be local let (bool)" } }, { @@ -760,7 +747,7 @@ "end_column": 60 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 18, @@ -775,29 +762,25 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 18, - "end_line": 18, - "column": 17, - "end_column": 18 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a₁" - } - ], - "comment": "a should be modified local let (bool)" + "condition": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 18, + "end_line": 18, + "column": 17, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a₁" + }, + "error_message": "a should be modified local let (bool)" } } ], @@ -814,7 +797,7 @@ "end_column": 64 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 20, @@ -829,29 +812,25 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 20, - "end_line": 20, - "column": 15, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a₁" - } - ], - "comment": "a should still be modified local let (bool)" + "condition": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 20, + "end_line": 20, + "column": 15, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a₁" + }, + "error_message": "a should still be modified local let (bool)" } } ], @@ -868,7 +847,7 @@ "end_column": 57 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 22, @@ -883,66 +862,62 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 22, + "end_line": 22, + "column": 13, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 22, "end_line": 22, "column": 13, - "end_column": 22 + "end_column": 14 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 22, - "end_line": 22, - "column": 13, - "end_column": 14 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" + "name": "a" + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 22, + "end_line": 22, + "column": 19, + "end_column": 22 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 22, - "end_line": 22, - "column": 19, - "end_column": 22 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "123", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "123", + "teal_alias": null } - ], - "comment": "a should be local const (uint)" + }, + "error_message": "a should be local const (uint)" } } ], @@ -959,7 +934,7 @@ "end_column": 66 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 24, @@ -974,67 +949,63 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 24, + "end_line": 24, + "column": 11, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 4, + "end_line": 4, + "column": 16, + "end_column": 21 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "F)}j", + "encoding": "utf8" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 24, "end_line": 24, - "column": 11, - "end_column": 29 + "column": 23, + "end_column": 28 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 4, - "end_line": 4, - "column": 16, - "end_column": 21 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "F)}j", - "encoding": "utf8" + "scalar_type": 1 }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 24, - "end_line": 24, - "column": 23, - "end_column": 28 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "F)}j", - "encoding": "utf8" - } + "value": "F)}j", + "encoding": "utf8" } - ], - "comment": "a should be module const (bytes)" + }, + "error_message": "a should be module const (bytes)" } }, { @@ -1425,42 +1396,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1470,7 +1406,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -1482,6 +1418,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/strings/StringContract.approval.teal b/tests/approvals/out/strings/StringContract.approval.teal new file mode 100644 index 00000000..ceffcacf --- /dev/null +++ b/tests/approvals/out/strings/StringContract.approval.teal @@ -0,0 +1,166 @@ +#pragma version 10 + +tests/approvals/strings.algo.ts::StringContract.approvalProgram: + intcblock 0 1 + bytecblock 0x151f7c75 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/strings.algo.ts::StringContract.constructor() -> void: +constructor: + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + proto 0 0 + retsub + + +// tests/approvals/strings.algo.ts::StringContract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@6 + txna ApplicationArgs 0 + pushbytes 0x5049bd1b // method "join(string,string)string" + pushbytes 0xdc882e2f // method "interpolate(string)string" + uncover 2 + match __puya_arc4_router___join_route@2 __puya_arc4_router___interpolate_route@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___join_route@2: + // tests/approvals/strings.algo.ts:4 + // join(a: string, b: string): string { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + txna ApplicationArgs 1 + extract 2 0 + txna ApplicationArgs 2 + extract 2 0 + // tests/approvals/strings.algo.ts:4 + // join(a: string, b: string): string { + callsub join + dup + len + itob + extract 6 2 + swap + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___interpolate_route@3: + // tests/approvals/strings.algo.ts:8 + // interpolate(a: string): string { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + txna ApplicationArgs 1 + extract 2 0 + // tests/approvals/strings.algo.ts:8 + // interpolate(a: string): string { + callsub interpolate + dup + len + itob + extract 6 2 + swap + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@4: + b __puya_arc4_router___after_if_else@10 + +__puya_arc4_router___bare_routing@6: + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@7 + b __puya_arc4_router___switch_case_default@8 + +__puya_arc4_router_____algots__.defaultCreate@7: + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@8: + +__puya_arc4_router___after_if_else@10: + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/strings.algo.ts::StringContract.join(a: bytes, b: bytes) -> bytes: +join: + // tests/approvals/strings.algo.ts:4 + // join(a: string, b: string): string { + proto 2 1 + // tests/approvals/strings.algo.ts:5 + // return a + b + frame_dig -2 + frame_dig -1 + concat + retsub + + +// tests/approvals/strings.algo.ts::StringContract.interpolate(a: bytes) -> bytes: +interpolate: + // tests/approvals/strings.algo.ts:8 + // interpolate(a: string): string { + proto 1 1 + // tests/approvals/strings.algo.ts:9 + // return `You interpolated ${a}` + pushbytes "You interpolated " + frame_dig -1 + concat + retsub + + +// tests/approvals/strings.algo.ts::StringContract.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/strings/StringContract.arc32.json b/tests/approvals/out/strings/StringContract.arc32.json new file mode 100644 index 00000000..ebf57970 --- /dev/null +++ b/tests/approvals/out/strings/StringContract.arc32.json @@ -0,0 +1,77 @@ +{ + "hints": { + "join(string,string)string": { + "call_config": { + "no_op": "CALL" + } + }, + "interpolate(string)string": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvc3RyaW5ncy5hbGdvLnRzOjpTdHJpbmdDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBieXRlY2Jsb2NrIDB4MTUxZjdjNzUKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9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YWxnby50czo1CiAgICAvLyByZXR1cm4gYSArIGIKICAgIGZyYW1lX2RpZyAtMgogICAgZnJhbWVfZGlnIC0xCiAgICBjb25jYXQKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9zdHJpbmdzLmFsZ28udHM6OlN0cmluZ0NvbnRyYWN0LmludGVycG9sYXRlKGE6IGJ5dGVzKSAtPiBieXRlczoKaW50ZXJwb2xhdGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvc3RyaW5ncy5hbGdvLnRzOjgKICAgIC8vIGludGVycG9sYXRlKGE6IHN0cmluZyk6IHN0cmluZyB7CiAgICBwcm90byAxIDEKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9zdHJpbmdzLmFsZ28udHM6OQogICAgLy8gcmV0dXJuIGBZb3UgaW50ZXJwb2xhdGVkICR7YX1gCiAgICBwdXNoYnl0ZXMgIllvdSBpbnRlcnBvbGF0ZWQgIgogICAgZnJhbWVfZGlnIC0xCiAgICBjb25jYXQKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9zdHJpbmdzLmFsZ28udHM6OlN0cmluZ0NvbnRyYWN0Ll9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9zdHJpbmdzLmFsZ28udHM6MwogICAgLy8gY2xhc3MgU3RyaW5nQ29udHJhY3QgZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvc3RyaW5ncy5hbGdvLnRzOjpTdHJpbmdDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "StringContract", + "methods": [ + { + "name": "join", + "args": [ + { + "type": "string", + "name": "a" + }, + { + "type": "string", + "name": "b" + } + ], + "readonly": false, + "returns": { + "type": "string" + } + }, + { + "name": "interpolate", + "args": [ + { + "type": "string", + "name": "a" + } + ], + "readonly": false, + "returns": { + "type": "string" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/tests/approvals/out/strings/StringContract.arc56.json b/tests/approvals/out/strings/StringContract.arc56.json new file mode 100644 index 00000000..84b9862f --- /dev/null +++ b/tests/approvals/out/strings/StringContract.arc56.json @@ -0,0 +1,122 @@ +{ + "name": "StringContract", + "structs": {}, + "methods": [ + { + "name": "join", + "args": [ + { + "type": "string", + "name": "a" + }, + { + "type": "string", + "name": "b" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "interpolate", + "args": [ + { + "type": "string", + "name": "a" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 68, + 107 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 154 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 73, + 112 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvc3RyaW5ncy5hbGdvLnRzOjpTdHJpbmdDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBieXRlY2Jsb2NrIDB4MTUxZjdjNzUKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL3N0cmluZ3MuYWxnby50czo6U3RyaW5nQ29udHJhY3QuY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9zdHJpbmdzLmFsZ28udHM6MwogICAgLy8gY2xhc3MgU3RyaW5nQ29udHJhY3QgZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9zdHJpbmdzLmFsZ28udHM6OlN0cmluZ0NvbnRyYWN0Ll9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9zdHJpbmdzLmFsZ28udHM6MwogICAgLy8gY2xhc3MgU3RyaW5nQ29udHJhY3QgZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDEKICAgIHR4biBOdW1BcHBBcmdzCiAgICBpbnRjXzAgLy8gMAogICAgIT0KICAgIGJ6IF9fcHV5YV9hcmM0X3JvdXRlcl9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0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9zdHJpbmdzLmFsZ28udHM6MwogICAgLy8gY2xhc3MgU3RyaW5nQ29udHJhY3QgZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvc3RyaW5ncy5hbGdvLnRzOjpTdHJpbmdDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/strings/StringContract.clear.teal b/tests/approvals/out/strings/StringContract.clear.teal new file mode 100644 index 00000000..e1de1543 --- /dev/null +++ b/tests/approvals/out/strings/StringContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/strings.algo.ts::StringContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/strings/StringContract.ssa.ir b/tests/approvals/out/strings/StringContract.ssa.ir new file mode 100644 index 00000000..6ed836d0 --- /dev/null +++ b/tests/approvals/out/strings/StringContract.ssa.ir @@ -0,0 +1,99 @@ +contract tests/approvals/strings.algo.ts::StringContract: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/strings.algo.ts::StringContract.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/strings.algo.ts::StringContract.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/strings.algo.ts::StringContract.constructor() -> void: + block@0: // L3 + return + + subroutine tests/approvals/strings.algo.ts::StringContract.__puya_arc4_router__() -> bool: + block@0: // L3 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@6 + block@1: // abi_routing_L3 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "join(string,string)string" => block@2, method "interpolate(string)string" => block@3, * => block@4} + block@2: // join_route_L4 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + let tmp%7#0: bytes = (txna ApplicationArgs 1) + let tmp%8#0: bytes = ((extract 2 0) tmp%7#0) + let tmp%9#0: bytes = (txna ApplicationArgs 2) + let tmp%10#0: bytes = ((extract 2 0) tmp%9#0) + let to_encode%0#0: bytes = tests/approvals/strings.algo.ts::StringContract.join(tmp%8#0, tmp%10#0) + let length%0#0: uint64 = (len to_encode%0#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 to_encode%0#0) + let tmp%11#0: bytes = (concat 0x151f7c75 encoded_value%0#0) + (log tmp%11#0) + return 1u + block@3: // interpolate_route_L8 + let tmp%12#0: uint64 = (txn OnCompletion) + let tmp%13#0: bool = (== tmp%12#0 NoOp) + (assert tmp%13#0) // OnCompletion is not NoOp + let tmp%14#0: uint64 = (txn ApplicationID) + let tmp%15#0: bool = (!= tmp%14#0 0u) + (assert tmp%15#0) // can only call when not creating + let tmp%16#0: bytes = (txna ApplicationArgs 1) + let tmp%17#0: bytes = ((extract 2 0) tmp%16#0) + let to_encode%1#0: bytes = tests/approvals/strings.algo.ts::StringContract.interpolate(tmp%17#0) + let length%1#0: uint64 = (len to_encode%1#0) + let as_bytes%1#0: bytes = (itob length%1#0) + let length_uint16%1#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_value%1#0: bytes = (concat length_uint16%1#0 to_encode%1#0) + let tmp%18#0: bytes = (concat 0x151f7c75 encoded_value%1#0) + (log tmp%18#0) + return 1u + block@4: // switch_case_default_L3 + goto block@5 + block@5: // switch_case_next_L3 + goto block@10 + block@6: // bare_routing_L3 + let tmp%19#0: uint64 = (txn OnCompletion) + switch tmp%19#0 {0u => block@7, * => block@8} + block@7: // __algots__.defaultCreate_L3 + let tmp%20#0: uint64 = (txn ApplicationID) + let tmp%21#0: bool = (== tmp%20#0 0u) + (assert tmp%21#0) // can only call when creating + tests/approvals/strings.algo.ts::StringContract.__algots__.defaultCreate() + return 1u + block@8: // switch_case_default_L3 + goto block@9 + block@9: // switch_case_next_L3 + goto block@10 + block@10: // after_if_else_L3 + return 0u + + subroutine tests/approvals/strings.algo.ts::StringContract.join(a: bytes, b: bytes) -> bytes: + block@0: // L4 + let tmp%0#0: bytes = (concat a#0 b#0) + return tmp%0#0 + + subroutine tests/approvals/strings.algo.ts::StringContract.interpolate(a: bytes) -> bytes: + block@0: // L8 + let tmp%0#0: bytes = (concat "You interpolated " a#0) + return tmp%0#0 + + subroutine tests/approvals/strings.algo.ts::StringContract.__algots__.defaultCreate() -> void: + block@0: // L3 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/strings/strings.awst b/tests/approvals/out/strings/strings.awst new file mode 100644 index 00000000..2f546bfe --- /dev/null +++ b/tests/approvals/out/strings/strings.awst @@ -0,0 +1,44 @@ +contract StringContract +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + join(): string + { + return concat(a, b) + } + + interpolate(): string + { + return "You interpolated " + a + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + + BaseContract::constructor(): void + { + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/strings/strings.awst.json b/tests/approvals/out/strings/strings.awst.json new file mode 100644 index 00000000..94b193d6 --- /dev/null +++ b/tests/approvals/out/strings/strings.awst.json @@ -0,0 +1,856 @@ +[ + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "id": "tests/approvals/strings.algo.ts::StringContract", + "name": "StringContract", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 36 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 4, + "end_line": 4, + "column": 7, + "end_column": 16 + } + }, + { + "_type": "SubroutineArgument", + "name": "b", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 4, + "end_line": 4, + "column": 18, + "end_column": 27 + } + } + ], + "return_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 4, + "end_line": 6, + "column": 37, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 5, + "end_line": 5, + "column": 4, + "end_column": 16 + }, + "value": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 5, + "end_line": 5, + "column": 11, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 5, + "end_line": 5, + "column": 11, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "a" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 5, + "end_line": 5, + "column": 15, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "b" + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/strings.algo.ts::StringContract", + "member_name": "join", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 36 + }, + "name": "join", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 8, + "end_line": 8, + "column": 2, + "end_column": 32 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 8, + "end_line": 8, + "column": 14, + "end_column": 23 + } + } + ], + "return_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 8, + "end_line": 10, + "column": 33, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 9, + "end_line": 9, + "column": 4, + "end_column": 34 + }, + "value": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "You interpolated " + }, + "op": "+", + "right": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 9, + "end_line": 9, + "column": 31, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "a" + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/strings.algo.ts::StringContract", + "member_name": "interpolate", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 8, + "end_line": 8, + "column": 2, + "end_column": 32 + }, + "name": "interpolate", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/strings.algo.ts::StringContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/strings.algo.ts::StringContract", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true + } + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + } +] \ No newline at end of file diff --git a/tests/approvals/out/uint64-expressions/DemoContract.approval.teal b/tests/approvals/out/uint64-expressions/DemoContract.approval.teal new file mode 100644 index 00000000..71d1f11f --- /dev/null +++ b/tests/approvals/out/uint64-expressions/DemoContract.approval.teal @@ -0,0 +1,20 @@ +#pragma version 10 + +tests/approvals/uint64-expressions.algo.ts::DemoContract.approvalProgram: + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/uint64-expressions.algo.ts:10 + // return test().length + pushint 5 // 5 + return + + +// tests/approvals/uint64-expressions.algo.ts::DemoContract.constructor() -> void: +constructor: + // tests/approvals/uint64-expressions.algo.ts:8 + // class DemoContract extends BaseContract { + proto 0 0 + retsub diff --git a/tests/approvals/out/uint64-expressions/DemoContract.clear.teal b/tests/approvals/out/uint64-expressions/DemoContract.clear.teal new file mode 100644 index 00000000..aab32d34 --- /dev/null +++ b/tests/approvals/out/uint64-expressions/DemoContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/uint64-expressions.algo.ts::DemoContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/uint64-expressions/DemoContract.ssa.ir b/tests/approvals/out/uint64-expressions/DemoContract.ssa.ir new file mode 100644 index 00000000..e10338e8 --- /dev/null +++ b/tests/approvals/out/uint64-expressions/DemoContract.ssa.ir @@ -0,0 +1,20 @@ +contract tests/approvals/uint64-expressions.algo.ts::DemoContract: + program approval: + subroutine tests/approvals/uint64-expressions.algo.ts::DemoContract.approvalProgram() -> uint64: + block@0: // L9 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/uint64-expressions.algo.ts::DemoContract.constructor() + goto block@2 + block@2: // after_if_else_L1 + return 5u + + subroutine tests/approvals/uint64-expressions.algo.ts::DemoContract.constructor() -> void: + block@0: // L8 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/uint64-expressions/uint64-expressions.awst b/tests/approvals/out/uint64-expressions/uint64-expressions.awst new file mode 100644 index 00000000..b4a2eac7 --- /dev/null +++ b/tests/approvals/out/uint64-expressions/uint64-expressions.awst @@ -0,0 +1,29 @@ +subroutine test(): readonlytuple[uint64, uint64, uint64, uint64, uint64] +{ + return [0, 0, 1, 1, 1] +} +contract DemoContract +{ + approvalProgram(): uint64 + { + if (!Boolean(txn())) { + this.constructor() + } + return 5 + } + + clearProgram(): bool + { + return True + } + + constructor(): void + { + void + } + + BaseContract::constructor(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json b/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json new file mode 100644 index 00000000..025edeca --- /dev/null +++ b/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json @@ -0,0 +1,655 @@ +[ + { + "_type": "Subroutine", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 4, + "end_line": 4, + "column": 0, + "end_column": 15 + }, + "args": [], + "return_type": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 4, + "end_line": 6, + "column": 16, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 2, + "end_column": 78 + }, + "value": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 9, + "end_column": 69 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "items": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 27, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 31, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 51, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 56, + "end_column": 68 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/uint64-expressions.algo.ts::test", + "name": "test" + }, + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 0, + "end_column": 41 + }, + "id": "tests/approvals/uint64-expressions.algo.ts::DemoContract", + "name": "DemoContract", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 9, + "end_line": 9, + "column": 2, + "end_column": 34 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 9, + "end_line": 11, + "column": 35, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 10, + "end_line": 10, + "column": 4, + "end_column": 24 + }, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 10, + "end_line": 10, + "column": 18, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "5", + "teal_alias": null + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/uint64-expressions.algo.ts::DemoContract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 0, + "end_column": 41 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 0, + "end_column": 41 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 0, + "end_column": 41 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 0, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/uint64-expressions.algo.ts::DemoContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + } +] \ No newline at end of file diff --git a/tests/approvals/precompiled-apps.algo.ts b/tests/approvals/precompiled-apps.algo.ts new file mode 100644 index 00000000..bdec103e --- /dev/null +++ b/tests/approvals/precompiled-apps.algo.ts @@ -0,0 +1,65 @@ +import { abimethod, Contract, GlobalState, LogicSig, op, TemplateVar } from '@algorandfoundation/algorand-typescript' + +abstract class HelloBase extends Contract { + greeting = GlobalState({ initialValue: '' }) + + @abimethod({ allowActions: 'DeleteApplication' }) + delete() {} + + @abimethod({ allowActions: 'UpdateApplication' }) + update() {} + + greet(name: string): string { + return `${this.greeting.value} ${name}` + } +} + +export class Hello extends HelloBase { + @abimethod({ onCreate: 'require' }) + create(greeting: string) { + this.greeting.value = greeting + } +} + +export class HelloTemplate extends HelloBase { + constructor() { + super() + this.greeting.value = TemplateVar('GREETING') + } + + @abimethod({ onCreate: 'require' }) + create() {} +} + +export class HelloTemplateCustomPrefix extends HelloBase { + constructor() { + super() + this.greeting.value = TemplateVar('GREETING', 'PRFX_') + } + + @abimethod({ onCreate: 'require' }) + create() {} +} + +function getBigBytes() { + return op.bzero(4096) +} + +export class LargeProgram extends Contract { + getBigBytesLength() { + return getBigBytes().length + } + + @abimethod({ allowActions: 'DeleteApplication' }) + delete() {} +} + +/** + * This logic sig can be used to create a custodial account that will allow any transaction to transfer its + * funds/assets. + */ +export class TerribleCustodialAccount extends LogicSig { + program() { + return true + } +} diff --git a/tests/approvals/precompiled-factory.algo.ts b/tests/approvals/precompiled-factory.algo.ts new file mode 100644 index 00000000..b43a9359 --- /dev/null +++ b/tests/approvals/precompiled-factory.algo.ts @@ -0,0 +1,130 @@ +import type { uint64 } from '@algorandfoundation/algorand-typescript' +import { assert, compile, Contract, itxn } from '@algorandfoundation/algorand-typescript' +import { decodeArc4, encodeArc4, methodSelector, OnCompleteAction } from '@algorandfoundation/algorand-typescript/arc4' +import { Hello, HelloTemplate, HelloTemplateCustomPrefix, LargeProgram } from './precompiled-apps.algo' + +class HelloFactory extends Contract { + test_compile_contract() { + const compiled = compile(Hello) + + const helloApp = itxn + .applicationCall({ + appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + approvalProgram: compiled.approvalProgram, + clearStateProgram: compiled.clearStateProgram, + globalNumBytes: 1, + }) + .submit().createdApp + + const txn = itxn + .applicationCall({ + appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + appId: helloApp, + }) + .submit() + const result = decodeArc4(txn.lastLog, 'log') + + assert(result === 'hello world') + + itxn + .applicationCall({ + appId: helloApp, + appArgs: [methodSelector('delete()void')], + onCompletion: OnCompleteAction.DeleteApplication, + }) + .submit() + } + + test_compile_contract_with_template() { + const compiled = compile(HelloTemplate, { templateVars: { GREETING: 'hey' } }) + + const helloApp = itxn + .applicationCall({ + appArgs: [methodSelector('create()void')], + approvalProgram: compiled.approvalProgram, + clearStateProgram: compiled.clearStateProgram, + globalNumBytes: 1, + }) + .submit().createdApp + + const txn = itxn + .applicationCall({ + appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + appId: helloApp, + }) + .submit() + const result = decodeArc4(txn.lastLog, 'log') + + assert(result === 'hey world') + + itxn + .applicationCall({ + appId: helloApp, + appArgs: [methodSelector('delete()void')], + onCompletion: OnCompleteAction.DeleteApplication, + }) + .submit() + } + + test_compile_contract_with_template_and_custom_prefix() { + const compiled = compile(HelloTemplateCustomPrefix, { templateVars: { GREETING: 'bonjour' }, templateVarsPrefix: 'PRFX_' }) + + const helloApp = itxn + .applicationCall({ + appArgs: [methodSelector('create()void')], + approvalProgram: compiled.approvalProgram, + clearStateProgram: compiled.clearStateProgram, + globalNumBytes: 1, + }) + .submit().createdApp + + const txn = itxn + .applicationCall({ + appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + appId: helloApp, + }) + .submit() + const result = decodeArc4(txn.lastLog, 'log') + + assert(result === 'bonjour world') + + itxn + .applicationCall({ + appId: helloApp, + appArgs: [methodSelector('delete()void')], + onCompletion: OnCompleteAction.DeleteApplication, + }) + .submit() + } + + test_compile_contract_large() { + const compiled = compile(LargeProgram) + + const largeApp = itxn + .applicationCall({ + approvalProgram: compiled.approvalProgram, + clearStateProgram: compiled.clearStateProgram, + extraProgramPages: compiled.extraProgramPages, + globalNumBytes: compiled.globalBytes, + }) + .submit().createdApp + + const txn = itxn + .applicationCall({ + appArgs: [methodSelector('getBigBytesLength()uint64')], + appId: largeApp, + }) + .submit() + const result = decodeArc4(txn.lastLog, 'log') + + assert(result === 4096) + + itxn + .applicationCall({ + appId: largeApp, + appArgs: [methodSelector('delete()void')], + onCompletion: OnCompleteAction.DeleteApplication, + }) + .submit() + } +} diff --git a/tests/approvals/strings.algo.ts b/tests/approvals/strings.algo.ts new file mode 100644 index 00000000..eb7d0066 --- /dev/null +++ b/tests/approvals/strings.algo.ts @@ -0,0 +1,11 @@ +import { Contract } from '@algorandfoundation/algorand-typescript' + +class StringContract extends Contract { + join(a: string, b: string): string { + return a + b + } + + interpolate(a: string): string { + return `You interpolated ${a}` + } +} diff --git a/tests/approvals/uint64-expressions.algo.ts b/tests/approvals/uint64-expressions.algo.ts new file mode 100644 index 00000000..d5c3eefc --- /dev/null +++ b/tests/approvals/uint64-expressions.algo.ts @@ -0,0 +1,12 @@ +import type { uint64 } from '@algorandfoundation/algorand-typescript' +import { BaseContract, Uint64 } from '@algorandfoundation/algorand-typescript' + +function test() { + return [Uint64(), Uint64(0), Uint64('1'), Uint64(1n), Uint64(true)] as const +} + +class DemoContract extends BaseContract { + public approvalProgram(): uint64 { + return test().length + } +} diff --git a/tests/expected-output/_run.spec.ts b/tests/expected-output.spec.ts similarity index 92% rename from tests/expected-output/_run.spec.ts rename to tests/expected-output.spec.ts index 1e24d3fe..313a0577 100644 --- a/tests/expected-output/_run.spec.ts +++ b/tests/expected-output.spec.ts @@ -1,12 +1,12 @@ import ts from 'typescript' import { describe, it } from 'vitest' -import { compile } from '../../src' -import { SourceLocation } from '../../src/awst/source-location' -import { buildCompileOptions } from '../../src/compile-options' -import type { LogEvent } from '../../src/logger' -import { LoggingContext, LogLevel } from '../../src/logger' -import { defaultPuyaOptions } from '../../src/puya/options' -import { enumFromValue, invariant } from '../../src/util' +import { compile } from '../src' +import { SourceLocation } from '../src/awst/source-location' +import { buildCompileOptions } from '../src/compile-options' +import type { LogEvent } from '../src/logger' +import { LoggingContext, LogLevel } from '../src/logger' +import { defaultPuyaOptions } from '../src/puya/options' +import { enumFromValue, invariant } from '../src/util' /** * Verify that specific code produces specific compiler output. @@ -158,7 +158,6 @@ function extractExpectLogs(sourceFile: ts.SourceFile, programDirectory: string) }) } } - return node } return ts.visitEachChild(node, visit, undefined) diff --git a/tests/expected-output/abi-decorators.algo.ts b/tests/expected-output/abi-decorators.algo.ts index 8c7bbc79..6491d38a 100644 --- a/tests/expected-output/abi-decorators.algo.ts +++ b/tests/expected-output/abi-decorators.algo.ts @@ -2,7 +2,7 @@ import type { bytes } from '@algorandfoundation/algorand-typescript' import { abimethod, Contract, GlobalState, Uint64 } from '@algorandfoundation/algorand-typescript' export default class AbiDecorators extends Contract { - // @expect-warn Duplicate on completion actions + // @expect-warning Duplicate on completion actions @abimethod({ allowActions: ['NoOp', 'NoOp'] }) public justNoop(): void {} // @expect-error Private or protected methods cannot be exposed as an abi method diff --git a/tests/expected-output/arc28-events.algo.ts b/tests/expected-output/arc28-events.algo.ts new file mode 100644 index 00000000..dd5f7c2c --- /dev/null +++ b/tests/expected-output/arc28-events.algo.ts @@ -0,0 +1,19 @@ +import type { uint64 } from '@algorandfoundation/algorand-typescript' +import { Asset, Contract, emit } from '@algorandfoundation/algorand-typescript' + +type Named = { a: uint64; b: Asset } + +class EventEmitter extends Contract { + emitSwapped(a: uint64, b: uint64) { + // @expect-error Event cannot be an anonymous type... + emit({ a: b, b: a }) + + // @expect-error Asset cannot be encoded to an ARC4 type + emit({ a: b, b: Asset(a) }) + } + + emitCustom(arg0: string, arg1: boolean) { + // @expect-error Expression of type `number` must be explicitly converted to an algo-ts type... + emit('Custom2', 1) + } +} diff --git a/tests/expected-output/arc4-types.algo.ts b/tests/expected-output/arc4-types.algo.ts new file mode 100644 index 00000000..b060a331 --- /dev/null +++ b/tests/expected-output/arc4-types.algo.ts @@ -0,0 +1,122 @@ +import type { biguint, bytes, uint64 } from '@algorandfoundation/algorand-typescript' +import { arc4, assert, BaseContract, Bytes, Txn } from '@algorandfoundation/algorand-typescript' +import { + Address, + Byte, + DynamicArray, + DynamicBytes, + StaticArray, + StaticBytes, + Str, + Tuple, + UFixedNxM, + UintN, +} from '@algorandfoundation/algorand-typescript/arc4' + +function testUFixed() { + const a = new UFixedNxM<32, 4>('1.244') + const c = new UFixedNxM<32, 4>('1.244') + + assert(a === c) +} + +function test(n: uint64, b: biguint, c: UintN<256>) { + const x = new UintN<8>(4) + assert(x.bytes.length === 1) + const x2 = new UintN<8>(255n) + assert(x2.bytes === Bytes.fromHex('ff')) + + const y = new UintN<16>() + assert(y.bytes.length === 2) + const z = new UintN<8>(n) + const z_native = z.native + assert(z_native === n) + const a = new UintN<128>(b) + const a_native = a.native + assert(a_native === b) + + assert(c.bytes.length === 256 / 8) +} + +function testStr() { + const s1 = new Str() + assert(s1.bytes === new UintN<16>(0).bytes, 'Empty string should equal the uint16 length prefix') + const s2 = new Str('Hello') + assert(s2.native === 'Hello') +} + +function testDynamicBytes(someBytes: bytes) { + const db1 = new DynamicBytes() + const db2 = new DynamicBytes(someBytes) + const db3 = new DynamicBytes('hello') +} + +function testStaticBytes() { + // @expect-error StaticBytes length must be greater than or equal to 0 + const s1 = new StaticBytes<-1>() + // @expect-error Value should have byte length of 4 + const s2 = new StaticBytes<4>('') +} + +type ARC4Uint64 = UintN<64> +const ARC4Uint64 = UintN<64> + +function testArrays(n: ARC4Uint64) { + const myArray = new DynamicArray(n, n, n) + + myArray.push(n) + + const myStatic = new StaticArray(n, n) + + assert(myStatic[0] === myArray.pop()) + + myStatic[1] = new UintN<64>(50) + + // const myStatic2 = new StaticArray(n, n, n) +} + +function testByte() { + const b = new Byte() + const b2 = new Byte(0) + assert(b === b2) +} + +function testAddress() { + const a = new Address() + const b = new Address(Txn.sender) + + assert(a !== b, 'Zero address should not match sender') + assert(a === new Address(), 'Two zero addresses should match') + assert(a[0] === new Byte(), 'Zero address should start with zero byte') +} + +function testTuple() { + const t = new Tuple(new ARC4Uint64(34)) + const firstItem = t.at(0) + const firstItemIndexer = t.native[0] + assert(firstItem === firstItemIndexer) + const t1 = new Tuple(new Address(), new Byte()) + assert(t1.length === 2) +} + +export class Arc4TypesTestContract extends BaseContract { + public getArc4Values(): [Byte, UintN<8>, Address] { + return [new Byte(), new UintN(255), new Address()] + } + + public approvalProgram(): boolean { + const x = new ARC4Uint64() + testStr() + test(1, 2n, new UintN<256>(4)) + testByte() + testArrays(new UintN<64>(65)) + testAddress() + testTuple() + testUFixed() + testDynamicBytes(Bytes('hmmmmmmmmm')) + testStaticBytes() + const result = new arc4.DynamicArray>() + assert(result.length === 0) + return true + } +} diff --git a/tests/expected-output/biguint-expressions.algo.ts b/tests/expected-output/biguint-expressions.algo.ts index e4063077..f8368732 100644 --- a/tests/expected-output/biguint-expressions.algo.ts +++ b/tests/expected-output/biguint-expressions.algo.ts @@ -1,11 +1,11 @@ import { BigUint } from '@algorandfoundation/algorand-typescript' function testErrors(b: string) { - // @expect-error Arg 0 of BigUInt has an incorrect type of -1... + // @expect-error biguint overflow or underflow... BigUint(-1) - // @expect-error Arg 0 of BigUInt has an incorrect type of -1... + // @expect-error biguint overflow or underflow... BigUint(-1n) - // @expect-error Arg 0 of BigUInt has an incorrect type of 13407807929... + // @expect-error biguint overflow or underflow... BigUint(2n ** 512n) // @expect-error Only compile time constant string values are supported BigUint(b) diff --git a/tests/expected-output/null-values.algo.ts b/tests/expected-output/null-values.algo.ts index c1f6c2be..97a8981e 100644 --- a/tests/expected-output/null-values.algo.ts +++ b/tests/expected-output/null-values.algo.ts @@ -1,6 +1,7 @@ // @expect-error Not Supported: Null values const a: null = null +// @expect-error Not Supported: The type null is not supported export function test(): null { // @expect-error Not Supported: Null values return null diff --git a/tests/expected-output/uint64-expressions.algo.ts b/tests/expected-output/uint64-expressions.algo.ts new file mode 100644 index 00000000..e30f2046 --- /dev/null +++ b/tests/expected-output/uint64-expressions.algo.ts @@ -0,0 +1,25 @@ +import { Uint64 } from '@algorandfoundation/algorand-typescript' + +/* eslint-disable no-loss-of-precision */ + +function test() { + // @expect-error uint64 overflow or underflow... + Uint64(-1) + // @expect-error uint64 overflow or underflow... + Uint64(-1n) + // @expect-error Cannot convert abc to an integer + Uint64('abc') + // @expect-error Cannot convert 0.1 to an integer + Uint64('0.1') + // @expect-error uint64 overflow or underflow... + Uint64('-1') + // @expect-error uint64 overflow or underflow... + Uint64(18446744073709551617n) + // @expect-error This number will lose precision... + Uint64(1844674407370955161) + // @expect-error uint64 overflow or underflow... + Uint64('18446744073709551616') + const varStr = '123' + // @expect-error Expected constant of type string + Uint64(varStr) +} diff --git a/tests/onchain/accounts.spec.ts b/tests/onchain/accounts.spec.ts index d57e54dc..acff41dd 100644 --- a/tests/onchain/accounts.spec.ts +++ b/tests/onchain/accounts.spec.ts @@ -1,3 +1,4 @@ +import { microAlgo } from '@algorandfoundation/algokit-utils' import { describe } from 'vitest' import { createArc4TestFixture } from './util/test-fixture' @@ -7,7 +8,11 @@ describe('accounts', () => { test('returns account data', async ({ appClientAccountsContract: appClient, expect, assetFactory, testAccount }) => { const asset = await assetFactory({ assetName: 'Asset 1', sender: testAccount.addr, total: 1n }) - const result = await appClient.send.call({ method: 'getAccountInfo', args: [testAccount.addr, asset] }) + const result = await appClient.send.call({ + method: 'getAccountInfo', + args: [testAccount.addr.publicKey, asset], + extraFee: microAlgo(2000), + }) const returnValue = result.return as { bytes: number[] @@ -28,5 +33,6 @@ describe('accounts', () => { } expect(returnValue.authAddress).toStrictEqual(new Array(32).fill(0)) + expect(returnValue.totalAppsCreated).toBeGreaterThan(0n) }) }) diff --git a/tests/onchain/arc4-types.spec.ts b/tests/onchain/arc4-types.spec.ts index 7f6827c2..2eca3f24 100644 --- a/tests/onchain/arc4-types.spec.ts +++ b/tests/onchain/arc4-types.spec.ts @@ -1,4 +1,5 @@ import { describe } from 'vitest' +import { bigIntToUint8Array, utf8ToUint8Array } from '../../src/util' import { createArc4TestFixture, createBaseTestFixture } from './util/test-fixture' describe('arc4-types', () => { @@ -21,4 +22,34 @@ describe('arc4-struct', () => { const result = await appClientStructDemo.send.call({ method: 'addVectors', args: [v1, v2] }) expect(result.return).toStrictEqual({ x: 150n, y: 150n }) }) + test('implicit casting and spreading', async ({ appClientStructDemo, expect }) => { + const v1 = { x: 123, y: 456 } + await appClientStructDemo.send.call({ method: 'implicitCastingAndSpreading', args: [v1] }) + }) +}) +describe('arc4-encode-decode', () => { + const test = createArc4TestFixture('tests/approvals/arc4-encode-decode.algo.ts', { Arc4EncodeDecode: {} }) + test('encoding', async ({ appClientArc4EncodeDecode, expect }) => { + await appClientArc4EncodeDecode.send.call({ + method: 'testEncoding', + args: [234234, true, 340943934n, new Uint8Array([1, 2, 3, 4, 5]), 'hello world'], + }) + }) + test('decoding', async ({ appClientArc4EncodeDecode, expect }) => { + await appClientArc4EncodeDecode.send.call({ + method: 'testDecoding', + args: [ + 234234, + bigIntToUint8Array(234234n, 8), + true, + bigIntToUint8Array(128n, 1), + 340943934n, + bigIntToUint8Array(340943934n, 8), + 'hello world', + new Uint8Array([...bigIntToUint8Array(BigInt('hello world'.length), 2), ...utf8ToUint8Array('hello world')]), + { a: 50n, b: new Uint8Array([1, 2, 3, 4, 5]) }, + new Uint8Array([...bigIntToUint8Array(50n, 8), 0, 10, 0, 5, 1, 2, 3, 4, 5]), + ], + }) + }) }) diff --git a/tests/onchain/precompiled.spec.ts b/tests/onchain/precompiled.spec.ts new file mode 100644 index 00000000..3c647899 --- /dev/null +++ b/tests/onchain/precompiled.spec.ts @@ -0,0 +1,20 @@ +import { algo } from '@algorandfoundation/algokit-utils' +import { describe } from 'vitest' +import { createArc4TestFixture } from './util/test-fixture' + +describe('precompiled', () => { + const test = createArc4TestFixture('tests/approvals/precompiled-factory.algo.ts', { HelloFactory: {} }) + + test('Hello contract can be deployed', async ({ appClientHelloFactory }) => { + await appClientHelloFactory.send.call({ method: 'test_compile_contract', extraFee: algo(1) }) + }) + test('HelloTemplate contract can be deployed', async ({ appClientHelloFactory }) => { + await appClientHelloFactory.send.call({ method: 'test_compile_contract_with_template', extraFee: algo(1) }) + }) + test('HelloTemplateCustomPrefix contract can be deployed', async ({ appClientHelloFactory }) => { + await appClientHelloFactory.send.call({ method: 'test_compile_contract_with_template_and_custom_prefix', extraFee: algo(1) }) + }) + test('LargeProgram contract can be deployed', async ({ appClientHelloFactory }) => { + await appClientHelloFactory.send.call({ method: 'test_compile_contract_large', extraFee: algo(1) }) + }) +}) diff --git a/tests/onchain/primitives.spec.ts b/tests/onchain/primitives.spec.ts new file mode 100644 index 00000000..fdc71329 --- /dev/null +++ b/tests/onchain/primitives.spec.ts @@ -0,0 +1,36 @@ +import { describe } from 'vitest' +import { createArc4TestFixture, createBaseTestFixture } from './util/test-fixture' + +describe('primitives', () => { + describe('uint64', () => { + const test = createBaseTestFixture('tests/approvals/uint64-expressions.algo.ts', ['DemoContract']) + test('can be created', async ({ DemoContractInvoker }) => { + await DemoContractInvoker.send() + }) + }) + describe('biguint', () => { + const test = createBaseTestFixture('tests/approvals/biguint-expressions.algo.ts', ['DemoContract']) + test('can be created', async ({ DemoContractInvoker }) => { + await DemoContractInvoker.send() + }) + }) + describe('bytes', () => { + const test = createBaseTestFixture('tests/approvals/byte-expressions.algo.ts', ['DemoContract']) + test('can be created', async ({ DemoContractInvoker }) => { + await DemoContractInvoker.send() + }) + }) + + describe('strings', () => { + const test = createArc4TestFixture('tests/approvals/strings.algo.ts', { StringContract: {} }) + + test('can be joined', async ({ appClientStringContract, expect }) => { + const result = await appClientStringContract.send.call({ method: 'join', args: ['hello', 'world'] }) + expect(result.return).toBe('helloworld') + }) + test('can be interpolated', async ({ appClientStringContract, expect }) => { + const result = await appClientStringContract.send.call({ method: 'interpolate', args: ['hello'] }) + expect(result.return).toBe('You interpolated hello') + }) + }) +}) diff --git a/tests/onchain/util/test-fixture.ts b/tests/onchain/util/test-fixture.ts index b71946c7..a9a46a2c 100644 --- a/tests/onchain/util/test-fixture.ts +++ b/tests/onchain/util/test-fixture.ts @@ -1,5 +1,7 @@ +import type { AlgorandClient } from '@algorandfoundation/algokit-utils' import { Config, microAlgos } from '@algorandfoundation/algokit-utils' import { algorandFixture } from '@algorandfoundation/algokit-utils/testing' +import type { AlgoAmount } from '@algorandfoundation/algokit-utils/types/amount' import type { SendAppTransactionResult } from '@algorandfoundation/algokit-utils/types/app' import type { AppClient } from '@algorandfoundation/algokit-utils/types/app-client' import type { AppFactory, AppFactoryDeployParams } from '@algorandfoundation/algokit-utils/types/app-factory' @@ -23,6 +25,7 @@ import { generateTempDir } from '../../../src/util/generate-temp-file' const algorandTestFixture = (localnetFixture: AlgorandFixture) => test.extend<{ localnet: AlgorandFixture + algorand: AlgorandClient testAccount: AlgorandFixture['context']['testAccount'] assetFactory: (assetCreateParams: AssetCreateParams) => Promise }>({ @@ -33,6 +36,9 @@ const algorandTestFixture = (localnetFixture: AlgorandFixture) => testAccount: async ({ localnet }, use) => { await use(localnet.context.testAccount) }, + algorand: async ({ localnet }, use) => { + await use(localnet.context.algorand) + }, assetFactory: async ({ localnet }, use) => { use(async (assetCreateParams: AssetCreateParams) => { const { assetId } = await localnet.algorand.send.assetCreate(assetCreateParams) @@ -41,11 +47,11 @@ const algorandTestFixture = (localnetFixture: AlgorandFixture) => }, }) -function createLazyCompiler(path: string) { +function createLazyCompiler(path: string, options: { outputBytecode: boolean; outputArc32: boolean }) { let result: CompilationArtifacts | undefined = undefined return { getCompileResult(expect: ExpectStatic) { - if (!result) result = compilePath(path, expect) + if (!result) result = compilePath(path, expect, options) return result }, } @@ -61,6 +67,7 @@ type ProgramInvokeOptions = { | OnApplicationComplete.DeleteApplicationOC senderAddr?: string args?: Uint8Array[] + extraFee?: AlgoAmount } type ProgramInvoker = { @@ -71,7 +78,7 @@ type BaseFixtureContextFor = { [key in T as `${key}Invoker`]: ProgramInvoker } export function createBaseTestFixture(path: string, contracts: TContracts[]) { - const lazyCompile = createLazyCompiler(path) + const lazyCompile = createLazyCompiler(path, { outputArc32: false, outputBytecode: true }) const localnet = algorandFixture({ testAccountFunding: microAlgos(100_000_000_000), }) @@ -102,6 +109,7 @@ export function createBaseTestFixture(path: stri clearStateProgram, sender: options?.senderAddr ?? localnet.context.testAccount.addr, args: options?.args ?? [], + extraFee: options?.extraFee, } return localnet.algorand.send.appCall(common as DeliberateAny) }, @@ -122,7 +130,7 @@ type ContractConfig = { } export function createArc4TestFixture(path: string, contracts: Record) { - const lazyCompile = createLazyCompiler(path) + const lazyCompile = createLazyCompiler(path, { outputArc32: true, outputBytecode: false }) const localnet = algorandFixture({ testAccountFunding: microAlgos(100_000_000_000), }) @@ -173,7 +181,7 @@ type CompilationArtifacts = { clearStateBinaries: Record } -function compilePath(path: string, expect: ExpectStatic): CompilationArtifacts { +function compilePath(path: string, expect: ExpectStatic, options: { outputBytecode: boolean; outputArc32: boolean }): CompilationArtifacts { using tempDir = generateTempDir() using logCtx = LoggingContext.create() @@ -189,8 +197,8 @@ function compilePath(path: string, expect: ExpectStatic): CompilationArtifacts { { ...defaultPuyaOptions, outputTeal: false, - outputArc32: true, - outputBytecode: true, + ...options, + optimizationLevel: 0, }, ) for (const log of logCtx.logEvents) { diff --git a/tsconfig.json b/tsconfig.json index 07d17774..b710e536 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,11 @@ "module": "ESNext", "moduleResolution": "Bundler", "resolveJsonModule": true, - "esModuleInterop": true + "esModuleInterop": true, + "paths": { + "@algorandfoundation/algorand-typescript": ["./packages/algo-ts/src"], + "@algorandfoundation/algorand-typescript/*": ["./packages/algo-ts/src/*"] + } }, "include": [ "src/**/*.ts", @@ -18,5 +22,6 @@ "vitest.config.mts", "eslint.config.mjs" ], - "exclude": ["packages/**/*.ts"] + "exclude": ["packages/**/*.ts"], + } diff --git a/vitest.config.mts b/vitest.config.mts index 615b636a..1685488e 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -17,5 +17,6 @@ export default defineConfig({ test: { globals: true, testTimeout: 20_000, + exclude: ['packages/**', 'node_modules/**'], }, })