From dc6906890cfcf2dc0c8759b6989e2c2e6f82fdd3 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Thu, 26 Sep 2024 16:14:14 -0400 Subject: [PATCH] fix: ARC56 struct names in methods --- .../artifacts/StakingPool.arc56_draft.json | 12 +- .../ValidatorRegistry.arc56_draft.json | 24 +- src/lib/compiler.ts | 7 +- tests/contracts/arc56.algo.ts | 7 +- .../artifacts/ARC56Test.approval.teal | 82 +- .../contracts/artifacts/ARC56Test.arc32.json | 36 +- tests/contracts/artifacts/ARC56Test.arc4.json | 24 + .../artifacts/ARC56Test.arc56_draft.json | 1043 +++++++++++------ .../ARC56TestNoTemplateVars.arc56_draft.json | 30 +- .../ContractWithCustomStruct.approval.teal | 74 ++ .../ContractWithCustomStruct.arc32.json | 70 ++ .../ContractWithCustomStruct.arc4.json | 25 + .../ContractWithCustomStruct.arc56_draft.json | 405 +++++++ .../ContractWithCustomStruct.clear.teal | 1 + tests/contracts/inheritance-external.algo.ts | 9 + 15 files changed, 1436 insertions(+), 413 deletions(-) create mode 100644 tests/contracts/artifacts/ContractWithCustomStruct.approval.teal create mode 100644 tests/contracts/artifacts/ContractWithCustomStruct.arc32.json create mode 100644 tests/contracts/artifacts/ContractWithCustomStruct.arc4.json create mode 100644 tests/contracts/artifacts/ContractWithCustomStruct.arc56_draft.json create mode 100644 tests/contracts/artifacts/ContractWithCustomStruct.clear.teal diff --git a/examples/reti/artifacts/StakingPool.arc56_draft.json b/examples/reti/artifacts/StakingPool.arc56_draft.json index 2c235b893..ab14ea7b1 100644 --- a/examples/reti/artifacts/StakingPool.arc56_draft.json +++ b/examples/reti/artifacts/StakingPool.arc56_draft.json @@ -162,7 +162,7 @@ "returns": { "type": "(address,uint64,uint64,uint64,uint64)", "desc": "StakedInfo - The staked information for the given staker.", - "struct": "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/stakingPool.algo\").StakedInfo" + "struct": "StakedInfo" }, "actions": { "create": [], @@ -329,12 +329,12 @@ "name": "poolKey", "type": "(uint64,uint64,uint64)", "desc": "ValidatorPoolKey tuple", - "struct": "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").ValidatorPoolKey" + "struct": "ValidatorPoolKey" } ], "returns": { "type": "(uint64[24],uint64)", - "struct": "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").PoolTokenPayoutRatio" + "struct": "PoolTokenPayoutRatio" }, "actions": { "create": [], @@ -349,7 +349,7 @@ 56 ], "structs": { - "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/stakingPool.algo\").StakedInfo": [ + "StakedInfo": [ { "name": "account", "type": "address" @@ -371,7 +371,7 @@ "type": "uint64" } ], - "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").PoolTokenPayoutRatio": [ + "PoolTokenPayoutRatio": [ { "name": "poolPctOfWhole", "type": "uint64[24]" @@ -381,7 +381,7 @@ "type": "uint64" } ], - "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").ValidatorPoolKey": [ + "ValidatorPoolKey": [ { "name": "id", "type": "uint64" diff --git a/examples/reti/artifacts/ValidatorRegistry.arc56_draft.json b/examples/reti/artifacts/ValidatorRegistry.arc56_draft.json index 139e8b445..3742dfcd2 100644 --- a/examples/reti/artifacts/ValidatorRegistry.arc56_draft.json +++ b/examples/reti/artifacts/ValidatorRegistry.arc56_draft.json @@ -149,7 +149,7 @@ ], "returns": { "type": "(uint64,address,address,uint64,uint8,address,uint64[4],uint64,uint64,uint64,uint32,uint32,address,uint64,uint64,uint8,uint64,uint64)", - "struct": "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").ValidatorConfig" + "struct": "ValidatorConfig" }, "actions": { "create": [], @@ -243,7 +243,7 @@ { "name": "poolKey", "type": "(uint64,uint64,uint64)", - "struct": "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").ValidatorPoolKey" + "struct": "ValidatorPoolKey" } ], "returns": { @@ -328,7 +328,7 @@ ], "returns": { "type": "(uint64[24],uint64)", - "struct": "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").PoolTokenPayoutRatio" + "struct": "PoolTokenPayoutRatio" }, "actions": { "create": [], @@ -387,7 +387,7 @@ "name": "config", "type": "(uint64,address,address,uint64,uint8,address,uint64[4],uint64,uint64,uint64,uint32,uint32,address,uint64,uint64,uint8,uint64,uint64)", "desc": "ValidatorConfig struct", - "struct": "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").ValidatorConfig" + "struct": "ValidatorConfig" } ], "returns": { @@ -571,7 +571,7 @@ "returns": { "type": "(uint64,uint64,uint64)", "desc": "ValidatorPoolKey pool key to created pool", - "struct": "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").ValidatorPoolKey" + "struct": "ValidatorPoolKey" }, "actions": { "create": [], @@ -603,7 +603,7 @@ "returns": { "type": "(uint64,uint64,uint64)", "desc": "ValidatorPoolKey - The key of the validator pool.", - "struct": "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").ValidatorPoolKey" + "struct": "ValidatorPoolKey" }, "actions": { "create": [], @@ -625,7 +625,7 @@ "returns": { "type": "(uint64[24],uint64)", "desc": "PoolTokenPayoutRatio - the finished ratio data", - "struct": "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").PoolTokenPayoutRatio" + "struct": "PoolTokenPayoutRatio" }, "actions": { "create": [], @@ -642,7 +642,7 @@ "name": "poolKey", "type": "(uint64,uint64,uint64)", "desc": "ValidatorPoolKey type", - "struct": "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").ValidatorPoolKey" + "struct": "ValidatorPoolKey" }, { "name": "algoToAdd", @@ -683,7 +683,7 @@ "name": "poolKey", "type": "(uint64,uint64,uint64)", "desc": "calling us from which stake was removed", - "struct": "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").ValidatorPoolKey" + "struct": "ValidatorPoolKey" }, { "name": "staker", @@ -995,7 +995,7 @@ "type": "uint64" } ], - "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").ValidatorConfig": [ + "ValidatorConfig": [ { "name": "id", "type": "uint64" @@ -1101,7 +1101,7 @@ "type": "uint64" } ], - "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").ValidatorPoolKey": [ + "ValidatorPoolKey": [ { "name": "id", "type": "uint64" @@ -1115,7 +1115,7 @@ "type": "uint64" } ], - "import(\"/Users/joe/git/algorandfoundation/tealscript/examples/reti/validatorRegistry.algo\").PoolTokenPayoutRatio": [ + "PoolTokenPayoutRatio": [ { "name": "poolPctOfWhole", "type": "uint64[24]" diff --git a/src/lib/compiler.ts b/src/lib/compiler.ts index 1f98f54f3..510dbda1e 100644 --- a/src/lib/compiler.ts +++ b/src/lib/compiler.ts @@ -7764,7 +7764,10 @@ declare type AssetFreezeTxn = Required; const returnTypeInfo = this.getTypeInfo(subroutine.node.getReturnType()); if (returnTypeInfo.kind === 'object') { - const structName = subroutine.node.getReturnType().getText(); + const returnTypeNode = + subroutine.node.getChildrenOfKind(ts.SyntaxKind.TypeReference)?.[0] || subroutine.node.getReturnType(); + const structName = returnTypeNode?.getText(); + // eslint-disable-next-line no-param-reassign m.returns.struct = structName; if (!arc56.structs[structName]) { @@ -7778,7 +7781,7 @@ declare type AssetFreezeTxn = Required; const typeInfo = this.getTypeInfo(p.getType()); if (typeInfo.kind === 'object') { - const structName = p.getType().getText(); + const structName = (p.getChildrenOfKind(ts.SyntaxKind.TypeReference)?.[0] || p.getType()).getText(); arg.struct = structName; if (!arc56.structs[structName]) { arc56.structs[structName] = objectToStructFields(typeInfo); diff --git a/tests/contracts/arc56.algo.ts b/tests/contracts/arc56.algo.ts index 2cc7e3aa2..fb3790cb6 100644 --- a/tests/contracts/arc56.algo.ts +++ b/tests/contracts/arc56.algo.ts @@ -1,9 +1,10 @@ import { Contract } from '../../src/lib'; +import { CustomStruct as CustomStructAsName, ContractWithCustomStruct } from './inheritance-external.algo'; type Inputs = { add: { a: uint64; b: uint64 }; subtract: { a: uint64; b: uint64 } }; type Outputs = { sum: uint64; difference: uint64 }; -export class ARC56Test extends Contract { +export class ARC56Test extends ContractWithCustomStruct { globalKey = GlobalStateKey(); globalMap = GlobalStateMap({ maxKeys: 37, prefix: 'p' }); @@ -38,6 +39,10 @@ export class ARC56Test extends Contract { this.boxKey.value = 'baz'; this.boxMap({ add: { a: 1, b: 2 }, subtract: { a: 4, b: 3 } }).value = { sum: 3, difference: 1 }; } + + customType(input: CustomStructAsName): CustomStructAsName { + return input; + } } export class ARC56TestNoTemplateVars extends Contract {} diff --git a/tests/contracts/artifacts/ARC56Test.approval.teal b/tests/contracts/artifacts/ARC56Test.approval.teal index d1d7d8883..673a612d6 100644 --- a/tests/contracts/artifacts/ARC56Test.approval.teal +++ b/tests/contracts/artifacts/ARC56Test.approval.teal @@ -27,6 +27,37 @@ switch *call_NoOp *call_OptIn *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED // The requested action is not implemented in this contract. Are you using the correct OnComplete? Did you set your app ID? err +// customStructMethod((uint64))(uint64) +*abi_route_customStructMethod: + // The ABI return prefix + byte 0x151f7c75 + + // input: (uint64) + txna ApplicationArgs 1 + dup + len + int 8 + == + + // argument 0 (input) for customStructMethod must be a (uint64) + assert + + // execute customStructMethod((uint64))(uint64) + callsub customStructMethod + concat + log + int 1 + return + +// customStructMethod(input: AnotherCustomStruct): AnotherCustomStruct +customStructMethod: + proto 1 1 + + // tests/contracts/inheritance-external.algo.ts:21 + // return input; + frame_dig -1 // input: AnotherCustomStruct + retsub + // foo(((uint64,uint64),(uint64,uint64)))(uint64,uint64) *abi_route_foo: // The ABI return prefix @@ -54,7 +85,7 @@ foo: proto 1 1 // *if0_condition - // tests/contracts/arc56.algo.ts:24 + // tests/contracts/arc56.algo.ts:25 // inputs.subtract.a < inputs.subtract.b frame_dig -1 // inputs: Inputs extract 16 8 @@ -70,19 +101,19 @@ foo: err *if0_end: - // tests/contracts/arc56.algo.ts:26 + // tests/contracts/arc56.algo.ts:27 // this.globalKey.value = this.someNumber byte 0x676c6f62616c4b6579 // "globalKey" load 200 // TMPL_someNumber app_global_put - // tests/contracts/arc56.algo.ts:27 + // tests/contracts/arc56.algo.ts:28 // this.globalMap('foo').value = { foo: 13, bar: 37 } byte 0x700003666f6f byte 0x000d0025 app_global_put - // tests/contracts/arc56.algo.ts:29 + // tests/contracts/arc56.algo.ts:30 // return { // sum: inputs.add.a + inputs.add.b, // difference: inputs.subtract.a - inputs.subtract.b, @@ -117,21 +148,21 @@ foo: optInToApplication: proto 0 0 - // tests/contracts/arc56.algo.ts:36 + // tests/contracts/arc56.algo.ts:37 // this.localKey(this.txn.sender).value = this.someNumber txn Sender byte 0x6c6f63616c4b6579 // "localKey" load 200 // TMPL_someNumber app_local_put - // tests/contracts/arc56.algo.ts:37 + // tests/contracts/arc56.algo.ts:38 // this.localMap(this.txn.sender, 'foo').value = 'bar' txn Sender byte 0x70666f6f byte 0x0003626172 app_local_put - // tests/contracts/arc56.algo.ts:38 + // tests/contracts/arc56.algo.ts:39 // this.boxKey.value = 'baz' byte 0x626f784b6579 // "boxKey" dup @@ -140,13 +171,44 @@ optInToApplication: byte 0x000362617a box_put - // tests/contracts/arc56.algo.ts:39 + // tests/contracts/arc56.algo.ts:40 // this.boxMap({ add: { a: 1, b: 2 }, subtract: { a: 4, b: 3 } }).value = { sum: 3, difference: 1 } byte 0x700000000000000001000000000000000200000000000000040000000000000003 byte 0x00000000000000030000000000000001 box_put retsub +// customType((uint64))(uint64) +*abi_route_customType: + // The ABI return prefix + byte 0x151f7c75 + + // input: (uint64) + txna ApplicationArgs 1 + dup + len + int 8 + == + + // argument 0 (input) for customType must be a (uint64) + assert + + // execute customType((uint64))(uint64) + callsub customType + concat + log + int 1 + return + +// customType(input: CustomStructAsName): CustomStructAsName +customType: + proto 1 1 + + // tests/contracts/arc56.algo.ts:44 + // return input; + frame_dig -1 // input: CustomStructAsName + retsub + *abi_route_createApplication: int 1 return @@ -160,9 +222,11 @@ optInToApplication: err *call_NoOp: + method "customStructMethod((uint64))(uint64)" method "foo(((uint64,uint64),(uint64,uint64)))(uint64,uint64)" + method "customType((uint64))(uint64)" txna ApplicationArgs 0 - match *abi_route_foo + match *abi_route_customStructMethod *abi_route_foo *abi_route_customType // this contract does not implement the given ABI method for call NoOp err diff --git a/tests/contracts/artifacts/ARC56Test.arc32.json b/tests/contracts/artifacts/ARC56Test.arc32.json index 30d9c249a..654da2fd3 100644 --- a/tests/contracts/artifacts/ARC56Test.arc32.json +++ b/tests/contracts/artifacts/ARC56Test.arc32.json @@ -1,5 +1,10 @@ { "hints": { + "customStructMethod((uint64))(uint64)": { + "call_config": { + "no_op": "CALL" + } + }, "foo(((uint64,uint64),(uint64,uint64)))(uint64,uint64)": { "call_config": { "no_op": "CALL" @@ -10,6 +15,11 @@ "opt_in": "CALL" } }, + "customType((uint64))(uint64)": { + "call_config": { + "no_op": "CALL" + } + }, "createApplication()void": { "call_config": { "no_op": "CREATE" @@ -54,13 +64,25 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgovLyBUaGlzIFRFQUwgd2FzIGdlbmVyYXRlZCBieSBURUFMU2NyaXB0IHYwLjEwMy4wCi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9hbGdvcmFuZGZvdW5kYXRpb24vVEVBTFNjcmlwdAoKLy8gVGhpcyBjb250cmFjdCBpcyBjb21wbGlhbnQgd2l0aCBhbmQvb3IgaW1wbGVtZW50cyB0aGUgZm9sbG93aW5nIEFSQ3M6IFsgQVJDNCBdCgovLyBUaGUgZm9sbG93aW5nIGxpbmVzIG9mIFRFQUwgYXJlIHVzZWQgdG8gaW5pdGlhbGl6ZSB0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JbgoJZXJy", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEw" }, "contract": { "name": "ARC56Test", "desc": "", "methods": [ + { + "name": "customStructMethod", + "args": [ + { + "name": "input", + "type": "(uint64)" + } + ], + "returns": { + "type": "(uint64)" + } + }, { "name": "foo", "args": [ @@ -80,6 +102,18 @@ "type": "void" } }, + { + "name": "customType", + "args": [ + { + "name": "input", + "type": "(uint64)" + } + ], + "returns": { + "type": "(uint64)" + } + }, { "name": "createApplication", "args": [], diff --git a/tests/contracts/artifacts/ARC56Test.arc4.json b/tests/contracts/artifacts/ARC56Test.arc4.json index 0db1a7847..b12aae721 100644 --- a/tests/contracts/artifacts/ARC56Test.arc4.json +++ b/tests/contracts/artifacts/ARC56Test.arc4.json @@ -2,6 +2,18 @@ "name": "ARC56Test", "desc": "", "methods": [ + { + "name": "customStructMethod", + "args": [ + { + "name": "input", + "type": "(uint64)" + } + ], + "returns": { + "type": "(uint64)" + } + }, { "name": "foo", "args": [ @@ -21,6 +33,18 @@ "type": "void" } }, + { + "name": "customType", + "args": [ + { + "name": "input", + "type": "(uint64)" + } + ], + "returns": { + "type": "(uint64)" + } + }, { "name": "createApplication", "args": [], diff --git a/tests/contracts/artifacts/ARC56Test.arc56_draft.json b/tests/contracts/artifacts/ARC56Test.arc56_draft.json index 0667ba267..175af6443 100644 --- a/tests/contracts/artifacts/ARC56Test.arc56_draft.json +++ b/tests/contracts/artifacts/ARC56Test.arc56_draft.json @@ -2,6 +2,26 @@ "name": "ARC56Test", "desc": "", "methods": [ + { + "name": "customStructMethod", + "args": [ + { + "name": "input", + "type": "(uint64)", + "struct": "AnotherCustomStruct" + } + ], + "returns": { + "type": "(uint64)", + "struct": "AnotherCustomStruct" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + } + }, { "name": "foo", "args": [ @@ -35,6 +55,26 @@ ] } }, + { + "name": "customType", + "args": [ + { + "name": "input", + "type": "(uint64)", + "struct": "CustomStructAsName" + } + ], + "returns": { + "type": "(uint64)", + "struct": "CustomStructAsName" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + } + }, { "name": "createApplication", "args": [], @@ -101,6 +141,18 @@ } ] } + ], + "AnotherCustomStruct": [ + { + "name": "b", + "type": "uint64" + } + ], + "CustomStructAsName": [ + { + "name": "a", + "type": "uint64" + } ] }, "state": { @@ -169,18 +221,12 @@ "approval": [ { "teal": 1, - "source": 6, + "source": 7, "pc": [ 0, 1, 2, - 3 - ] - }, - { - "teal": 9, - "source": 6, - "pc": [ + 3, 4, 5, 6, @@ -188,83 +234,89 @@ 8, 9, 10, - 11, + 11 + ] + }, + { + "teal": 9, + "source": 7, + "pc": [ 12, - 13 + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21 ] }, { "teal": 10, - "source": 6, + "source": 7, "pc": [ - 14 + 22 ] }, { "teal": 11, - "source": 6, + "source": 7, "pc": [ - 15, - 16 + 23, + 24 ] }, { "teal": 18, - "source": 6, + "source": 7, "pc": [ - 17, - 18 + 25, + 26 ] }, { "teal": 19, - "source": 6, + "source": 7, "pc": [ - 19 + 27 ] }, { "teal": 20, - "source": 6, + "source": 7, "pc": [ - 20, - 21 + 28, + 29 ] }, { "teal": 21, - "source": 6, + "source": 7, "pc": [ - 22 + 30 ] }, { "teal": 22, - "source": 6, + "source": 7, "pc": [ - 23, - 24 + 31, + 32 ] }, { "teal": 23, - "source": 6, + "source": 7, "pc": [ - 25 + 33 ] }, { "teal": 24, - "source": 6, + "source": 7, "pc": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, 34, 35, 36, @@ -282,544 +334,593 @@ 48, 49, 50, - 51 + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59 ] }, { "teal": 28, - "source": 6, + "source": 7, "errorMessage": "The requested action is not implemented in this contract. Are you using the correct OnComplete? Did you set your app ID?", "pc": [ - 52 + 60 ] }, { "teal": 33, - "source": 23, + "source": 12, "pc": [ - 53, - 54, - 55, - 56, - 57, - 58 + 61 ] }, { "teal": 36, - "source": 23, + "source": 14, "pc": [ - 59, - 60, - 61 + 62, + 63, + 64 ] }, { "teal": 37, - "source": 23, + "source": 14, "pc": [ - 62 + 65 ] }, { "teal": 38, - "source": 23, + "source": 14, "pc": [ - 63 + 66 ] }, { "teal": 39, - "source": 23, + "source": 14, "pc": [ - 64, - 65 + 67 ] }, { "teal": 40, - "source": 23, + "source": 14, "pc": [ - 66 + 68 ] }, { "teal": 43, - "source": 23, - "errorMessage": "argument 0 (inputs) for foo must be a ((uint64,uint64),(uint64,uint64))", + "source": 14, + "errorMessage": "argument 0 (input) for customStructMethod must be a (uint64)", "pc": [ - 67 + 69 ] }, { "teal": 46, - "source": 23, + "source": 12, "pc": [ - 68, - 69, - 70 + 70, + 71, + 72 ] }, { "teal": 47, - "source": 23, + "source": 12, "pc": [ - 71 + 73 ] }, { "teal": 48, - "source": 23, + "source": 12, "pc": [ - 72 + 74 ] }, { "teal": 49, - "source": 23, + "source": 12, "pc": [ - 73 + 75 ] }, { "teal": 50, - "source": 23, + "source": 12, "pc": [ - 74 + 76 ] }, { "teal": 54, - "source": 23, + "source": 12, "pc": [ - 75, - 76, - 77 + 77, + 78, + 79 ] }, { - "teal": 59, - "source": 24, + "teal": 58, + "source": 16, "pc": [ - 78, - 79 + 80, + 81 ] }, { - "teal": 60, - "source": 24, + "teal": 59, + "source": 12, "pc": [ - 80, - 81, 82 ] }, { - "teal": 61, + "teal": 64, "source": 24, "pc": [ 83 ] }, { - "teal": 62, + "teal": 67, "source": 24, "pc": [ 84, - 85 + 85, + 86 ] }, { - "teal": 63, + "teal": 68, "source": 24, "pc": [ - 86, - 87, - 88 + 87 ] }, { - "teal": 64, + "teal": 69, "source": 24, "pc": [ - 89 + 88 ] }, { - "teal": 65, + "teal": 70, "source": 24, "pc": [ + 89, 90 ] }, { - "teal": 66, + "teal": 71, "source": 24, "pc": [ - 91, - 92, - 93 + 91 ] }, { - "teal": 70, + "teal": 74, "source": 24, - "errorMessage": "subtract.a must be greater than subtract.b", + "errorMessage": "argument 0 (inputs) for foo must be a ((uint64,uint64),(uint64,uint64))", "pc": [ - 94 + 92 ] }, { - "teal": 75, - "source": 26, + "teal": 77, + "source": 24, "pc": [ - 95, - 96, - 97, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105 + 93, + 94, + 95 ] }, { - "teal": 76, - "source": 26, + "teal": 78, + "source": 24, "pc": [ - 106, - 107 + 96 ] }, { - "teal": 77, - "source": 26, + "teal": 79, + "source": 24, "pc": [ - 108 + 97 ] }, { - "teal": 81, - "source": 27, + "teal": 80, + "source": 24, "pc": [ - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116 + 98 ] }, { - "teal": 82, - "source": 27, + "teal": 81, + "source": 24, "pc": [ - 117, - 118, - 119, - 120, - 121, - 122 + 99 ] }, { - "teal": 83, - "source": 27, + "teal": 85, + "source": 24, "pc": [ - 123 + 100, + 101, + 102 ] }, { "teal": 90, - "source": 30, + "source": 25, "pc": [ - 124, - 125 + 103, + 104 ] }, { "teal": 91, - "source": 30, + "source": 25, "pc": [ - 126, - 127, - 128 + 105, + 106, + 107 ] }, { "teal": 92, - "source": 30, + "source": 25, "pc": [ - 129 + 108 ] }, { "teal": 93, - "source": 30, + "source": 25, "pc": [ - 130, - 131 + 109, + 110 ] }, { "teal": 94, - "source": 30, + "source": 25, "pc": [ - 132, - 133, - 134 + 111, + 112, + 113 ] }, { "teal": 95, - "source": 30, + "source": 25, "pc": [ - 135 + 114 ] }, { "teal": 96, - "source": 30, + "source": 25, "pc": [ - 136 + 115 ] }, { "teal": 97, - "source": 30, + "source": 25, "pc": [ - 137 + 116, + 117, + 118 ] }, { - "teal": 98, - "source": 31, + "teal": 101, + "source": 25, + "errorMessage": "subtract.a must be greater than subtract.b", "pc": [ - 138, - 139 + 119 ] }, { - "teal": 99, - "source": 31, + "teal": 106, + "source": 27, "pc": [ - 140, - 141, - 142 + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130 ] }, { - "teal": 100, - "source": 31, + "teal": 107, + "source": 27, "pc": [ - 143 + 131, + 132 ] }, { - "teal": 101, - "source": 31, + "teal": 108, + "source": 27, "pc": [ - 144, - 145 + 133 ] }, { - "teal": 102, - "source": 31, + "teal": 112, + "source": 28, "pc": [ - 146, - 147, - 148 + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141 ] }, { - "teal": 103, - "source": 31, + "teal": 113, + "source": 28, "pc": [ - 149 + 142, + 143, + 144, + 145, + 146, + 147 ] }, { - "teal": 104, - "source": 31, + "teal": 114, + "source": 28, "pc": [ - 150 + 148 ] }, { - "teal": 105, + "teal": 121, "source": 31, "pc": [ - 151 + 149, + 150 ] }, { - "teal": 106, + "teal": 122, "source": 31, "pc": [ - 152 + 151, + 152, + 153 ] }, { - "teal": 107, - "source": 23, + "teal": 123, + "source": 31, "pc": [ - 153 + 154 ] }, { - "teal": 112, - "source": 35, + "teal": 124, + "source": 31, "pc": [ - 154, 155, 156 ] }, { - "teal": 113, - "source": 35, + "teal": 125, + "source": 31, "pc": [ - 157 + 157, + 158, + 159 ] }, { - "teal": 114, - "source": 35, + "teal": 126, + "source": 31, "pc": [ - 158 + 160 ] }, { - "teal": 118, - "source": 35, + "teal": 127, + "source": 31, "pc": [ - 159, - 160, 161 ] }, { - "teal": 122, - "source": 36, + "teal": 128, + "source": 31, "pc": [ - 162, - 163 + 162 ] }, { - "teal": 123, - "source": 36, + "teal": 129, + "source": 32, + "pc": [ + 163, + 164 + ] + }, + { + "teal": 130, + "source": 32, "pc": [ - 164, 165, 166, - 167, - 168, + 167 + ] + }, + { + "teal": 131, + "source": 32, + "pc": [ + 168 + ] + }, + { + "teal": 132, + "source": 32, + "pc": [ 169, - 170, + 170 + ] + }, + { + "teal": 133, + "source": 32, + "pc": [ 171, 172, 173 ] }, { - "teal": 124, - "source": 36, + "teal": 134, + "source": 32, + "pc": [ + 174 + ] + }, + { + "teal": 135, + "source": 32, "pc": [ - 174, 175 ] }, { - "teal": 125, - "source": 36, + "teal": 136, + "source": 32, "pc": [ 176 ] }, { - "teal": 129, - "source": 37, + "teal": 137, + "source": 32, + "pc": [ + 177 + ] + }, + { + "teal": 138, + "source": 24, "pc": [ - 177, 178 ] }, { - "teal": 130, - "source": 37, + "teal": 143, + "source": 36, "pc": [ 179, 180, - 181, - 182, - 183, - 184 + 181 ] }, { - "teal": 131, - "source": 37, + "teal": 144, + "source": 36, "pc": [ + 182 + ] + }, + { + "teal": 145, + "source": 36, + "pc": [ + 183 + ] + }, + { + "teal": 149, + "source": 36, + "pc": [ + 184, 185, - 186, - 187, - 188, - 189, - 190, - 191 + 186 ] }, { - "teal": 132, + "teal": 153, "source": 37, "pc": [ - 192 + 187, + 188 ] }, { - "teal": 136, - "source": 38, + "teal": 154, + "source": 37, "pc": [ + 189, + 190, + 191, + 192, 193, 194, 195, 196, 197, - 198, - 199, - 200 + 198 ] }, { - "teal": 137, - "source": 38, + "teal": 155, + "source": 37, "pc": [ - 201 + 199, + 200 ] }, { - "teal": 138, - "source": 38, + "teal": 156, + "source": 37, "pc": [ - 202 + 201 ] }, { - "teal": 139, + "teal": 160, "source": 38, "pc": [ + 202, 203 ] }, { - "teal": 140, + "teal": 161, "source": 38, "pc": [ 204, @@ -827,27 +928,33 @@ 206, 207, 208, - 209, - 210 + 209 ] }, { - "teal": 141, + "teal": 162, "source": 38, "pc": [ - 211 + 210, + 211, + 212, + 213, + 214, + 215, + 216 ] }, { - "teal": 145, + "teal": 163, + "source": 38, + "pc": [ + 217 + ] + }, + { + "teal": 167, "source": 39, "pc": [ - 212, - 213, - 214, - 215, - 216, - 217, 218, 219, 220, @@ -855,18 +962,54 @@ 222, 223, 224, - 225, - 226, - 227, - 228, + 225 + ] + }, + { + "teal": 168, + "source": 39, + "pc": [ + 226 + ] + }, + { + "teal": 169, + "source": 39, + "pc": [ + 227 + ] + }, + { + "teal": 170, + "source": 39, + "pc": [ + 228 + ] + }, + { + "teal": 171, + "source": 39, + "pc": [ 229, 230, 231, 232, 233, 234, - 235, - 236, + 235 + ] + }, + { + "teal": 172, + "source": 39, + "pc": [ + 236 + ] + }, + { + "teal": 176, + "source": 40, + "pc": [ 237, 238, 239, @@ -876,13 +1019,7 @@ 243, 244, 245, - 246 - ] - }, - { - "teal": 146, - "source": 39, - "pc": [ + 246, 247, 248, 249, @@ -900,159 +1037,331 @@ 261, 262, 263, - 264 + 264, + 265, + 266, + 267, + 268, + 269, + 270, + 271 ] }, { - "teal": 147, - "source": 39, + "teal": 177, + "source": 40, "pc": [ - 265 + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 288, + 289 ] }, { - "teal": 148, - "source": 35, + "teal": 178, + "source": 40, "pc": [ - 266 + 290 ] }, { - "teal": 151, - "source": 6, + "teal": 179, + "source": 36, "pc": [ - 267 + 291 ] }, { - "teal": 152, - "source": 6, + "teal": 184, + "source": 43, "pc": [ - 268 + 292 ] }, { - "teal": 155, - "source": 6, + "teal": 187, + "source": 43, "pc": [ - 269, - 270, - 271, - 272, - 273, - 274 + 293, + 294, + 295 ] }, { - "teal": 156, - "source": 6, + "teal": 188, + "source": 43, "pc": [ - 275, - 276, - 277 + 296 ] }, { - "teal": 157, - "source": 6, + "teal": 189, + "source": 43, "pc": [ - 278, - 279, - 280, - 281 + 297 ] }, { - "teal": 160, - "source": 6, + "teal": 190, + "source": 43, + "pc": [ + 298 + ] + }, + { + "teal": 191, + "source": 43, + "pc": [ + 299 + ] + }, + { + "teal": 194, + "source": 43, + "errorMessage": "argument 0 (input) for customType must be a (uint64)", + "pc": [ + 300 + ] + }, + { + "teal": 197, + "source": 43, + "pc": [ + 301, + 302, + 303 + ] + }, + { + "teal": 198, + "source": 43, + "pc": [ + 304 + ] + }, + { + "teal": 199, + "source": 43, + "pc": [ + 305 + ] + }, + { + "teal": 200, + "source": 43, + "pc": [ + 306 + ] + }, + { + "teal": 201, + "source": 43, + "pc": [ + 307 + ] + }, + { + "teal": 205, + "source": 43, + "pc": [ + 308, + 309, + 310 + ] + }, + { + "teal": 209, + "source": 44, + "pc": [ + 311, + 312 + ] + }, + { + "teal": 210, + "source": 43, + "pc": [ + 313 + ] + }, + { + "teal": 213, + "source": 7, + "pc": [ + 314 + ] + }, + { + "teal": 214, + "source": 7, + "pc": [ + 315 + ] + }, + { + "teal": 217, + "source": 7, + "pc": [ + 316, + 317, + 318, + 319, + 320, + 321 + ] + }, + { + "teal": 218, + "source": 7, + "pc": [ + 322, + 323, + 324 + ] + }, + { + "teal": 219, + "source": 7, + "pc": [ + 325, + 326, + 327, + 328 + ] + }, + { + "teal": 222, + "source": 7, "errorMessage": "this contract does not implement the given ABI method for create NoOp", "pc": [ - 282 + 329 ] }, { - "teal": 163, - "source": 6, + "teal": 225, + "source": 7, "pc": [ - 283, - 284, - 285, - 286, - 287, - 288 + 330, + 331, + 332, + 333, + 334, + 335 ] }, { - "teal": 164, - "source": 6, + "teal": 226, + "source": 7, "pc": [ - 289, - 290, - 291 + 336, + 337, + 338, + 339, + 340, + 341 ] }, { - "teal": 165, - "source": 6, + "teal": 227, + "source": 7, "pc": [ - 292, - 293, - 294, - 295 + 342, + 343, + 344, + 345, + 346, + 347 ] }, { - "teal": 168, - "source": 6, + "teal": 228, + "source": 7, + "pc": [ + 348, + 349, + 350 + ] + }, + { + "teal": 229, + "source": 7, + "pc": [ + 351, + 352, + 353, + 354, + 355, + 356, + 357, + 358 + ] + }, + { + "teal": 232, + "source": 7, "errorMessage": "this contract does not implement the given ABI method for call NoOp", "pc": [ - 296 + 359 ] }, { - "teal": 171, - "source": 6, + "teal": 235, + "source": 7, "pc": [ - 297, - 298, - 299, - 300, - 301, - 302 + 360, + 361, + 362, + 363, + 364, + 365 ] }, { - "teal": 172, - "source": 6, + "teal": 236, + "source": 7, "pc": [ - 303, - 304, - 305 + 366, + 367, + 368 ] }, { - "teal": 173, - "source": 6, + "teal": 237, + "source": 7, "pc": [ - 306, - 307, - 308, - 309 + 369, + 370, + 371, + 372 ] }, { - "teal": 176, - "source": 6, + "teal": 240, + "source": 7, "errorMessage": "this contract does not implement the given ABI method for call OptIn", "pc": [ - 310 + 373 ] } ], "clear": [] }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgovLyBUaGlzIFRFQUwgd2FzIGdlbmVyYXRlZCBieSBURUFMU2NyaXB0IHYwLjEwMy4wCi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9hbGdvcmFuZGZvdW5kYXRpb24vVEVBTFNjcmlwdAoKLy8gVGhpcyBjb250cmFjdCBpcyBjb21wbGlhbnQgd2l0aCBhbmQvb3IgaW1wbGVtZW50cyB0aGUgZm9sbG93aW5nIEFSQ3M6IFsgQVJDNCBdCgovLyBUaGUgZm9sbG93aW5nIGxpbmVzIG9mIFRFQUwgYXJlIHVzZWQgdG8gaW5pdGlhbGl6ZSB0ZW1wbGF0ZSB2YXJpYWJsZXMgaW4gc2NyYXRjaCBzbG90cwpwdXNoYnl0ZXMgVE1QTF9zb21lTnVtYmVyCmJ0b2kKc3RvcmUgMjAwCgovLyBUaGUgZm9sbG93aW5nIHRlbiBsaW5lcyBvZiBURUFMIGhhbmRsZSBpbml0aWFsIHByb2dyYW0gZmxvdwovLyBUaGlzIHBhdHRlcm4gaXMgdXNlZCB0byBtYWtlIGl0IGVhc3kgZm9yIGFueW9uZSB0byBwYXJzZSB0aGUgc3RhcnQgb2YgdGhlIHByb2dyYW0gYW5kIGRldGVybWluZSBpZiBhIHNwZWNpZmljIGFjdGlvbiBpcyBhbGxvd2VkCi8vIEhlcmUsIGFjdGlvbiByZWZlcnMgdG8gdGhlIE9uQ29tcGxldGUgaW4gY29tYmluYXRpb24gd2l0aCB3aGV0aGVyIHRoZSBhcHAgaXMgYmVpbmcgY3JlYXRlZCBvciBjYWxsZWQKLy8gRXZlcnkgcG9zc2libGUgYWN0aW9uIGZvciB0aGlzIGNvbnRyYWN0IGlzIHJlcHJlc2VudGVkIGluIHRoZSBzd2l0Y2ggc3RhdGVtZW50Ci8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2ggKmFiaV9yb3V0ZV9jdXN0b21TdHJ1Y3RNZXRob2QgKmFiaV9yb3V0ZV9mb28gKmFiaV9yb3V0ZV9jdXN0b21UeXBlCgoJLy8gdGhpcyBjb250cmFjdCBkb2VzIG5vdCBpbXBsZW1lbnQgdGhlIGdpdmVuIEFCSSBtZXRob2QgZm9yIGNhbGwgTm9PcAoJZXJyCgoqY2FsbF9PcHRJbjoKCW1ldGhvZCAib3B0SW5Ub0FwcGxpY2F0aW9uKCl2b2lkIgoJdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMAoJbWF0Y2ggKmFiaV9yb3V0ZV9vcHRJblRvQXBwbGljYXRpb24KCgkvLyB0aGlzIGNvbnRyYWN0IGRvZXMgbm90IGltcGxlbWVudCB0aGUgZ2l2ZW4gQUJJIG1ldGhvZCBmb3IgY2FsbCBPcHRJbgoJZXJy", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEw" }, "templateVariables": { diff --git a/tests/contracts/artifacts/ARC56TestNoTemplateVars.arc56_draft.json b/tests/contracts/artifacts/ARC56TestNoTemplateVars.arc56_draft.json index a51a845ce..4d829398c 100644 --- a/tests/contracts/artifacts/ARC56TestNoTemplateVars.arc56_draft.json +++ b/tests/contracts/artifacts/ARC56TestNoTemplateVars.arc56_draft.json @@ -51,14 +51,14 @@ "approval": [ { "teal": 1, - "source": 43, + "source": 48, "pc": [ 0 ] }, { "teal": 13, - "source": 43, + "source": 48, "pc": [ 1, 2 @@ -66,14 +66,14 @@ }, { "teal": 14, - "source": 43, + "source": 48, "pc": [ 3 ] }, { "teal": 15, - "source": 43, + "source": 48, "pc": [ 4, 5 @@ -81,14 +81,14 @@ }, { "teal": 16, - "source": 43, + "source": 48, "pc": [ 6 ] }, { "teal": 17, - "source": 43, + "source": 48, "pc": [ 7, 8 @@ -96,14 +96,14 @@ }, { "teal": 18, - "source": 43, + "source": 48, "pc": [ 9 ] }, { "teal": 19, - "source": 43, + "source": 48, "pc": [ 10, 11, @@ -135,7 +135,7 @@ }, { "teal": 23, - "source": 43, + "source": 48, "errorMessage": "The requested action is not implemented in this contract. Are you using the correct OnComplete? Did you set your app ID?", "pc": [ 36 @@ -143,7 +143,7 @@ }, { "teal": 26, - "source": 43, + "source": 48, "pc": [ 37, 38 @@ -151,14 +151,14 @@ }, { "teal": 27, - "source": 43, + "source": 48, "pc": [ 39 ] }, { "teal": 30, - "source": 43, + "source": 48, "pc": [ 40, 41, @@ -170,7 +170,7 @@ }, { "teal": 31, - "source": 43, + "source": 48, "pc": [ 46, 47, @@ -179,7 +179,7 @@ }, { "teal": 32, - "source": 43, + "source": 48, "pc": [ 49, 50, @@ -189,7 +189,7 @@ }, { "teal": 35, - "source": 43, + "source": 48, "errorMessage": "this contract does not implement the given ABI method for create NoOp", "pc": [ 53 diff --git a/tests/contracts/artifacts/ContractWithCustomStruct.approval.teal b/tests/contracts/artifacts/ContractWithCustomStruct.approval.teal new file mode 100644 index 000000000..eed512d86 --- /dev/null +++ b/tests/contracts/artifacts/ContractWithCustomStruct.approval.teal @@ -0,0 +1,74 @@ +#pragma version 10 + +// This TEAL was generated by TEALScript v0.103.0 +// https://github.com/algorandfoundation/TEALScript + +// This contract is compliant with and/or implements the following ARCs: [ ARC4 ] + +// The following ten lines of TEAL handle initial program flow +// This pattern is used to make it easy for anyone to parse the start of the program and determine if a specific action is allowed +// Here, action refers to the OnComplete in combination with whether the app is being created or called +// Every possible action for this contract is represented in the switch statement +// If the action is not implemented in the contract, its respective branch will be "*NOT_IMPLEMENTED" which just contains "err" +txn ApplicationID +! +int 6 +* +txn OnCompletion ++ +switch *call_NoOp *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *create_NoOp *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED + +*NOT_IMPLEMENTED: + // The requested action is not implemented in this contract. Are you using the correct OnComplete? Did you set your app ID? + err + +// customStructMethod((uint64))(uint64) +*abi_route_customStructMethod: + // The ABI return prefix + byte 0x151f7c75 + + // input: (uint64) + txna ApplicationArgs 1 + dup + len + int 8 + == + + // argument 0 (input) for customStructMethod must be a (uint64) + assert + + // execute customStructMethod((uint64))(uint64) + callsub customStructMethod + concat + log + int 1 + return + +// customStructMethod(input: AnotherCustomStruct): AnotherCustomStruct +customStructMethod: + proto 1 1 + + // tests/contracts/inheritance-external.algo.ts:21 + // return input; + frame_dig -1 // input: AnotherCustomStruct + retsub + +*abi_route_createApplication: + int 1 + return + +*create_NoOp: + method "createApplication()void" + txna ApplicationArgs 0 + match *abi_route_createApplication + + // this contract does not implement the given ABI method for create NoOp + err + +*call_NoOp: + method "customStructMethod((uint64))(uint64)" + txna ApplicationArgs 0 + match *abi_route_customStructMethod + + // this contract does not implement the given ABI method for call NoOp + err \ No newline at end of file diff --git a/tests/contracts/artifacts/ContractWithCustomStruct.arc32.json b/tests/contracts/artifacts/ContractWithCustomStruct.arc32.json new file mode 100644 index 000000000..dafac3db0 --- /dev/null +++ b/tests/contracts/artifacts/ContractWithCustomStruct.arc32.json @@ -0,0 +1,70 @@ +{ + "hints": { + "customStructMethod((uint64))(uint64)": { + "call_config": { + "no_op": "CALL" + } + }, + "createApplication()void": { + "call_config": { + "no_op": "CREATE" + } + } + }, + "bare_call_config": { + "no_op": "NEVER", + "opt_in": "NEVER", + "close_out": "NEVER", + "update_application": "NEVER", + "delete_application": "NEVER" + }, + "schema": { + "local": { + "declared": {}, + "reserved": {} + }, + "global": { + "declared": {}, + "reserved": {} + } + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgovLyBUaGlzIFRFQUwgd2FzIGdlbmVyYXRlZCBieSBURUFMU2NyaXB0IHYwLjEwMy4wCi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9hbGdvcmFu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WIKCiphYmlfcm91dGVfY3JlYXRlQXBwbGljYXRpb246CglpbnQgMQoJcmV0dXJuCgoqY3JlYXRlX05vT3A6CgltZXRob2QgImNyZWF0ZUFwcGxpY2F0aW9uKCl2b2lkIgoJdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMAoJbWF0Y2ggKmFiaV9yb3V0ZV9jcmVhdGVBcHBsaWNhdGlvbgoKCS8vIHRoaXMgY29udHJhY3QgZG9lcyBub3QgaW1wbGVtZW50IHRoZSBnaXZlbiBBQkkgbWV0aG9kIGZvciBjcmVhdGUgTm9PcAoJZXJyCgoqY2FsbF9Ob09wOgoJbWV0aG9kICJjdXN0b21TdHJ1Y3RNZXRob2QoKHVpbnQ2NCkpKHVpbnQ2NCkiCgl0eG5hIEFwcGxpY2F0aW9uQXJncyAwCgltYXRjaCAqYWJpX3JvdXRlX2N1c3RvbVN0cnVjdE1ldGhvZAoKCS8vIHRoaXMgY29udHJhY3QgZG9lcyBub3QgaW1wbGVtZW50IHRoZSBnaXZlbiBBQkkgbWV0aG9kIGZvciBjYWxsIE5vT3AKCWVycg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEw" + }, + "contract": { + "name": "ContractWithCustomStruct", + "desc": "", + "methods": [ + { + "name": "customStructMethod", + "args": [ + { + "name": "input", + "type": "(uint64)" + } + ], + "returns": { + "type": "(uint64)" + } + }, + { + "name": "createApplication", + "args": [], + "returns": { + "type": "void" + } + } + ] + } +} \ No newline at end of file diff --git a/tests/contracts/artifacts/ContractWithCustomStruct.arc4.json b/tests/contracts/artifacts/ContractWithCustomStruct.arc4.json new file mode 100644 index 000000000..895dc6e1f --- /dev/null +++ b/tests/contracts/artifacts/ContractWithCustomStruct.arc4.json @@ -0,0 +1,25 @@ +{ + "name": "ContractWithCustomStruct", + "desc": "", + "methods": [ + { + "name": "customStructMethod", + "args": [ + { + "name": "input", + "type": "(uint64)" + } + ], + "returns": { + "type": "(uint64)" + } + }, + { + "name": "createApplication", + "args": [], + "returns": { + "type": "void" + } + } + ] +} \ No newline at end of file diff --git a/tests/contracts/artifacts/ContractWithCustomStruct.arc56_draft.json b/tests/contracts/artifacts/ContractWithCustomStruct.arc56_draft.json new file mode 100644 index 000000000..aa423fedc --- /dev/null +++ b/tests/contracts/artifacts/ContractWithCustomStruct.arc56_draft.json @@ -0,0 +1,405 @@ +{ + "name": "ContractWithCustomStruct", + "desc": "", + "methods": [ + { + "name": "customStructMethod", + "args": [ + { + "name": "input", + "type": "(uint64)", + "struct": "AnotherCustomStruct" + } + ], + "returns": { + "type": "(uint64)", + "struct": "AnotherCustomStruct" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + } + }, + { + "name": "createApplication", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + } + } + ], + "arcs": [ + 4, + 56 + ], + "structs": { + "AnotherCustomStruct": [ + { + "name": "b", + "type": "uint64" + } + ] + }, + "state": { + "schema": { + "global": { + "bytes": 0, + "ints": 0 + }, + "local": { + "bytes": 0, + "ints": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": [ + { + "teal": 1, + "source": 19, + "pc": [ + 0, + 1, + 2, + 3 + ] + }, + { + "teal": 13, + "source": 19, + "pc": [ + 4, + 5 + ] + }, + { + "teal": 14, + "source": 19, + "pc": [ + 6 + ] + }, + { + "teal": 15, + "source": 19, + "pc": [ + 7, + 8 + ] + }, + { + "teal": 16, + "source": 19, + "pc": [ + 9 + ] + }, + { + "teal": 17, + "source": 19, + "pc": [ + 10, + 11 + ] + }, + { + "teal": 18, + "source": 19, + "pc": [ + 12 + ] + }, + { + "teal": 19, + "source": 19, + "pc": [ + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38 + ] + }, + { + "teal": 23, + "source": 19, + "errorMessage": "The requested action is not implemented in this contract. Are you using the correct OnComplete? Did you set your app ID?", + "pc": [ + 39 + ] + }, + { + "teal": 28, + "source": 20, + "pc": [ + 40, + 41, + 42, + 43, + 44, + 45 + ] + }, + { + "teal": 31, + "source": 20, + "pc": [ + 46, + 47, + 48 + ] + }, + { + "teal": 32, + "source": 20, + "pc": [ + 49 + ] + }, + { + "teal": 33, + "source": 20, + "pc": [ + 50 + ] + }, + { + "teal": 34, + "source": 20, + "pc": [ + 51, + 52 + ] + }, + { + "teal": 35, + "source": 20, + "pc": [ + 53 + ] + }, + { + "teal": 38, + "source": 20, + "errorMessage": "argument 0 (input) for customStructMethod must be a (uint64)", + "pc": [ + 54 + ] + }, + { + "teal": 41, + "source": 20, + "pc": [ + 55, + 56, + 57 + ] + }, + { + "teal": 42, + "source": 20, + "pc": [ + 58 + ] + }, + { + "teal": 43, + "source": 20, + "pc": [ + 59 + ] + }, + { + "teal": 44, + "source": 20, + "pc": [ + 60 + ] + }, + { + "teal": 45, + "source": 20, + "pc": [ + 61 + ] + }, + { + "teal": 49, + "source": 20, + "pc": [ + 62, + 63, + 64 + ] + }, + { + "teal": 53, + "source": 21, + "pc": [ + 65, + 66 + ] + }, + { + "teal": 54, + "source": 20, + "pc": [ + 67 + ] + }, + { + "teal": 57, + "source": 19, + "pc": [ + 68 + ] + }, + { + "teal": 58, + "source": 19, + "pc": [ + 69 + ] + }, + { + "teal": 61, + "source": 19, + "pc": [ + 70, + 71, + 72, + 73, + 74, + 75 + ] + }, + { + "teal": 62, + "source": 19, + "pc": [ + 76, + 77, + 78 + ] + }, + { + "teal": 63, + "source": 19, + "pc": [ + 79, + 80, + 81, + 82 + ] + }, + { + "teal": 66, + "source": 19, + "errorMessage": "this contract does not implement the given ABI method for create NoOp", + "pc": [ + 83 + ] + }, + { + "teal": 69, + "source": 19, + "pc": [ + 84, + 85, + 86, + 87, + 88, + 89 + ] + }, + { + "teal": 70, + "source": 19, + "pc": [ + 90, + 91, + 92 + ] + }, + { + "teal": 71, + "source": 19, + "pc": [ + 93, + 94, + 95, + 96 + ] + }, + { + "teal": 74, + "source": 19, + "errorMessage": "this contract does not implement the given ABI method for call NoOp", + "pc": [ + 97 + ] + } + ], + "clear": [] + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgovLyBUaGlzIFRFQUwgd2FzIGdlbmVyYXRlZCBieSBURUFMU2NyaXB0IHYwLjEwMy4wCi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9hbGdvcmFuZGZvdW5kYXRpb24vVEVBTFNjcmlwdAoKLy8gVGhpcyBjb250cmFjdCBpcyBjb21wbGlhbnQgd2l0aCBhbmQvb3IgaW1wbGVtZW50cyB0aGUgZm9sbG93aW5nIEFSQ3M6IFsgQVJDNCBdCgovLyBUaGUgZm9sbG93aW5nIHRlbiBsaW5lcyBvZiBURUFMIGhhbmRsZSBpbml0aWFsIHByb2dyYW0gZmxvdwovLyBUaGlzIHBhdHRlcm4gaXMgdXNlZCB0byBtYWtlIGl0IGVhc3kgZm9yIGFueW9uZSB0byBwYXJzZSB0aGUgc3RhcnQgb2YgdGhlIHByb2dyYW0gYW5kIGRldGVybWluZSBpZiBhIHNwZWNpZmljIGFjdGlvbiBpcyBhbGxvd2VkCi8vIEhlcmUsIGFjdGlvbiByZWZlcnMgdG8gdGhlIE9uQ29tcGxldGUgaW4gY29tYmluYXRpb24gd2l0aCB3aGV0aGVyIHRoZSBhcHAgaXMgYmVpbmcgY3JlYXRlZCBvciBjYWxsZWQKLy8gRXZlcnkgcG9zc2libGUgYWN0aW9uIGZvciB0aGlzIGNvbnRyYWN0IGlzIHJlcHJlc2VudGVkIGluIHRoZSBzd2l0Y2ggc3RhdGVtZW50Ci8vIElmIHRoZSBhY3Rpb24gaXMgbm90IGltcGxlbWVudGVkIGluIHRoZSBjb250cmFjdCwgaXRzIHJlc3BlY3RpdmUgYnJhbmNoIHdpbGwgYmUgIipOT1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oAjgH/xwA=", + "clear": "Cg==" + }, + "compilerInfo": { + "compiler": "algod", + "compilerVersion": { + "major": 3, + "minor": 25, + "patch": 0, + "commitHash": "9855f57c" + } + } +} \ No newline at end of file diff --git a/tests/contracts/artifacts/ContractWithCustomStruct.clear.teal b/tests/contracts/artifacts/ContractWithCustomStruct.clear.teal new file mode 100644 index 000000000..e9f1d65b3 --- /dev/null +++ b/tests/contracts/artifacts/ContractWithCustomStruct.clear.teal @@ -0,0 +1 @@ +#pragma version 10 \ No newline at end of file diff --git a/tests/contracts/inheritance-external.algo.ts b/tests/contracts/inheritance-external.algo.ts index 8bc082c97..36c049faa 100644 --- a/tests/contracts/inheritance-external.algo.ts +++ b/tests/contracts/inheritance-external.algo.ts @@ -12,3 +12,12 @@ export class ExternalContract extends Contract { return this.externalKey.value; } } + +export type CustomStruct = { a: uint64 }; +export type AnotherCustomStruct = { b: uint64 }; + +export class ContractWithCustomStruct extends Contract { + customStructMethod(input: AnotherCustomStruct): AnotherCustomStruct { + return input; + } +}