From 300e9c50e094ded8978ada69eb15a8f8c3c8663c Mon Sep 17 00:00:00 2001 From: Neil Campbell Date: Thu, 26 Jun 2025 19:55:49 +0800 Subject: [PATCH] chore: add test to confirm fix in ts wasn't applicable --- tests/applications/test_app_client.py | 49 + .../nested_struct/nested_struct.algo.ts | 18 + .../nested_struct/nested_struct.arc56.json | 887 ++++++++++++++++++ 3 files changed, 954 insertions(+) create mode 100644 tests/artifacts/nested_struct/nested_struct.algo.ts create mode 100644 tests/artifacts/nested_struct/nested_struct.arc56.json diff --git a/tests/applications/test_app_client.py b/tests/applications/test_app_client.py index 50fffc89..bfd16757 100644 --- a/tests/applications/test_app_client.py +++ b/tests/applications/test_app_client.py @@ -17,6 +17,7 @@ AppClientParams, FundAppAccountParams, ) +from algokit_utils.applications.app_factory import AppFactoryCreateMethodCallParams from algokit_utils.applications.app_manager import AppManager from algokit_utils.applications.app_spec.arc56 import Arc56Contract, Network from algokit_utils.errors.logic_error import LogicError @@ -756,3 +757,51 @@ def test_exposing_logic_error(test_app_client_with_sourcemaps: AppClient) -> Non assert "assert failed pc=885" in str(error) assert len(error.transaction_id) == 52 assert error.line_no == 469 + + +@pytest.fixture +def nested_struct_app_spec() -> Arc56Contract: + raw_json_spec = Path(__file__).parent.parent / "artifacts" / "nested_struct" / "nested_struct.arc56.json" + return Arc56Contract.from_json(raw_json_spec.read_text()) + + +def test_nested_structs_described_by_structure( + algorand: AlgorandClient, funded_account: SigningAccount, nested_struct_app_spec: Arc56Contract +) -> None: + """Test nested struct when described by structure.""" + factory = algorand.client.get_app_factory(app_spec=nested_struct_app_spec, default_sender=funded_account.address) + app_client, _ = factory.send.create(AppFactoryCreateMethodCallParams(method="createApplication", args=[])) + app_client.send.call(AppClientMethodCallParams(method="setValue", args=[1, "hello"])) + + result = app_client.send.call(AppClientMethodCallParams(method="getValue", args=[1])) + + assert result.abi_return == {"x": {"a": "hello"}} + + +def test_nested_structs_referenced_by_name( + algorand: AlgorandClient, funded_account: SigningAccount, nested_struct_app_spec: Arc56Contract +) -> None: + """Test nested struct when referenced by name.""" + edited_spec_dict = nested_struct_app_spec.dictify() + edited_spec_dict["structs"] = { + "Struct1": [ + { + "name": "a", + "type": "string", + } + ], + "Struct2": [ + { + "name": "x", + "type": "Struct1", + } + ], + } + edited_spec = Arc56Contract.from_json(json.dumps(edited_spec_dict)) + factory = algorand.client.get_app_factory(app_spec=edited_spec, default_sender=funded_account.address) + app_client, _ = factory.send.create(AppFactoryCreateMethodCallParams(method="createApplication", args=[])) + app_client.send.call(AppClientMethodCallParams(method="setValue", args=[1, "hello"])) + + result = app_client.send.call(AppClientMethodCallParams(method="getValue", args=[1])) + + assert result.abi_return == {"x": {"a": "hello"}} diff --git a/tests/artifacts/nested_struct/nested_struct.algo.ts b/tests/artifacts/nested_struct/nested_struct.algo.ts new file mode 100644 index 00000000..c4fae756 --- /dev/null +++ b/tests/artifacts/nested_struct/nested_struct.algo.ts @@ -0,0 +1,18 @@ +import { Contract } from '@algorandfoundation/tealscript' + +type Struct1 = { a: string } +type Struct2 = { x: Struct1 } + +export class NestedStruct extends Contract { + createApplication() {} + + state = GlobalStateMap({ prefix: '', maxKeys: 10 }) + + setValue(key: uint64, value: string): void { + this.state(key).value = { x: { a: value } } + } + + getValue(key: uint64): Struct2 { + return this.state(key).value + } +} diff --git a/tests/artifacts/nested_struct/nested_struct.arc56.json b/tests/artifacts/nested_struct/nested_struct.arc56.json new file mode 100644 index 00000000..861c1286 --- /dev/null +++ b/tests/artifacts/nested_struct/nested_struct.arc56.json @@ -0,0 +1,887 @@ +{ + "name": "NestedStruct", + "desc": "", + "methods": [ + { + "name": "createApplication", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + } + }, + { + "name": "setValue", + "args": [ + { + "name": "key", + "type": "uint64" + }, + { + "name": "value", + "type": "string" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + } + }, + { + "name": "getValue", + "args": [ + { + "name": "key", + "type": "uint64" + } + ], + "returns": { + "type": "((string))", + "struct": "Struct2" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + } + } + ], + "arcs": [ + 4, + 56 + ], + "structs": { + "Struct2": [ + { + "name": "x", + "type": [ + { + "name": "a", + "type": "string" + } + ] + } + ] + }, + "state": { + "schema": { + "global": { + "bytes": 10, + "ints": 0 + }, + "local": { + "bytes": 0, + "ints": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": { + "state": { + "keyType": "uint64", + "valueType": "Struct2" + } + }, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "teal": 1, + "source": "nested_struct.algo.ts:6", + "pc": [ + 0 + ] + }, + { + "teal": 2, + "source": "nested_struct.algo.ts:6", + "pc": [ + 1, + 2, + 3 + ] + }, + { + "teal": 3, + "source": "nested_struct.algo.ts:6", + "pc": [ + 4, + 5, + 6, + 7, + 8, + 9 + ] + }, + { + "teal": 15, + "source": "nested_struct.algo.ts:6", + "pc": [ + 10, + 11 + ] + }, + { + "teal": 16, + "source": "nested_struct.algo.ts:6", + "pc": [ + 12 + ] + }, + { + "teal": 17, + "source": "nested_struct.algo.ts:6", + "pc": [ + 13, + 14 + ] + }, + { + "teal": 18, + "source": "nested_struct.algo.ts:6", + "pc": [ + 15 + ] + }, + { + "teal": 19, + "source": "nested_struct.algo.ts:6", + "pc": [ + 16, + 17 + ] + }, + { + "teal": 20, + "source": "nested_struct.algo.ts:6", + "pc": [ + 18 + ] + }, + { + "teal": 21, + "source": "nested_struct.algo.ts:6", + "pc": [ + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44 + ] + }, + { + "teal": 25, + "source": "nested_struct.algo.ts:6", + "errorMessage": "The requested action is not implemented in this contract. Are you using the correct OnComplete? Did you set your app ID?", + "pc": [ + 45 + ] + }, + { + "teal": 30, + "source": "nested_struct.algo.ts:7", + "pc": [ + 46, + 47, + 48 + ] + }, + { + "teal": 31, + "source": "nested_struct.algo.ts:7", + "pc": [ + 49 + ] + }, + { + "teal": 32, + "source": "nested_struct.algo.ts:7", + "pc": [ + 50 + ] + }, + { + "teal": 36, + "source": "nested_struct.algo.ts:7", + "pc": [ + 51, + 52, + 53 + ] + }, + { + "teal": 37, + "source": "nested_struct.algo.ts:7", + "pc": [ + 54 + ] + }, + { + "teal": 42, + "source": "nested_struct.algo.ts:11", + "pc": [ + 55, + 56, + 57 + ] + }, + { + "teal": 43, + "source": "nested_struct.algo.ts:11", + "pc": [ + 58, + 59, + 60 + ] + }, + { + "teal": 46, + "source": "nested_struct.algo.ts:11", + "pc": [ + 61, + 62, + 63 + ] + }, + { + "teal": 47, + "source": "nested_struct.algo.ts:11", + "pc": [ + 64 + ] + }, + { + "teal": 50, + "source": "nested_struct.algo.ts:11", + "pc": [ + 65, + 66, + 67 + ] + }, + { + "teal": 51, + "source": "nested_struct.algo.ts:11", + "pc": [ + 68 + ] + }, + { + "teal": 52, + "source": "nested_struct.algo.ts:11", + "pc": [ + 69 + ] + }, + { + "teal": 56, + "source": "nested_struct.algo.ts:11", + "pc": [ + 70, + 71, + 72 + ] + }, + { + "teal": 60, + "source": "nested_struct.algo.ts:12", + "pc": [ + 73, + 74 + ] + }, + { + "teal": 61, + "source": "nested_struct.algo.ts:12", + "pc": [ + 75 + ] + }, + { + "teal": 62, + "source": "nested_struct.algo.ts:12", + "pc": [ + 76 + ] + }, + { + "teal": 63, + "source": "nested_struct.algo.ts:12", + "pc": [ + 77 + ] + }, + { + "teal": 64, + "source": "nested_struct.algo.ts:12", + "pc": [ + 78 + ] + }, + { + "teal": 65, + "source": "nested_struct.algo.ts:12", + "pc": [ + 79 + ] + }, + { + "teal": 66, + "source": "nested_struct.algo.ts:12", + "pc": [ + 80 + ] + }, + { + "teal": 67, + "source": "nested_struct.algo.ts:12", + "pc": [ + 81 + ] + }, + { + "teal": 68, + "source": "nested_struct.algo.ts:12", + "pc": [ + 82, + 83 + ] + }, + { + "teal": 69, + "source": "nested_struct.algo.ts:12", + "pc": [ + 84 + ] + }, + { + "teal": 70, + "source": "nested_struct.algo.ts:12", + "pc": [ + 85 + ] + }, + { + "teal": 71, + "source": "nested_struct.algo.ts:12", + "pc": [ + 86 + ] + }, + { + "teal": 72, + "source": "nested_struct.algo.ts:12", + "pc": [ + 87, + 88, + 89 + ] + }, + { + "teal": 73, + "source": "nested_struct.algo.ts:12", + "pc": [ + 90 + ] + }, + { + "teal": 74, + "source": "nested_struct.algo.ts:12", + "pc": [ + 91 + ] + }, + { + "teal": 75, + "source": "nested_struct.algo.ts:12", + "pc": [ + 92, + 93, + 94 + ] + }, + { + "teal": 76, + "source": "nested_struct.algo.ts:12", + "pc": [ + 95 + ] + }, + { + "teal": 77, + "source": "nested_struct.algo.ts:12", + "pc": [ + 96 + ] + }, + { + "teal": 78, + "source": "nested_struct.algo.ts:12", + "pc": [ + 97, + 98, + 99 + ] + }, + { + "teal": 79, + "source": "nested_struct.algo.ts:12", + "pc": [ + 100 + ] + }, + { + "teal": 80, + "source": "nested_struct.algo.ts:12", + "pc": [ + 101 + ] + }, + { + "teal": 81, + "source": "nested_struct.algo.ts:12", + "pc": [ + 102 + ] + }, + { + "teal": 82, + "source": "nested_struct.algo.ts:11", + "pc": [ + 103 + ] + }, + { + "teal": 87, + "source": "nested_struct.algo.ts:15", + "pc": [ + 104, + 105, + 106, + 107, + 108, + 109 + ] + }, + { + "teal": 90, + "source": "nested_struct.algo.ts:15", + "pc": [ + 110, + 111, + 112 + ] + }, + { + "teal": 91, + "source": "nested_struct.algo.ts:15", + "pc": [ + 113 + ] + }, + { + "teal": 94, + "source": "nested_struct.algo.ts:15", + "pc": [ + 114, + 115, + 116 + ] + }, + { + "teal": 95, + "source": "nested_struct.algo.ts:15", + "pc": [ + 117 + ] + }, + { + "teal": 96, + "source": "nested_struct.algo.ts:15", + "pc": [ + 118 + ] + }, + { + "teal": 97, + "source": "nested_struct.algo.ts:15", + "pc": [ + 119 + ] + }, + { + "teal": 98, + "source": "nested_struct.algo.ts:15", + "pc": [ + 120 + ] + }, + { + "teal": 102, + "source": "nested_struct.algo.ts:15", + "pc": [ + 121, + 122, + 123 + ] + }, + { + "teal": 106, + "source": "nested_struct.algo.ts:16", + "pc": [ + 124, + 125 + ] + }, + { + "teal": 107, + "source": "nested_struct.algo.ts:16", + "pc": [ + 126 + ] + }, + { + "teal": 108, + "source": "nested_struct.algo.ts:16", + "pc": [ + 127 + ] + }, + { + "teal": 109, + "source": "nested_struct.algo.ts:15", + "pc": [ + 128 + ] + }, + { + "teal": 112, + "source": "nested_struct.algo.ts:6", + "pc": [ + 129, + 130, + 131, + 132, + 133, + 134 + ] + }, + { + "teal": 113, + "source": "nested_struct.algo.ts:6", + "pc": [ + 135, + 136, + 137 + ] + }, + { + "teal": 114, + "source": "nested_struct.algo.ts:6", + "pc": [ + 138, + 139, + 140, + 141 + ] + }, + { + "teal": 117, + "source": "nested_struct.algo.ts:6", + "errorMessage": "this contract does not implement the given ABI method for create NoOp", + "pc": [ + 142 + ] + }, + { + "teal": 120, + "source": "nested_struct.algo.ts:6", + "pc": [ + 143, + 144, + 145, + 146, + 147, + 148 + ] + }, + { + "teal": 121, + "source": "nested_struct.algo.ts:6", + "pc": [ + 149, + 150, + 151, + 152, + 153, + 154 + ] + }, + { + "teal": 122, + "source": "nested_struct.algo.ts:6", + "pc": [ + 155, + 156, + 157 + ] + }, + { + "teal": 123, + "source": "nested_struct.algo.ts:6", + "pc": [ + 158, + 159, + 160, + 161, + 162, + 163 + ] + }, + { + "teal": 126, + "source": "nested_struct.algo.ts:6", + "errorMessage": "this contract does not implement the given ABI method for call NoOp", + "pc": [ + 164 + ] + }, + { + "teal": 129, + "source": "nested_struct.algo.ts:6", + "pc": [ + 165, + 166, + 167 + ] + }, + { + "teal": 130, + "source": "nested_struct.algo.ts:6", + "pc": [ + 168, + 169 + ] + }, + { + "teal": 131, + "source": "nested_struct.algo.ts:6", + "pc": [ + 170, + 171 + ] + }, + { + "teal": 132, + "source": "nested_struct.algo.ts:6", + "pc": [ + 172 + ] + }, + { + "teal": 133, + "source": "nested_struct.algo.ts:6", + "pc": [ + 173, + 174 + ] + }, + { + "teal": 134, + "source": "nested_struct.algo.ts:6", + "pc": [ + 175, + 176 + ] + }, + { + "teal": 135, + "source": "nested_struct.algo.ts:6", + "pc": [ + 177 + ] + }, + { + "teal": 136, + "source": "nested_struct.algo.ts:6", + "pc": [ + 178 + ] + }, + { + "teal": 137, + "source": "nested_struct.algo.ts:6", + "pc": [ + 179, + 180 + ] + }, + { + "teal": 138, + "source": "nested_struct.algo.ts:6", + "pc": [ + 181 + ] + }, + { + "teal": 139, + "source": "nested_struct.algo.ts:6", + "pc": [ + 182 + ] + }, + { + "teal": 140, + "source": "nested_struct.algo.ts:6", + "pc": [ + 183 + ] + }, + { + "teal": 141, + "source": "nested_struct.algo.ts:6", + "pc": [ + 184, + 185, + 186 + ] + }, + { + "teal": 142, + "source": "nested_struct.algo.ts:6", + "pc": [ + 187, + 188 + ] + }, + { + "teal": 143, + "source": "nested_struct.algo.ts:6", + "pc": [ + 189, + 190 + ] + }, + { + "teal": 144, + "source": "nested_struct.algo.ts:6", + "pc": [ + 191 + ] + }, + { + "teal": 145, + "source": "nested_struct.algo.ts:6", + "pc": [ + 192 + ] + }, + { + "teal": 146, + "source": "nested_struct.algo.ts:6", + "pc": [ + 193, + 194 + ] + }, + { + "teal": 147, + "source": "nested_struct.algo.ts:6", + "pc": [ + 195, + 196 + ] + }, + { + "teal": 148, + "source": "nested_struct.algo.ts:6", + "pc": [ + 197, + 198 + ] + }, + { + "teal": 149, + "source": "nested_struct.algo.ts:6", + "pc": [ + 199, + 200 + ] + }, + { + "teal": 150, + "source": "nested_struct.algo.ts:6", + "pc": [ + 201 + ] + } + ], + "pcOffsetMethod": "none" + }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NfZHluYW1pY190dXBsZV9lbGVtZW50OgoJcHJvdG8gNCAzCglmcmFtZV9kaWcgLTQgLy8gdHVwbGUgaGVhZAoJZnJhbWVfZGlnIC0yIC8vIGhlYWQgb2Zmc2V0Cgljb25jYXQKCWZyYW1lX2J1cnkgLTQgLy8gdHVwbGUgaGVhZAoJZnJhbWVfZGlnIC0xIC8vIGVsZW1lbnQKCWR1cAoJbGVuCglmcmFtZV9kaWcgLTIgLy8gaGVhZCBvZmZzZXQKCWJ0b2kKCSsKCWl0b2IKCWV4dHJhY3QgNiAyCglmcmFtZV9idXJ5IC0yIC8vIGhlYWQgb2Zmc2V0CglmcmFtZV9kaWcgLTMgLy8gdHVwbGUgdGFpbAoJc3dhcAoJY29uY2F0CglmcmFtZV9idXJ5IC0zIC8vIHR1cGxlIHRhaWwKCWZyYW1lX2RpZyAtNCAvLyB0dXBsZSBoZWFkCglmcmFtZV9kaWcgLTMgLy8gdHVwbGUgdGFpbAoJZnJhbWVfZGlnIC0yIC8vIGhlYWQgb2Zmc2V0CglyZXRzdWI=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEw" + }, + "byteCode": { + "approval": "CiABASYCAAIAAjEYFIEGCzEZCI0MAGIAAAAAAAAAAAAAAFQAAAAAAAAAAAAAAIgAAiJDigAAiTYaAlcCADYaAReIAAIiQ4oCAIv/FigoKSgoKYv+SRUWVwYCTFCIAEZIUIgAQUhQZ4mABBUffHU2GgEXiAAEULAiQ4oBAYv/FmSJgAS4RHs2NhoAjgH/oACABOBlxHCABPRw/bY2GgCOAv+T/8QAigQDi/yL/lCM/Iv/SRWL/hcIFlcGAoz+i/1MUIz9i/yL/Yv+iQ==", + "clear": "Cg==" + }, + "compilerInfo": { + "compiler": "algod", + "compilerVersion": { + "major": 4, + "minor": 1, + "patch": 2, + "commitHash": "088f89dd" + } + } +} \ No newline at end of file