diff --git a/package-lock.json b/package-lock.json index edf24cc..4f6ce4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,8 @@ "version": "1.0.0", "hasInstallScript": true, "dependencies": { - "@algorandfoundation/algorand-typescript": "^1.0.0-beta.7", - "@algorandfoundation/puya-ts": "^1.0.0-beta.11", + "@algorandfoundation/algorand-typescript": "^1.0.0-beta.9", + "@algorandfoundation/puya-ts": "^1.0.0-beta.13", "elliptic": "^6.5.7", "js-sha256": "^0.11.0", "js-sha3": "^0.9.3", @@ -44,6 +44,7 @@ "eslint-plugin-prettier": "^5.2.1", "npm-run-all": "4.1.5", "patch-package": "^8.0.0", + "polytype": "^0.17.0", "prettier": "3.3.3", "rimraf": "6.0.1", "rollup": "^4.24.0", @@ -73,17 +74,17 @@ } }, "node_modules/@algorandfoundation/algorand-typescript": { - "version": "1.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@algorandfoundation/algorand-typescript/-/algorand-typescript-1.0.0-beta.7.tgz", - "integrity": "sha512-2wjokQJpda/pJ+zLUob5EZAL5aRV7av0hS7XsvrCsYmrl8O0a/MrQgP+/3nBXnkZK9EwoVCKoNRRDJbwu0b7/g==", + "version": "1.0.0-beta.9", + "resolved": "https://registry.npmjs.org/@algorandfoundation/algorand-typescript/-/algorand-typescript-1.0.0-beta.9.tgz", + "integrity": "sha512-OWjfB5l1ZtfAZ5NJeSEF82Nv51BlA9+OkUjbzJhJp00+/QskDobY97pewlWqTqlSYKNjkKxbTwWS2ng3/xuQEQ==", "peerDependencies": { "tslib": "^2.6.2" } }, "node_modules/@algorandfoundation/puya-ts": { - "version": "1.0.0-beta.11", - "resolved": "https://registry.npmjs.org/@algorandfoundation/puya-ts/-/puya-ts-1.0.0-beta.11.tgz", - "integrity": "sha512-05IaHOkGEO9pwckL2ZNZKIkhT9l0E1lu9lZFp2QmTTaLcfMN5zOayYG2gXEKwg+XiSROS7J4WgM78yTwUzC16w==", + "version": "1.0.0-beta.13", + "resolved": "https://registry.npmjs.org/@algorandfoundation/puya-ts/-/puya-ts-1.0.0-beta.13.tgz", + "integrity": "sha512-L1EwbDpELcf99mwQ0JzMsYk/NqmBmNbtuJcUY+eN3ZjZsBRKxTX2msqyQe5AkpB3pMvPc6mjwtCZhKDmkeAecw==", "bundleDependencies": [ "typescript" ], diff --git a/package.json b/package.json index 6bb5f9b..da95cae 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "eslint-plugin-prettier": "^5.2.1", "npm-run-all": "4.1.5", "patch-package": "^8.0.0", + "polytype": "^0.17.0", "prettier": "3.3.3", "rimraf": "6.0.1", "rollup": "^4.24.0", @@ -63,8 +64,8 @@ "tslib": "^2.6.2" }, "dependencies": { - "@algorandfoundation/algorand-typescript": "^1.0.0-beta.7", - "@algorandfoundation/puya-ts": "^1.0.0-beta.11", + "@algorandfoundation/algorand-typescript": "^1.0.0-beta.9", + "@algorandfoundation/puya-ts": "^1.0.0-beta.13", "elliptic": "^6.5.7", "js-sha256": "^0.11.0", "js-sha3": "^0.9.3", diff --git a/src/impl/crypto.ts b/src/impl/crypto.ts index bfc0523..981f8b4 100644 --- a/src/impl/crypto.ts +++ b/src/impl/crypto.ts @@ -1,4 +1,4 @@ -import { arc4, bytes, Bytes, Ecdsa, gtxn, internal, VrfVerify } from '@algorandfoundation/algorand-typescript' +import { arc4, bytes, Bytes, Ecdsa, gtxn, internal, MimcConfigurations, VrfVerify } from '@algorandfoundation/algorand-typescript' import elliptic from 'elliptic' import js_sha256 from 'js-sha256' import js_sha3 from 'js-sha3' @@ -143,6 +143,10 @@ export const EllipticCurve = new Proxy({} as internal.opTypes.EllipticCurveType, }, }) +export const mimc = (_c: MimcConfigurations, _a: internal.primitives.StubBytesCompat): bytes => { + notImplementedError('mimc') +} + const curveMap = { [Ecdsa.Secp256k1]: 'secp256k1', [Ecdsa.Secp256r1]: 'p256', diff --git a/tests/arc4/struct.spec.ts b/tests/arc4/struct.spec.ts index 64cdc04..0127de5 100644 --- a/tests/arc4/struct.spec.ts +++ b/tests/arc4/struct.spec.ts @@ -2,7 +2,7 @@ import { getABIEncodedValue } from '@algorandfoundation/algokit-utils/types/app- import { Bytes, internal } from '@algorandfoundation/algorand-typescript' import { Bool, DynamicArray, interpretAsArc4, StaticArray, Str, Struct, Tuple, UintN } from '@algorandfoundation/algorand-typescript/arc4' import { encodingUtil } from '@algorandfoundation/puya-ts' -import { describe, expect, it, test } from 'vitest' +import { describe, expect, test } from 'vitest' import { AccountCls } from '../../src/impl/account' import { DeliberateAny } from '../../src/typescript-helpers' import { asBytes } from '../../src/util' @@ -251,49 +251,6 @@ describe('arc4.Struct', async () => { compareARC4AndABIValue(result.d, nativeValues[i++]) compareARC4AndABIValue(result.a, nativeValues[i++]) }) - - it('set item in struct', async () => { - const data = testData[5] - const nativeValues = data.nativeValues() as DeliberateAny - nativeValues[0] = 43 - nativeValues[2] = 'world' - nativeValues[3][0][1][0][1] = 'hello, world' - nativeValues[3][0][1][0].push('test') - nativeValues[3][1][1][0] = 24 - const sdkResult = getABIEncodedValue(nativeValues, data.abiTypeString, {}) - - const abiValues = data.struct() as Swapped6 - abiValues.b = new UintN<64>(43) - abiValues.d = new Str('world') - abiValues.a.at(0).at(1).at(0)[1] = new Str('hello, world') - abiValues.a.at(0).at(1).at(0).push(new Str('test')) - abiValues.a.at(1).at(1)[0] = new UintN<64>(24) - const result = abiValues.bytes - - expect(result).toEqual(Bytes(sdkResult)) - }) - - it('set item in struct created from bytes', async () => { - const data = testData[5] - const nativeValues = data.nativeValues() as DeliberateAny - nativeValues[0] = 43 - nativeValues[2] = 'world' - nativeValues[3][0][1][0][1] = 'hello, world' - nativeValues[3][0][1][0].push('test') - nativeValues[3][1][1][0] = 24 - const sdkResult = getABIEncodedValue(nativeValues, data.abiTypeString, {}) - - const bytes = Bytes(getABIEncodedValue(data.nativeValues(), data.abiTypeString, {})) - const abiValues = data.create(bytes) as Swapped6 - abiValues.b = new UintN<64>(43) - abiValues.d = new Str('world') - abiValues.a.at(0).at(1).at(0)[1] = new Str('hello, world') - abiValues.a.at(0).at(1).at(0).push(new Str('test')) - abiValues.a.at(1).at(1)[0] = new UintN<64>(24) - const result = abiValues.bytes - - expect(result).toEqual(Bytes(sdkResult)) - }) }) const compareARC4AndABIValue = (arc4Value: DeliberateAny, nativeValue: DeliberateAny) => { diff --git a/tests/artifacts/crypto-ops/contract.algo.ts b/tests/artifacts/crypto-ops/contract.algo.ts index 01455a9..34cf6cc 100644 --- a/tests/artifacts/crypto-ops/contract.algo.ts +++ b/tests/artifacts/crypto-ops/contract.algo.ts @@ -1,4 +1,14 @@ -import { arc4, bytes, Ecdsa, ensureBudget, op, OpUpFeeSource, uint64, VrfVerify } from '@algorandfoundation/algorand-typescript' +import { + arc4, + bytes, + Ecdsa, + ensureBudget, + MimcConfigurations, + op, + OpUpFeeSource, + uint64, + VrfVerify, +} from '@algorandfoundation/algorand-typescript' import { Bool } from '@algorandfoundation/algorand-typescript/arc4' export class CryptoOpsContract extends arc4.Contract { @@ -91,4 +101,11 @@ export class CryptoOpsContract extends arc4.Contract { const result = op.vrfVerify(VrfVerify.VrfAlgorand, a, b, c) return result } + + @arc4.abimethod() + public verify_mimc(a: bytes): bytes { + ensureBudget(5700, OpUpFeeSource.GroupCredit) + const result = op.mimc(MimcConfigurations.BN254Mp110, a) + return result + } } diff --git a/tests/artifacts/crypto-ops/data/CryptoOpsContract.approval.teal b/tests/artifacts/crypto-ops/data/CryptoOpsContract.approval.teal index 44fbc8e..f07e8e8 100644 --- a/tests/artifacts/crypto-ops/data/CryptoOpsContract.approval.teal +++ b/tests/artifacts/crypto-ops/data/CryptoOpsContract.approval.teal @@ -1,42 +1,39 @@ -#pragma version 10 +#pragma version 11 +#pragma typetrack false -tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.approvalProgram: +// @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> uint64: +main: intcblock 0 1 4 3000 bytecblock 0x151f7c75 0x00 0x0004 0x068101 - callsub __puya_arc4_router__ - return - - -// tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.__puya_arc4_router__() -> uint64: -__puya_arc4_router__: - // tests/artifacts/crypto-ops/contract.algo.ts:3 + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { - proto 0 1 txn NumAppArgs - bz __puya_arc4_router___bare_routing@17 - pushbytess 0x3456c4c3 0xe8442b84 0x65f567aa 0x258455b1 0x35af0f38 0x6582c997 0x6298ffbb 0x3885b54f 0x2164e0bf 0x755b79a5 0xf06bb077 0x133f8ccc 0x2f7c68a9 // method "verify_sha256(byte[],uint64)byte[]", method "verify_sha3_256(byte[],uint64)byte[]", method "verify_keccak_256(byte[],uint64)byte[]", method "verify_sha512_256(byte[],uint64)byte[]", method "verify_ed25519verify(byte[],byte[],byte[])bool", method "verify_ed25519verify_bare(byte[],byte[],byte[])bool", method "verify_ecdsa_verify_k1(byte[],byte[],byte[],byte[],byte[])bool", method "verify_ecdsa_verify_r1(byte[],byte[],byte[],byte[],byte[])bool", method "verify_ecdsa_recover_k1(byte[],uint64,byte[],byte[])(byte[],byte[])", method "verify_ecdsa_recover_r1(byte[],uint64,byte[],byte[])(byte[],byte[])", method "verify_ecdsa_decompress_k1(byte[])(byte[],byte[])", method "verify_ecdsa_decompress_r1(byte[])(byte[],byte[])", method "verify_vrf_verify(byte[],byte[],byte[])(byte[],bool)" + bz main_bare_routing@19 + pushbytess 0x3456c4c3 0xe8442b84 0x65f567aa 0x258455b1 0x35af0f38 0x6582c997 0x6298ffbb 0x3885b54f 0x2164e0bf 0x755b79a5 0xf06bb077 0x133f8ccc 0x2f7c68a9 0xc43f0220 // method "verify_sha256(byte[],uint64)byte[]", method "verify_sha3_256(byte[],uint64)byte[]", method "verify_keccak_256(byte[],uint64)byte[]", method "verify_sha512_256(byte[],uint64)byte[]", method "verify_ed25519verify(byte[],byte[],byte[])bool", method "verify_ed25519verify_bare(byte[],byte[],byte[])bool", method "verify_ecdsa_verify_k1(byte[],byte[],byte[],byte[],byte[])bool", method "verify_ecdsa_verify_r1(byte[],byte[],byte[],byte[],byte[])bool", method "verify_ecdsa_recover_k1(byte[],uint64,byte[],byte[])(byte[],byte[])", method "verify_ecdsa_recover_r1(byte[],uint64,byte[],byte[])(byte[],byte[])", method "verify_ecdsa_decompress_k1(byte[])(byte[],byte[])", method "verify_ecdsa_decompress_r1(byte[])(byte[],byte[])", method "verify_vrf_verify(byte[],byte[],byte[])(byte[],bool)", method "verify_mimc(byte[])byte[]" txna ApplicationArgs 0 - match __puya_arc4_router___verify_sha256_route@2 __puya_arc4_router___verify_sha3_256_route@3 __puya_arc4_router___verify_keccak_256_route@4 __puya_arc4_router___verify_sha512_256_route@5 __puya_arc4_router___verify_ed25519verify_route@6 __puya_arc4_router___verify_ed25519verify_bare_route@7 __puya_arc4_router___verify_ecdsa_verify_k1_route@8 __puya_arc4_router___verify_ecdsa_verify_r1_route@9 __puya_arc4_router___verify_ecdsa_recover_k1_route@10 __puya_arc4_router___verify_ecdsa_recover_r1_route@11 __puya_arc4_router___verify_ecdsa_decompress_k1_route@12 __puya_arc4_router___verify_ecdsa_decompress_r1_route@13 __puya_arc4_router___verify_vrf_verify_route@14 - intc_0 // 0 - retsub + match main_verify_sha256_route@3 main_verify_sha3_256_route@4 main_verify_keccak_256_route@5 main_verify_sha512_256_route@6 main_verify_ed25519verify_route@7 main_verify_ed25519verify_bare_route@8 main_verify_ecdsa_verify_k1_route@9 main_verify_ecdsa_verify_r1_route@10 main_verify_ecdsa_recover_k1_route@11 main_verify_ecdsa_recover_r1_route@12 main_verify_ecdsa_decompress_k1_route@13 main_verify_ecdsa_decompress_r1_route@14 main_verify_vrf_verify_route@15 main_verify_mimc_route@16 -__puya_arc4_router___verify_sha256_route@2: +main_after_if_else@23: // tests/artifacts/crypto-ops/contract.algo.ts:4 + // export class CryptoOpsContract extends arc4.Contract { + intc_0 // 0 + return + +main_verify_mimc_route@16: + // tests/artifacts/crypto-ops/contract.algo.ts:95 // @arc4.abimethod() txn OnCompletion ! - assert // OnCompletion is NoOp + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - // tests/artifacts/crypto-ops/contract.algo.ts:3 + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txna ApplicationArgs 1 extract 2 0 - txna ApplicationArgs 2 - btoi - // tests/artifacts/crypto-ops/contract.algo.ts:4 + // tests/artifacts/crypto-ops/contract.algo.ts:95 // @arc4.abimethod() - callsub verify_sha256 + callsub verify_mimc dup len itob @@ -48,29 +45,40 @@ __puya_arc4_router___verify_sha256_route@2: concat log intc_1 // 1 - retsub + return -__puya_arc4_router___verify_sha3_256_route@3: - // tests/artifacts/crypto-ops/contract.algo.ts:11 +main_verify_vrf_verify_route@15: + // tests/artifacts/crypto-ops/contract.algo.ts:88 // @arc4.abimethod() txn OnCompletion ! - assert // OnCompletion is NoOp + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - // tests/artifacts/crypto-ops/contract.algo.ts:3 + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txna ApplicationArgs 1 extract 2 0 txna ApplicationArgs 2 - btoi - // tests/artifacts/crypto-ops/contract.algo.ts:11 + extract 2 0 + txna ApplicationArgs 3 + extract 2 0 + // tests/artifacts/crypto-ops/contract.algo.ts:88 // @arc4.abimethod() - callsub verify_sha3_256 - dup + callsub verify_vrf_verify + dig 1 len itob extract 6 2 + uncover 2 + concat + bytec_1 // 0x00 + intc_0 // 0 + uncover 3 + setbit + pushbytes 0x0003 + swap + concat swap concat bytec_0 // 0x151f7c75 @@ -78,29 +86,46 @@ __puya_arc4_router___verify_sha3_256_route@3: concat log intc_1 // 1 - retsub + return -__puya_arc4_router___verify_keccak_256_route@4: - // tests/artifacts/crypto-ops/contract.algo.ts:18 +main_verify_ecdsa_decompress_r1_route@14: + // tests/artifacts/crypto-ops/contract.algo.ts:82 // @arc4.abimethod() txn OnCompletion ! - assert // OnCompletion is NoOp + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - // tests/artifacts/crypto-ops/contract.algo.ts:3 + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txna ApplicationArgs 1 extract 2 0 - txna ApplicationArgs 2 - btoi - // tests/artifacts/crypto-ops/contract.algo.ts:18 + // tests/artifacts/crypto-ops/contract.algo.ts:82 // @arc4.abimethod() - callsub verify_keccak_256 - dup + callsub verify_ecdsa_decompress_r1 + dig 1 len itob extract 6 2 + uncover 2 + concat + dig 1 + len + itob + extract 6 2 + uncover 2 + concat + dig 1 + len + intc_2 // 4 + + + itob + extract 6 2 + bytec_2 // 0x0004 + swap + concat + uncover 2 + concat swap concat bytec_0 // 0x151f7c75 @@ -108,29 +133,46 @@ __puya_arc4_router___verify_keccak_256_route@4: concat log intc_1 // 1 - retsub + return -__puya_arc4_router___verify_sha512_256_route@5: - // tests/artifacts/crypto-ops/contract.algo.ts:25 +main_verify_ecdsa_decompress_k1_route@13: + // tests/artifacts/crypto-ops/contract.algo.ts:76 // @arc4.abimethod() txn OnCompletion ! - assert // OnCompletion is NoOp + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - // tests/artifacts/crypto-ops/contract.algo.ts:3 + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txna ApplicationArgs 1 extract 2 0 - txna ApplicationArgs 2 - btoi - // tests/artifacts/crypto-ops/contract.algo.ts:25 + // tests/artifacts/crypto-ops/contract.algo.ts:76 // @arc4.abimethod() - callsub verify_sha512_256 - dup + callsub verify_ecdsa_decompress_k1 + dig 1 + len + itob + extract 6 2 + uncover 2 + concat + dig 1 + len + itob + extract 6 2 + uncover 2 + concat + dig 1 len + intc_2 // 4 + + itob extract 6 2 + bytec_2 // 0x0004 + swap + concat + uncover 2 + concat swap concat bytec_0 // 0x151f7c75 @@ -138,77 +180,123 @@ __puya_arc4_router___verify_sha512_256_route@5: concat log intc_1 // 1 - retsub + return -__puya_arc4_router___verify_ed25519verify_route@6: - // tests/artifacts/crypto-ops/contract.algo.ts:33 +main_verify_ecdsa_recover_r1_route@12: + // tests/artifacts/crypto-ops/contract.algo.ts:67 // @arc4.abimethod() txn OnCompletion ! - assert // OnCompletion is NoOp + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - // tests/artifacts/crypto-ops/contract.algo.ts:3 + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txna ApplicationArgs 1 extract 2 0 txna ApplicationArgs 2 - extract 2 0 + btoi txna ApplicationArgs 3 extract 2 0 - // tests/artifacts/crypto-ops/contract.algo.ts:33 + txna ApplicationArgs 4 + extract 2 0 + // tests/artifacts/crypto-ops/contract.algo.ts:67 // @arc4.abimethod() - callsub verify_ed25519verify - bytec_1 // 0x00 - intc_0 // 0 + callsub verify_ecdsa_recover_r1 + dig 1 + len + itob + extract 6 2 uncover 2 - setbit + concat + dig 1 + len + itob + extract 6 2 + uncover 2 + concat + dig 1 + len + intc_2 // 4 + + + itob + extract 6 2 + bytec_2 // 0x0004 + swap + concat + uncover 2 + concat + swap + concat bytec_0 // 0x151f7c75 swap concat log intc_1 // 1 - retsub + return -__puya_arc4_router___verify_ed25519verify_bare_route@7: - // tests/artifacts/crypto-ops/contract.algo.ts:41 +main_verify_ecdsa_recover_k1_route@11: + // tests/artifacts/crypto-ops/contract.algo.ts:61 // @arc4.abimethod() txn OnCompletion ! - assert // OnCompletion is NoOp + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - // tests/artifacts/crypto-ops/contract.algo.ts:3 + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txna ApplicationArgs 1 extract 2 0 txna ApplicationArgs 2 - extract 2 0 + btoi txna ApplicationArgs 3 extract 2 0 - // tests/artifacts/crypto-ops/contract.algo.ts:41 + txna ApplicationArgs 4 + extract 2 0 + // tests/artifacts/crypto-ops/contract.algo.ts:61 // @arc4.abimethod() - callsub verify_ed25519verify_bare - bytec_1 // 0x00 - intc_0 // 0 + callsub verify_ecdsa_recover_k1 + dig 1 + len + itob + extract 6 2 uncover 2 - setbit + concat + dig 1 + len + itob + extract 6 2 + uncover 2 + concat + dig 1 + len + intc_2 // 4 + + + itob + extract 6 2 + bytec_2 // 0x0004 + swap + concat + uncover 2 + concat + swap + concat bytec_0 // 0x151f7c75 swap concat log intc_1 // 1 - retsub + return -__puya_arc4_router___verify_ecdsa_verify_k1_route@8: - // tests/artifacts/crypto-ops/contract.algo.ts:48 +main_verify_ecdsa_verify_r1_route@10: + // tests/artifacts/crypto-ops/contract.algo.ts:54 // @arc4.abimethod() txn OnCompletion ! - assert // OnCompletion is NoOp + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - // tests/artifacts/crypto-ops/contract.algo.ts:3 + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txna ApplicationArgs 1 extract 2 0 @@ -220,9 +308,9 @@ __puya_arc4_router___verify_ecdsa_verify_k1_route@8: extract 2 0 txna ApplicationArgs 5 extract 2 0 - // tests/artifacts/crypto-ops/contract.algo.ts:48 + // tests/artifacts/crypto-ops/contract.algo.ts:54 // @arc4.abimethod() - callsub verify_ecdsa_verify_k1 + callsub verify_ecdsa_verify_r1 bytec_1 // 0x00 intc_0 // 0 uncover 2 @@ -232,17 +320,17 @@ __puya_arc4_router___verify_ecdsa_verify_k1_route@8: concat log intc_1 // 1 - retsub + return -__puya_arc4_router___verify_ecdsa_verify_r1_route@9: - // tests/artifacts/crypto-ops/contract.algo.ts:55 +main_verify_ecdsa_verify_k1_route@9: + // tests/artifacts/crypto-ops/contract.algo.ts:47 // @arc4.abimethod() txn OnCompletion ! - assert // OnCompletion is NoOp + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - // tests/artifacts/crypto-ops/contract.algo.ts:3 + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txna ApplicationArgs 1 extract 2 0 @@ -254,9 +342,9 @@ __puya_arc4_router___verify_ecdsa_verify_r1_route@9: extract 2 0 txna ApplicationArgs 5 extract 2 0 - // tests/artifacts/crypto-ops/contract.algo.ts:55 + // tests/artifacts/crypto-ops/contract.algo.ts:47 // @arc4.abimethod() - callsub verify_ecdsa_verify_r1 + callsub verify_ecdsa_verify_k1 bytec_1 // 0x00 intc_0 // 0 uncover 2 @@ -266,105 +354,81 @@ __puya_arc4_router___verify_ecdsa_verify_r1_route@9: concat log intc_1 // 1 - retsub + return -__puya_arc4_router___verify_ecdsa_recover_k1_route@10: - // tests/artifacts/crypto-ops/contract.algo.ts:62 +main_verify_ed25519verify_bare_route@8: + // tests/artifacts/crypto-ops/contract.algo.ts:40 // @arc4.abimethod() txn OnCompletion ! - assert // OnCompletion is NoOp + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - // tests/artifacts/crypto-ops/contract.algo.ts:3 + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txna ApplicationArgs 1 extract 2 0 txna ApplicationArgs 2 - btoi - txna ApplicationArgs 3 extract 2 0 - txna ApplicationArgs 4 + txna ApplicationArgs 3 extract 2 0 - // tests/artifacts/crypto-ops/contract.algo.ts:62 + // tests/artifacts/crypto-ops/contract.algo.ts:40 // @arc4.abimethod() - callsub verify_ecdsa_recover_k1 - dig 1 - len - itob - extract 6 2 - uncover 2 - concat - dig 1 - len - itob - extract 6 2 - uncover 2 - concat - dig 1 - len - intc_2 // 4 - + - itob - extract 6 2 - bytec_2 // 0x0004 - swap - concat - uncover 2 - concat - swap - concat + callsub verify_ed25519verify_bare bytec_0 // 0x151f7c75 swap concat log intc_1 // 1 - retsub + return -__puya_arc4_router___verify_ecdsa_recover_r1_route@11: - // tests/artifacts/crypto-ops/contract.algo.ts:68 +main_verify_ed25519verify_route@7: + // tests/artifacts/crypto-ops/contract.algo.ts:33 // @arc4.abimethod() txn OnCompletion ! - assert // OnCompletion is NoOp + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - // tests/artifacts/crypto-ops/contract.algo.ts:3 + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txna ApplicationArgs 1 extract 2 0 txna ApplicationArgs 2 - btoi - txna ApplicationArgs 3 extract 2 0 - txna ApplicationArgs 4 + txna ApplicationArgs 3 extract 2 0 - // tests/artifacts/crypto-ops/contract.algo.ts:68 + // tests/artifacts/crypto-ops/contract.algo.ts:33 // @arc4.abimethod() - callsub verify_ecdsa_recover_r1 - dig 1 - len - itob - extract 6 2 - uncover 2 - concat - dig 1 - len - itob - extract 6 2 - uncover 2 + callsub verify_ed25519verify + bytec_0 // 0x151f7c75 + swap concat - dig 1 + log + intc_1 // 1 + return + +main_verify_sha512_256_route@6: + // tests/artifacts/crypto-ops/contract.algo.ts:26 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is not NoOp + txn ApplicationID + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 + // export class CryptoOpsContract extends arc4.Contract { + txna ApplicationArgs 1 + extract 2 0 + txna ApplicationArgs 2 + btoi + // tests/artifacts/crypto-ops/contract.algo.ts:26 + // @arc4.abimethod() + callsub verify_sha512_256 + dup len - intc_2 // 4 - + itob extract 6 2 - bytec_2 // 0x0004 - swap - concat - uncover 2 - concat swap concat bytec_0 // 0x151f7c75 @@ -372,46 +436,29 @@ __puya_arc4_router___verify_ecdsa_recover_r1_route@11: concat log intc_1 // 1 - retsub + return -__puya_arc4_router___verify_ecdsa_decompress_k1_route@12: - // tests/artifacts/crypto-ops/contract.algo.ts:77 +main_verify_keccak_256_route@5: + // tests/artifacts/crypto-ops/contract.algo.ts:19 // @arc4.abimethod() txn OnCompletion ! - assert // OnCompletion is NoOp + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - // tests/artifacts/crypto-ops/contract.algo.ts:3 + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txna ApplicationArgs 1 extract 2 0 - // tests/artifacts/crypto-ops/contract.algo.ts:77 + txna ApplicationArgs 2 + btoi + // tests/artifacts/crypto-ops/contract.algo.ts:19 // @arc4.abimethod() - callsub verify_ecdsa_decompress_k1 - dig 1 - len - itob - extract 6 2 - uncover 2 - concat - dig 1 - len - itob - extract 6 2 - uncover 2 - concat - dig 1 + callsub verify_keccak_256 + dup len - intc_2 // 4 - + itob extract 6 2 - bytec_2 // 0x0004 - swap - concat - uncover 2 - concat swap concat bytec_0 // 0x151f7c75 @@ -419,46 +466,29 @@ __puya_arc4_router___verify_ecdsa_decompress_k1_route@12: concat log intc_1 // 1 - retsub + return -__puya_arc4_router___verify_ecdsa_decompress_r1_route@13: - // tests/artifacts/crypto-ops/contract.algo.ts:83 +main_verify_sha3_256_route@4: + // tests/artifacts/crypto-ops/contract.algo.ts:12 // @arc4.abimethod() txn OnCompletion ! - assert // OnCompletion is NoOp + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - // tests/artifacts/crypto-ops/contract.algo.ts:3 + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txna ApplicationArgs 1 extract 2 0 - // tests/artifacts/crypto-ops/contract.algo.ts:83 + txna ApplicationArgs 2 + btoi + // tests/artifacts/crypto-ops/contract.algo.ts:12 // @arc4.abimethod() - callsub verify_ecdsa_decompress_r1 - dig 1 - len - itob - extract 6 2 - uncover 2 - concat - dig 1 - len - itob - extract 6 2 - uncover 2 - concat - dig 1 + callsub verify_sha3_256 + dup len - intc_2 // 4 - + itob extract 6 2 - bytec_2 // 0x0004 - swap - concat - uncover 2 - concat swap concat bytec_0 // 0x151f7c75 @@ -466,40 +496,29 @@ __puya_arc4_router___verify_ecdsa_decompress_r1_route@13: concat log intc_1 // 1 - retsub + return -__puya_arc4_router___verify_vrf_verify_route@14: - // tests/artifacts/crypto-ops/contract.algo.ts:89 +main_verify_sha256_route@3: + // tests/artifacts/crypto-ops/contract.algo.ts:5 // @arc4.abimethod() txn OnCompletion ! - assert // OnCompletion is NoOp + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - // tests/artifacts/crypto-ops/contract.algo.ts:3 + assert // can only call when not creating + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txna ApplicationArgs 1 extract 2 0 txna ApplicationArgs 2 - extract 2 0 - txna ApplicationArgs 3 - extract 2 0 - // tests/artifacts/crypto-ops/contract.algo.ts:89 + btoi + // tests/artifacts/crypto-ops/contract.algo.ts:5 // @arc4.abimethod() - callsub verify_vrf_verify - dig 1 + callsub verify_sha256 + dup len itob extract 6 2 - uncover 2 - concat - bytec_1 // 0x00 - intc_0 // 0 - uncover 3 - setbit - pushbytes 0x0003 - swap - concat swap concat bytec_0 // 0x151f7c75 @@ -507,111 +526,105 @@ __puya_arc4_router___verify_vrf_verify_route@14: concat log intc_1 // 1 - retsub + return -__puya_arc4_router___bare_routing@17: - // tests/artifacts/crypto-ops/contract.algo.ts:3 +main_bare_routing@19: + // tests/artifacts/crypto-ops/contract.algo.ts:4 // export class CryptoOpsContract extends arc4.Contract { txn OnCompletion - bnz __puya_arc4_router___after_if_else@21 + bnz main_after_if_else@23 txn ApplicationID ! - assert // is creating + assert // can only call when creating intc_1 // 1 - retsub - -__puya_arc4_router___after_if_else@21: - // tests/artifacts/crypto-ops/contract.algo.ts:3 - // export class CryptoOpsContract extends arc4.Contract { - intc_0 // 0 - retsub + return // tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_sha256(a: bytes, pad_size: uint64) -> bytes: verify_sha256: - // tests/artifacts/crypto-ops/contract.algo.ts:4-5 + // tests/artifacts/crypto-ops/contract.algo.ts:5-6 // @arc4.abimethod() // public verify_sha256(a: bytes, pad_size: uint64): bytes { proto 2 1 - // tests/artifacts/crypto-ops/contract.algo.ts:6 + // tests/artifacts/crypto-ops/contract.algo.ts:7 // const paddedA = op.bzero(pad_size).concat(a) frame_dig -1 bzero frame_dig -2 concat - // tests/artifacts/crypto-ops/contract.algo.ts:7 + // tests/artifacts/crypto-ops/contract.algo.ts:8 // const result = op.sha256(paddedA) sha256 - // tests/artifacts/crypto-ops/contract.algo.ts:8 + // tests/artifacts/crypto-ops/contract.algo.ts:9 // return result retsub // tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_sha3_256(a: bytes, pad_size: uint64) -> bytes: verify_sha3_256: - // tests/artifacts/crypto-ops/contract.algo.ts:11-12 + // tests/artifacts/crypto-ops/contract.algo.ts:12-13 // @arc4.abimethod() // public verify_sha3_256(a: bytes, pad_size: uint64): bytes { proto 2 1 - // tests/artifacts/crypto-ops/contract.algo.ts:13 + // tests/artifacts/crypto-ops/contract.algo.ts:14 // const paddedA = op.bzero(pad_size).concat(a) frame_dig -1 bzero frame_dig -2 concat - // tests/artifacts/crypto-ops/contract.algo.ts:14 + // tests/artifacts/crypto-ops/contract.algo.ts:15 // const result = op.sha3_256(paddedA) sha3_256 - // tests/artifacts/crypto-ops/contract.algo.ts:15 + // tests/artifacts/crypto-ops/contract.algo.ts:16 // return result retsub // tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_keccak_256(a: bytes, pad_size: uint64) -> bytes: verify_keccak_256: - // tests/artifacts/crypto-ops/contract.algo.ts:18-19 + // tests/artifacts/crypto-ops/contract.algo.ts:19-20 // @arc4.abimethod() // public verify_keccak_256(a: bytes, pad_size: uint64): bytes { proto 2 1 - // tests/artifacts/crypto-ops/contract.algo.ts:20 + // tests/artifacts/crypto-ops/contract.algo.ts:21 // const paddedA = op.bzero(pad_size).concat(a) frame_dig -1 bzero frame_dig -2 concat - // tests/artifacts/crypto-ops/contract.algo.ts:21 + // tests/artifacts/crypto-ops/contract.algo.ts:22 // const result = op.keccak256(paddedA) keccak256 - // tests/artifacts/crypto-ops/contract.algo.ts:22 + // tests/artifacts/crypto-ops/contract.algo.ts:23 // return result retsub // tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_sha512_256(a: bytes, pad_size: uint64) -> bytes: verify_sha512_256: - // tests/artifacts/crypto-ops/contract.algo.ts:25-26 + // tests/artifacts/crypto-ops/contract.algo.ts:26-27 // @arc4.abimethod() // public verify_sha512_256(a: bytes, pad_size: uint64): bytes { proto 2 1 - // tests/artifacts/crypto-ops/contract.algo.ts:27 + // tests/artifacts/crypto-ops/contract.algo.ts:28 // const paddedA = op.bzero(pad_size).concat(a) frame_dig -1 bzero frame_dig -2 concat - // tests/artifacts/crypto-ops/contract.algo.ts:28 + // tests/artifacts/crypto-ops/contract.algo.ts:29 // const result = op.sha512_256(paddedA) sha512_256 - // tests/artifacts/crypto-ops/contract.algo.ts:29 + // tests/artifacts/crypto-ops/contract.algo.ts:30 // return result retsub -// tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_ed25519verify(a: bytes, b: bytes, c: bytes) -> uint64: +// tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_ed25519verify(a: bytes, b: bytes, c: bytes) -> bytes: verify_ed25519verify: // tests/artifacts/crypto-ops/contract.algo.ts:33-34 // @arc4.abimethod() - // public verify_ed25519verify(a: bytes, b: bytes, c: bytes): boolean { + // public verify_ed25519verify(a: bytes, b: bytes, c: bytes): Bool { proto 3 1 // tests/artifacts/crypto-ops/contract.algo.ts:35 // ensureBudget(1900, OpUpFeeSource.GroupCredit) @@ -625,44 +638,52 @@ verify_ed25519verify: frame_dig -1 ed25519verify // tests/artifacts/crypto-ops/contract.algo.ts:37 - // return result + // return new Bool(result) + bytec_1 // 0x00 + intc_0 // 0 + uncover 2 + setbit retsub -// tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_ed25519verify_bare(a: bytes, b: bytes, c: bytes) -> uint64: +// tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_ed25519verify_bare(a: bytes, b: bytes, c: bytes) -> bytes: verify_ed25519verify_bare: - // tests/artifacts/crypto-ops/contract.algo.ts:41-42 + // tests/artifacts/crypto-ops/contract.algo.ts:40-41 // @arc4.abimethod() - // public verify_ed25519verify_bare(a: bytes, b: bytes, c: bytes): boolean { + // public verify_ed25519verify_bare(a: bytes, b: bytes, c: bytes): Bool { proto 3 1 - // tests/artifacts/crypto-ops/contract.algo.ts:43 + // tests/artifacts/crypto-ops/contract.algo.ts:42 // ensureBudget(1900, OpUpFeeSource.GroupCredit) pushint 1900 // 1900 intc_0 // 0 callsub ensure_budget - // tests/artifacts/crypto-ops/contract.algo.ts:44 + // tests/artifacts/crypto-ops/contract.algo.ts:43 // const result = op.ed25519verifyBare(a, b, c) frame_dig -3 frame_dig -2 frame_dig -1 ed25519verify_bare - // tests/artifacts/crypto-ops/contract.algo.ts:45 - // return result + // tests/artifacts/crypto-ops/contract.algo.ts:44 + // return new Bool(result) + bytec_1 // 0x00 + intc_0 // 0 + uncover 2 + setbit retsub // tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_ecdsa_verify_k1(a: bytes, b: bytes, c: bytes, d: bytes, e: bytes) -> uint64: verify_ecdsa_verify_k1: - // tests/artifacts/crypto-ops/contract.algo.ts:48-49 + // tests/artifacts/crypto-ops/contract.algo.ts:47-48 // @arc4.abimethod() // public verify_ecdsa_verify_k1(a: bytes, b: bytes, c: bytes, d: bytes, e: bytes): boolean { proto 5 1 - // tests/artifacts/crypto-ops/contract.algo.ts:50 + // tests/artifacts/crypto-ops/contract.algo.ts:49 // ensureBudget(3000, OpUpFeeSource.GroupCredit) intc_3 // 3000 intc_0 // 0 callsub ensure_budget - // tests/artifacts/crypto-ops/contract.algo.ts:51 + // tests/artifacts/crypto-ops/contract.algo.ts:50 // const result_k1 = op.ecdsaVerify(Ecdsa.Secp256k1, a, b, c, d, e) frame_dig -5 frame_dig -4 @@ -670,23 +691,23 @@ verify_ecdsa_verify_k1: frame_dig -2 frame_dig -1 ecdsa_verify Secp256k1 - // tests/artifacts/crypto-ops/contract.algo.ts:52 + // tests/artifacts/crypto-ops/contract.algo.ts:51 // return result_k1 retsub // tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_ecdsa_verify_r1(a: bytes, b: bytes, c: bytes, d: bytes, e: bytes) -> uint64: verify_ecdsa_verify_r1: - // tests/artifacts/crypto-ops/contract.algo.ts:55-56 + // tests/artifacts/crypto-ops/contract.algo.ts:54-55 // @arc4.abimethod() // public verify_ecdsa_verify_r1(a: bytes, b: bytes, c: bytes, d: bytes, e: bytes): boolean { proto 5 1 - // tests/artifacts/crypto-ops/contract.algo.ts:57 + // tests/artifacts/crypto-ops/contract.algo.ts:56 // ensureBudget(3000, OpUpFeeSource.GroupCredit) intc_3 // 3000 intc_0 // 0 callsub ensure_budget - // tests/artifacts/crypto-ops/contract.algo.ts:58 + // tests/artifacts/crypto-ops/contract.algo.ts:57 // const result_r1 = op.ecdsaVerify(Ecdsa.Secp256r1, a, b, c, d, e) frame_dig -5 frame_dig -4 @@ -694,23 +715,23 @@ verify_ecdsa_verify_r1: frame_dig -2 frame_dig -1 ecdsa_verify Secp256r1 - // tests/artifacts/crypto-ops/contract.algo.ts:59 + // tests/artifacts/crypto-ops/contract.algo.ts:58 // return result_r1 retsub // tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_ecdsa_recover_k1(a: bytes, b: uint64, c: bytes, d: bytes) -> bytes, bytes: verify_ecdsa_recover_k1: - // tests/artifacts/crypto-ops/contract.algo.ts:62-63 + // tests/artifacts/crypto-ops/contract.algo.ts:61-62 // @arc4.abimethod() // public verify_ecdsa_recover_k1(a: bytes, b: uint64, c: bytes, d: bytes): readonly [bytes, bytes] { proto 4 2 - // tests/artifacts/crypto-ops/contract.algo.ts:64 + // tests/artifacts/crypto-ops/contract.algo.ts:63 // ensureBudget(3000, OpUpFeeSource.GroupCredit) intc_3 // 3000 intc_0 // 0 callsub ensure_budget - // tests/artifacts/crypto-ops/contract.algo.ts:65 + // tests/artifacts/crypto-ops/contract.algo.ts:64 // return op.ecdsaPkRecover(Ecdsa.Secp256k1, a, b, c, d) frame_dig -4 frame_dig -3 @@ -722,16 +743,16 @@ verify_ecdsa_recover_k1: // tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_ecdsa_recover_r1(a: bytes, b: uint64, c: bytes, d: bytes) -> bytes, bytes: verify_ecdsa_recover_r1: - // tests/artifacts/crypto-ops/contract.algo.ts:68-69 + // tests/artifacts/crypto-ops/contract.algo.ts:67-68 // @arc4.abimethod() // public verify_ecdsa_recover_r1(a: bytes, b: uint64, c: bytes, d: bytes): readonly [bytes, bytes] { proto 4 2 - // tests/artifacts/crypto-ops/contract.algo.ts:73 + // tests/artifacts/crypto-ops/contract.algo.ts:72 // ensureBudget(3000, OpUpFeeSource.GroupCredit) intc_3 // 3000 intc_0 // 0 callsub ensure_budget - // tests/artifacts/crypto-ops/contract.algo.ts:74 + // tests/artifacts/crypto-ops/contract.algo.ts:73 // return op.ecdsaPkRecover(Ecdsa.Secp256r1, a, b, c, d) frame_dig -4 frame_dig -3 @@ -743,16 +764,16 @@ verify_ecdsa_recover_r1: // tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_ecdsa_decompress_k1(a: bytes) -> bytes, bytes: verify_ecdsa_decompress_k1: - // tests/artifacts/crypto-ops/contract.algo.ts:77-78 + // tests/artifacts/crypto-ops/contract.algo.ts:76-77 // @arc4.abimethod() // public verify_ecdsa_decompress_k1(a: bytes): readonly [bytes, bytes] { proto 1 2 - // tests/artifacts/crypto-ops/contract.algo.ts:79 + // tests/artifacts/crypto-ops/contract.algo.ts:78 // ensureBudget(700, OpUpFeeSource.GroupCredit) pushint 700 // 700 intc_0 // 0 callsub ensure_budget - // tests/artifacts/crypto-ops/contract.algo.ts:80 + // tests/artifacts/crypto-ops/contract.algo.ts:79 // return op.ecdsaPkDecompress(Ecdsa.Secp256k1, a) frame_dig -1 ecdsa_pk_decompress Secp256k1 @@ -761,16 +782,16 @@ verify_ecdsa_decompress_k1: // tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_ecdsa_decompress_r1(a: bytes) -> bytes, bytes: verify_ecdsa_decompress_r1: - // tests/artifacts/crypto-ops/contract.algo.ts:83-84 + // tests/artifacts/crypto-ops/contract.algo.ts:82-83 // @arc4.abimethod() // public verify_ecdsa_decompress_r1(a: bytes): readonly [bytes, bytes] { proto 1 2 - // tests/artifacts/crypto-ops/contract.algo.ts:85 + // tests/artifacts/crypto-ops/contract.algo.ts:84 // ensureBudget(700, OpUpFeeSource.GroupCredit) pushint 700 // 700 intc_0 // 0 callsub ensure_budget - // tests/artifacts/crypto-ops/contract.algo.ts:86 + // tests/artifacts/crypto-ops/contract.algo.ts:85 // return op.ecdsaPkDecompress(Ecdsa.Secp256r1, a) frame_dig -1 ecdsa_pk_decompress Secp256r1 @@ -779,22 +800,42 @@ verify_ecdsa_decompress_r1: // tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_vrf_verify(a: bytes, b: bytes, c: bytes) -> bytes, uint64: verify_vrf_verify: - // tests/artifacts/crypto-ops/contract.algo.ts:89-90 + // tests/artifacts/crypto-ops/contract.algo.ts:88-89 // @arc4.abimethod() // public verify_vrf_verify(a: bytes, b: bytes, c: bytes): readonly [bytes, boolean] { proto 3 2 - // tests/artifacts/crypto-ops/contract.algo.ts:91 + // tests/artifacts/crypto-ops/contract.algo.ts:90 // ensureBudget(5700, OpUpFeeSource.GroupCredit) pushint 5700 // 5700 intc_0 // 0 callsub ensure_budget - // tests/artifacts/crypto-ops/contract.algo.ts:92 + // tests/artifacts/crypto-ops/contract.algo.ts:91 // const result = op.vrfVerify(VrfVerify.VrfAlgorand, a, b, c) frame_dig -3 frame_dig -2 frame_dig -1 vrf_verify VrfAlgorand - // tests/artifacts/crypto-ops/contract.algo.ts:93 + // tests/artifacts/crypto-ops/contract.algo.ts:92 + // return result + retsub + + +// tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.verify_mimc(a: bytes) -> bytes: +verify_mimc: + // tests/artifacts/crypto-ops/contract.algo.ts:95-96 + // @arc4.abimethod() + // public verify_mimc(a: bytes): bytes { + proto 1 1 + // tests/artifacts/crypto-ops/contract.algo.ts:97 + // ensureBudget(5700, OpUpFeeSource.GroupCredit) + pushint 5700 // 5700 + intc_0 // 0 + callsub ensure_budget + // tests/artifacts/crypto-ops/contract.algo.ts:98 + // const result = op.mimc(MimcConfigurations.BN254Mp110, a) + frame_dig -1 + mimc BN254Mp110 + // tests/artifacts/crypto-ops/contract.algo.ts:99 // return result retsub @@ -822,20 +863,20 @@ ensure_budget_while_top@1: itxn_field ClearStateProgram frame_dig -1 switch ensure_budget_switch_case_0@3 ensure_budget_switch_case_1@4 - b ensure_budget_switch_case_next@6 -ensure_budget_switch_case_0@3: - intc_0 // 0 - itxn_field Fee - b ensure_budget_switch_case_next@6 +ensure_budget_switch_case_next@6: + itxn_submit + b ensure_budget_while_top@1 ensure_budget_switch_case_1@4: global MinTxnFee itxn_field Fee + b ensure_budget_switch_case_next@6 -ensure_budget_switch_case_next@6: - itxn_submit - b ensure_budget_while_top@1 +ensure_budget_switch_case_0@3: + intc_0 // 0 + itxn_field Fee + b ensure_budget_switch_case_next@6 ensure_budget_after_while@7: retsub diff --git a/tests/artifacts/crypto-ops/data/CryptoOpsContract.arc32.json b/tests/artifacts/crypto-ops/data/CryptoOpsContract.arc32.json index e60b9a5..0a3af19 100644 --- a/tests/artifacts/crypto-ops/data/CryptoOpsContract.arc32.json +++ b/tests/artifacts/crypto-ops/data/CryptoOpsContract.arc32.json @@ -64,11 +64,16 @@ "call_config": { "no_op": "CALL" } + }, + "verify_mimc(byte[])byte[]": { + "call_config": { + "no_op": "CALL" + } } }, "source": { - "approval": "I3ByYWd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YW5kLXR5cGVzY3JpcHQvYmFzZS1jb250cmFjdC5kLnRzOjpCYXNlQ29udHJhY3QuY2xlYXJTdGF0ZVByb2dyYW0oKSAtPiB1aW50NjQ6Cm1haW46CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" }, "state": { "global": { @@ -357,6 +362,19 @@ "returns": { "type": "(byte[],bool)" } + }, + { + "name": "verify_mimc", + "args": [ + { + "type": "byte[]", + "name": "a" + } + ], + "readonly": false, + "returns": { + "type": "byte[]" + } } ], "networks": {} diff --git a/tests/artifacts/crypto-ops/data/CryptoOpsContract.arc56.json b/tests/artifacts/crypto-ops/data/CryptoOpsContract.arc56.json index 13d7f43..cc16a74 100644 --- a/tests/artifacts/crypto-ops/data/CryptoOpsContract.arc56.json +++ b/tests/artifacts/crypto-ops/data/CryptoOpsContract.arc56.json @@ -370,6 +370,27 @@ "readonly": false, "events": [], "recommendations": {} + }, + { + "name": "verify_mimc", + "args": [ + { + "type": "byte[]", + "name": "a" + } + ], + "returns": { + "type": "byte[]" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} } ], "arcs": [ @@ -411,42 +432,44 @@ { "pc": [ 139, - 173, - 207, - 241, - 275, - 309, - 343, - 394, - 445, - 520, - 595, - 654, - 713 + 169, + 226, + 285, + 344, + 419, + 494, + 545, + 596, + 630, + 664, + 698, + 732, + 766 ], "errorMessage": "OnCompletion is not NoOp" }, { "pc": [ - 775 + 805 ], "errorMessage": "can only call when creating" }, { "pc": [ 142, - 176, - 210, - 244, - 278, - 312, - 346, - 397, - 448, - 523, - 598, - 657, - 716 + 172, + 229, + 288, + 347, + 422, + 497, + 548, + 599, + 633, + 667, + 701, + 735, + 769 ], "errorMessage": "can only call when not creating" } @@ -459,8 +482,20 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcnRpZmFjdHMvY3J5cHRvLW9wcy9jb250cmFjdC5hbG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hoBVwIANhoCFzYaA1cCADYaBFcCAIgB7EsBFRZXBgJPAlBLARUWVwYCTwJQSwEVJAgWVwYCKkxQTwJQTFAoTFCwI0MxGRREMRhENhoBVwIANhoCVwIANhoDVwIANhoEVwIANhoFVwIAiAGEKSJPAlQoTFCwI0MxGRREMRhENhoBVwIANhoCVwIANhoDVwIANhoEVwIANhoFVwIAiAE8KSJPAlQoTFCwI0MxGRREMRhENhoBVwIANhoCVwIANhoDVwIAiAD+KExQsCNDMRkURDEYRDYaAVcCADYaAlcCADYaA1cCAIgAxShMULAjQzEZFEQxGEQ2GgFXAgA2GgIXiACgSRUWVwYCTFAoTFCwI0MxGRREMRhENhoBVwIANhoCF4gAc0kVFlcGAkxQKExQsCNDMRkURDEYRDYaAVcCADYaAheIAEZJFRZXBgJMUChMULAjQzEZFEQxGEQ2GgFXAgA2GgIXiAAZSRUWVwYCTFAoTFCwI0MxGUD9ZDEYFEQjQ4oCAYv/r4v+UAGJigIBi/+vi/5QmImKAgGL/6+L/lACiYoCAYv/r4v+UAOJigMBgewOIogAtIv9i/6L/wQpIk8CVImKAwGB7A4iiACdi/2L/ov/hCkiTwJUiYoFASUiiACIi/uL/Iv9i/6L/wUAiYoFASUiiABzi/uL/Iv9i/6L/wUBiYoEAiUiiABei/yL/Yv+i/8HAImKBAIlIogAS4v8i/2L/ov/BwGJigECgbwFIogANov/BgCJigECgbwFIogAJ4v/BgGJigMCgcQsIogAGIv9i/6L/9AAiYoBAYHELCKIAAWL/+YAiYoCAIv+gQoIiwAyDA1BACixgQayEIEFshkrsh4rsh+L/40CAAsABLNC/90yALIBQv/1IrIBQv/viQ==", + "clear": "C4EBQw==" + }, + "compilerInfo": { + "compiler": "puya", + "compilerVersion": { + "major": 4, + "minor": 1, + "patch": 1 + } }, "events": [], "templateVariables": {} diff --git a/tests/artifacts/crypto-ops/data/CryptoOpsContract.clear.teal b/tests/artifacts/crypto-ops/data/CryptoOpsContract.clear.teal index 6ee7565..42f81b0 100644 --- a/tests/artifacts/crypto-ops/data/CryptoOpsContract.clear.teal +++ b/tests/artifacts/crypto-ops/data/CryptoOpsContract.clear.teal @@ -1,5 +1,7 @@ -#pragma version 10 +#pragma version 11 +#pragma typetrack false -tests/artifacts/crypto-ops/contract.algo.ts::CryptoOpsContract.clearStateProgram: +// @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> uint64: +main: pushint 1 // 1 return diff --git a/tests/crypto-op-codes.spec.ts b/tests/crypto-op-codes.spec.ts index 826f1f1..dfe2126 100644 --- a/tests/crypto-op-codes.spec.ts +++ b/tests/crypto-op-codes.spec.ts @@ -1,6 +1,7 @@ import { AlgoAmount } from '@algorandfoundation/algokit-utils/types/amount' import { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec' -import { Bytes, Ec, Ecdsa, internal, uint64, VrfVerify } from '@algorandfoundation/algorand-typescript' +import { Bytes, Ec, Ecdsa, internal, MimcConfigurations, uint64, VrfVerify } from '@algorandfoundation/algorand-typescript' +import { encodingUtil } from '@algorandfoundation/puya-ts' import elliptic from 'elliptic' import js_sha3 from 'js-sha3' import js_sha512 from 'js-sha512' @@ -24,7 +25,8 @@ vi.mock('../src/impl/crypto', async (importOriginal) => { const mod = await importOriginal() return { ...mod, - mockedVrfVerify: vi.fn(), + vrfVerify: vi.fn(mod.vrfVerify), + mimc: vi.fn(mod.mimc), } }) describe('crypto op codes', async () => { @@ -257,6 +259,9 @@ describe('crypto op codes', async () => { const c = internal.primitives.BytesCls.fromHex('3a2740da7a0788ebb12a52154acbcca1813c128ca0b249e93f8eb6563fee418d') it('should throw not available error', async () => { + const mockedVrfVerify = op.vrfVerify as Mock + // restore to original stub implemention which should throw not available error + mockedVrfVerify.mockRestore() expect(() => op.vrfVerify(VrfVerify.VrfAlgorand, a, b, c)).toThrow('vrfVerify is not available in test context') }) @@ -268,15 +273,39 @@ describe('crypto op codes', async () => { asUint8Array(b), asUint8Array(c), ) - const mockedVrfVerify = (op as unknown as { mockedVrfVerify: Mock }).mockedVrfVerify + const mockedVrfVerify = op.vrfVerify as Mock mockedVrfVerify.mockReturnValue([internal.primitives.BytesCls.fromCompat(new Uint8Array(avmResult[0])).asAlgoTs(), avmResult[1]]) - const result = mockedVrfVerify(VrfVerify.VrfAlgorand, a, b, c) + const result = op.vrfVerify(VrfVerify.VrfAlgorand, a, b, c) expect(asUint8Array(result[0])).toEqual(new Uint8Array(avmResult[0])) expect(result[1]).toEqual(avmResult[1]) }) }) + describe('mimc', async () => { + const a = encodingUtil.bigIntToUint8Array(1234567890n, 32) + + it('should throw not available error', async () => { + const mockedMimc = op.mimc as Mock + // restore to original stub implemention which should throw not available error + mockedMimc.mockRestore() + expect(() => op.mimc(MimcConfigurations.BN254Mp110, Bytes(a))).toThrow('mimc is not available in test context') + }) + + it('should return mocked result', async () => { + const avmResult = await getAvmResult( + { appClient, sendParams: { staticFee: AlgoAmount.Algos(6000) } }, + 'verify_mimc', + asUint8Array(a), + ) + const mockedMimc = op.mimc as Mock + mockedMimc.mockReturnValue(Bytes(avmResult)) + const result = op.mimc(MimcConfigurations.BN254Mp110, Bytes(a)) + + expect(result).toEqual(avmResult) + }) + }) + describe('EllipticCurve', async () => { it('should throw not available error', async () => { expect(() => op.EllipticCurve.add(Ec.BN254g2, Bytes(''), Bytes(''))).toThrow('EllipticCurve.add is not available in test context')