fix: dynamic tuple encoding with boolean values #921
Annotations
6 errors and 1 warning
error: expect(received).toBe(expected):
tests/templates.test.ts#L89
Expected: "this is an error"
Received: undefined
at /home/runner/work/TEALScript/TEALScript/tests/templates.test.ts:89:40
|
error: expect(received).toEqual(expected):
tests/common.ts#L122
Expected: "#pragma version 10\nintcblock 0 1\n\n// This TEAL was generated by TEALScript v0.106.0\n// https://github.com/algorandfoundation/TEALScript\n\n// This contract is compliant with and/or implements the following ARCs: [ ARC4 ]\n\n// The following ten lines of TEAL handle initial program flow\n// 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\n// Here, action refers to the OnComplete in combination with whether the app is being created or called\n// Every possible action for this contract is represented in the switch statement\n// If the action is not implemented in the contract, its respective branch will be \"*NOT_IMPLEMENTED\" which just contains \"err\"\ntxn ApplicationID\n!\npushint 6\n*\ntxn OnCompletion\n+\nswitch *call_NoOp *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *create_NoOp *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED\n\n*NOT_IMPLEMENTED:\n\t// The requested action is not implemented in this contract. Are you using the correct OnComplete? Did you set your app ID?\n\terr\n\n// booleanLastInObj()(uint64,bool)\n*abi_route_booleanLastInObj:\n\t// The ABI return prefix\n\tpushbytes 0x151f7c75\n\n\t// execute booleanLastInObj()(uint64,bool)\n\tcallsub booleanLastInObj\n\tconcat\n\tlog\n\tintc 1 // 1\n\treturn\n\n// booleanLastInObj(): { n: uint64; b: boolean }\nbooleanLastInObj:\n\tproto 0 1\n\n\t// tests/contracts/abi.algo.ts:1265\n\t// return {\n\t// n: 1,\n\t// b: false,\n\t// };\n\tpushbytes 0x0000000000000001\n\tpushbytes 0x00\n\tintc 0 // 0\n\tdup\n\tsetbit\n\tconcat // HERE\n\tretsub\n\n*abi_route_createApplication:\n\tintc 1 // 1\n\treturn\n\n*create_NoOp:\n\tpushbytes 0xb8447b36 // method \"createApplication()void\"\n\ttxna ApplicationArgs 0\n\tmatch *abi_route_createApplication\n\n\t// this contract does not implement the given ABI method for create NoOp\n\terr\n\n*call_NoOp:\n\tpushbytes 0x66c890ca // method \"booleanLastInObj()(uint64,bool)\"\n\ttxna ApplicationArgs 0\n\tmatch *abi_route_booleanLastInObj\n\n\t// this contract does not implement the given ABI method for call NoOp\n\terr"
Received: "#pragma version 10\nintcblock 0 1\n\n// This TEAL was generated by TEALScript v0.106.0\n// https://github.com/algorandfoundation/TEALScript\n\n// This contract is compliant with and/or implements the following ARCs: [ ARC4 ]\n\n// The following ten lines of TEAL handle initial program flow\n// 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\n// Here, action refers to the OnComplete in combination with whether the app is being created or called\n// Every possible action for this contract is represented in the switch statement\n// If the action is not implemented in the contract, its respective branch will be \"*NOT_IMPLEMENTED\" which just contains \"err\"\ntxn ApplicationID\n!\npushint 6\n*\ntxn OnCompletion\n+\nswitch *call_NoOp *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *create_NoOp *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED\n\n*NOT_IMPLEMENTED:\n\t// The requested action is not implemented in this contract. Are you using the correct OnComplete? Did you set your app ID?\n\terr\n\n// booleanLastInObj()(uint64,bool)\n*abi_route_booleanLastInObj:\n\t// The ABI return prefix\n\tpushbytes 0x151f7c75\n\n\t// execute booleanLastInObj()(uint64,bool)\n\tcallsub booleanLastInObj\n\tconcat\n\tlog\n\tintc 1 // 1\n\treturn\n\n// booleanLastInObj(): { n: uint64; b: boolean }\nbooleanLastInObj:\n\tproto 0 1\n\n\t// tests/contracts/abi.algo.ts:1265\n\t// return {\n\t// n: 1,\n\t// b: false,\n\t// };\n\tpushbytes 0x0000000000000001\n\tpushbytes 0x00\n\tintc 0 // 0\n\tdup\n\tsetbit\n\tconcat\n\tretsub\n\n*abi_route_createApplication:\n\tintc 1 // 1\n\treturn\n\n*create_NoOp:\n\tpushbytes 0xb8447b36 // method \"createApplication()void\"\n\ttxna ApplicationArgs 0\n\t
|
error: expect(received).toEqual(expected):
tests/common.ts#L122
Expected: "#pragma version 10\nintcblock 0 1\nbytecblock 0x624d6170 0x\n\n// This TEAL was generated by TEALScript v0.106.0\n// https://github.com/algorandfoundation/TEALScript\n\n// This contract is compliant with and/or implements the following ARCs: [ ARC4 ]\n\n// The following ten lines of TEAL handle initial program flow\n// 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\n// Here, action refers to the OnComplete in combination with whether the app is being created or called\n// Every possible action for this contract is represented in the switch statement\n// If the action is not implemented in the contract, its respective branch will be \"*NOT_IMPLEMENTED\" which just contains \"err\"\ntxn ApplicationID\n!\npushint 6\n*\ntxn OnCompletion\n+\nswitch *call_NoOp *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *create_NoOp *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED\n\n*NOT_IMPLEMENTED:\n\t// The requested action is not implemented in this contract. Are you using the correct OnComplete? Did you set your app ID?\n\terr\n\n// nestedArrayInBox()(byte[4][],uint64,uint64,uint64,bool)\n*abi_route_nestedArrayInBox:\n\t// The ABI return prefix\n\tpushbytes 0x151f7c75\n\n\t// execute nestedArrayInBox()(byte[4][],uint64,uint64,uint64,bool)\n\tcallsub nestedArrayInBox\n\tconcat\n\tlog\n\tintc 1 // 1\n\treturn\n\n// nestedArrayInBox(): T10\nnestedArrayInBox:\n\tproto 0 1\n\n\t// tests/contracts/abi.algo.ts:1641\n\t// this.bMap('bMap').value = {\n\t// bytes4Array: ['abcd' as bytes<4>, 'efgh' as bytes<4>],\n\t// u64a: 1,\n\t// u64b: 2,\n\t// u64c: 3,\n\t// boolValue: false,\n\t// }\n\tbytec 0 // \"bMap\"\n\tdup\n\tbox_del\n\tpop\n\tbytec 1 // initial head\n\tbytec 1 // initial tail\n\tpushbytes 0x001a // initial head offset\n\tpushbytes 0x00026162636465666768\n\tcallsub *process_dynamic_tuple_element\n\tpushbytes 0x0000000000000001\n\tcallsub *process_static_tuple_element\n\tpushbytes 0x0000000000000002\n\tcallsub *process_static_tuple_element\n\tpushbytes 0x0000000000000003\n\tcallsub *process_static_tuple_element\n\tpushbytes 0x00\n\tintc 0 // 0\n\tdup\n\tsetbit\n\tcallsub *process_static_tuple_element\n\tpop // pop head offset\n\tconcat // concat head and tail\n\tbox_put\n\n\t// tests/contracts/abi.algo.ts:1649\n\t// return this.bMap('bMap').value;\n\tbytec 0 // \"bMap\"\n\tbox_get\n\n\t// box value does not exist: this.bMap('bMap').value\n\tassert\n\tretsub\n\n*abi_route_createApplication:\n\tintc 1 // 1\n\treturn\n\n*create_NoOp:\n\tpushbytes 0xb8447b36 // method \"createApplication()void\"\n\ttxna ApplicationArgs 0\n\tmatch *abi_route_createApplication\n\n\t// this contract does not implement the given ABI method for create NoOp\n\terr\n\n*call_NoOp:\n\tpushbytes 0xa07ca0c8 // method \"nestedArrayInBox()(byte[4][],uint64,uint64,uint64,bool)\"\n\ttxna ApplicationArgs 0\n\tmatch *abi_route_nestedArrayInBox\n\n\t// this contract does not implement the given ABI method for call NoOp\n\terr\n\n*process_static_tuple_element:\n\tproto 4 3\n\tframe_dig -4 // tuple head\n\tframe_dig -1 // element\n\tconcat\n\tframe_dig -3 // tuple tail\n\tframe_dig -2 // head offset\n\tretsub\n\n*process_dynamic_tuple_element:\n\tproto 4 3\n\tframe_dig -4 // tuple head\n\tframe_dig -2 // head offset\n\tconcat\n\tframe_bury -4 // tuple head\n\tframe_dig -1 // element\n\tdup\n\tlen\n\tframe_dig -2 // head offset\n\tbtoi\n\t+\n\titob\n\textract 6 2\n\tframe_bury -2 // head offset\n\tframe_dig -3 // tuple tail\n\tswap\n\tconcat\n\tframe_bury -3 // tuple tail\n\tframe_dig -4 // tuple head\n\tframe_dig -3 // tuple tail\n\tframe_dig -2 // head offset\n\tretsub"
Received: "#pragma version 10\nintcblock 0 1\nbytecblock 0x624d6170 0x\n\n// This TEAL was generated by TEALScript v0.106.0\n// https://github.com/algorandfoundation/TEALScript\n\n// This contract is compliant with and/or implements the following ARCs: [ ARC4 ]\n\n// The following ten lines of TEAL handle ini
|
error: expect(received).toEqual(expected):
tests/common.ts#L122
Expected: "#pragma version 10\nintcblock 0 1\nbytecblock 0x624d6170 0x\n\n// This TEAL was generated by TEALScript v0.106.0\n// https://github.com/algorandfoundation/TEALScript\n\n// This contract is compliant with and/or implements the following ARCs: [ ARC4 ]\n\n// The following ten lines of TEAL handle initial program flow\n// 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\n// Here, action refers to the OnComplete in combination with whether the app is being created or called\n// Every possible action for this contract is represented in the switch statement\n// If the action is not implemented in the contract, its respective branch will be \"*NOT_IMPLEMENTED\" which just contains \"err\"\ntxn ApplicationID\n!\npushint 6\n*\ntxn OnCompletion\n+\nswitch *call_NoOp *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *create_NoOp *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED\n\n*NOT_IMPLEMENTED:\n\t// The requested action is not implemented in this contract. Are you using the correct OnComplete? Did you set your app ID?\n\terr\n\n// nestedArrayInBoxLast()(uint64,uint64,uint64,bool,byte[4][])\n*abi_route_nestedArrayInBoxLast:\n\t// The ABI return prefix\n\tpushbytes 0x151f7c75\n\n\t// execute nestedArrayInBoxLast()(uint64,uint64,uint64,bool,byte[4][])\n\tcallsub nestedArrayInBoxLast\n\tconcat\n\tlog\n\tintc 1 // 1\n\treturn\n\n// nestedArrayInBoxLast(): T11\nnestedArrayInBoxLast:\n\tproto 0 1\n\n\t// tests/contracts/abi.algo.ts:1665\n\t// this.bMap('bMap').value = {\n\t// bytes4Array: ['abcd' as bytes<4>, 'efgh' as bytes<4>],\n\t// u64a: 1,\n\t// u64b: 2,\n\t// u64c: 3,\n\t// boolValue: false,\n\t// }\n\tbytec 0 // \"bMap\"\n\tdup\n\tbox_del\n\tpop\n\tbytec 1 // initial head\n\tbytec 1 // initial tail\n\tpushbytes 0x001a // initial head offset\n\tpushbytes 0x0000000000000001\n\tcallsub *process_static_tuple_element\n\tpushbytes 0x0000000000000002\n\tcallsub *process_static_tuple_element\n\tpushbytes 0x0000000000000003\n\tcallsub *process_static_tuple_element\n\tpushbytes 0x00\n\tintc 0 // 0\n\tdup\n\tsetbit\n\tcallsub *process_static_tuple_element\n\tpushbytes 0x00026162636465666768\n\tcallsub *process_dynamic_tuple_element\n\tpop // pop head offset\n\tconcat // concat head and tail\n\tbox_put\n\n\t// tests/contracts/abi.algo.ts:1673\n\t// return this.bMap('bMap').value;\n\tbytec 0 // \"bMap\"\n\tbox_get\n\n\t// box value does not exist: this.bMap('bMap').value\n\tassert\n\tretsub\n\n*abi_route_createApplication:\n\tintc 1 // 1\n\treturn\n\n*create_NoOp:\n\tpushbytes 0xb8447b36 // method \"createApplication()void\"\n\ttxna ApplicationArgs 0\n\tmatch *abi_route_createApplication\n\n\t// this contract does not implement the given ABI method for create NoOp\n\terr\n\n*call_NoOp:\n\tpushbytes 0x9528788b // method \"nestedArrayInBoxLast()(uint64,uint64,uint64,bool,byte[4][])\"\n\ttxna ApplicationArgs 0\n\tmatch *abi_route_nestedArrayInBoxLast\n\n\t// this contract does not implement the given ABI method for call NoOp\n\terr\n\n*process_static_tuple_element:\n\tproto 4 3\n\tframe_dig -4 // tuple head\n\tframe_dig -1 // element\n\tconcat\n\tframe_dig -3 // tuple tail\n\tframe_dig -2 // head offset\n\tretsub\n\n*process_dynamic_tuple_element:\n\tproto 4 3\n\tframe_dig -4 // tuple head\n\tframe_dig -2 // head offset\n\tconcat\n\tframe_bury -4 // tuple head\n\tframe_dig -1 // element\n\tdup\n\tlen\n\tframe_dig -2 // head offset\n\tbtoi\n\t+\n\titob\n\textract 6 2\n\tframe_bury -2 // head offset\n\tframe_dig -3 // tuple tail\n\tswap\n\tconcat\n\tframe_bury -3 // tuple tail\n\tframe_dig -4 // tuple head\n\tframe_dig -3 // tuple tail\n\tframe_dig -2 // head offset\n\tretsub"
Received: "#pragma version 10\nintcblock 0 1\nbytecblock 0x624d6170 0x\n\n// This TEAL was generated by TEALScript v0.106.0\n// https://github.com/algorandfoundation/TEALScript\n\n// This contract is compliant with and/or implements the following ARCs: [ ARC4 ]\n\n// The follow
|
error: expect(received).toEqual(expected):
tests/common.ts#L122
Expected: "#pragma version 10\nintcblock 0 1\nbytecblock 0x\n\n// This TEAL was generated by TEALScript v0.106.0\n// https://github.com/algorandfoundation/TEALScript\n\n// This contract is compliant with and/or implements the following ARCs: [ ARC4 ]\n\n// The following ten lines of TEAL handle initial program flow\n// 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\n// Here, action refers to the OnComplete in combination with whether the app is being created or called\n// Every possible action for this contract is represented in the switch statement\n// If the action is not implemented in the contract, its respective branch will be \"*NOT_IMPLEMENTED\" which just contains \"err\"\ntxn ApplicationID\n!\npushint 6\n*\ntxn OnCompletion\n+\nswitch *call_NoOp *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *create_NoOp *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED *NOT_IMPLEMENTED\n\n*NOT_IMPLEMENTED:\n\t// The requested action is not implemented in this contract. Are you using the correct OnComplete? Did you set your app ID?\n\terr\n\n// nestedArrayAlongsideBoolean()(byte[4][],uint64,uint64,uint64,bool)\n*abi_route_nestedArrayAlongsideBoolean:\n\t// The ABI return prefix\n\tpushbytes 0x151f7c75\n\n\t// execute nestedArrayAlongsideBoolean()(byte[4][],uint64,uint64,uint64,bool)\n\tcallsub nestedArrayAlongsideBoolean\n\tconcat\n\tlog\n\tintc 1 // 1\n\treturn\n\n// nestedArrayAlongsideBoolean(): T10\nnestedArrayAlongsideBoolean:\n\tproto 0 1\n\n\t// Push empty bytes after the frame pointer to reserve space for local variables\n\tbytec 0 // 0x\n\n\t// tests/contracts/abi.algo.ts:1703\n\t// o: T10 = {\n\t// bytes4Array: ['abcd' as bytes<4>, 'efgh' as bytes<4>],\n\t// u64a: 1,\n\t// u64b: 2,\n\t// u64c: 3,\n\t// boolValue: false,\n\t// }\n\tbytec 0 // initial head\n\tbytec 0 // initial tail\n\tpushbytes 0x001a // initial head offset\n\tpushbytes 0x00026162636465666768\n\tcallsub *process_dynamic_tuple_element\n\tpushbytes 0x0000000000000001\n\tcallsub *process_static_tuple_element\n\tpushbytes 0x0000000000000002\n\tcallsub *process_static_tuple_element\n\tpushbytes 0x0000000000000003\n\tcallsub *process_static_tuple_element\n\tpushbytes 0x00\n\tintc 0 // 0\n\tdup\n\tsetbit\n\tcallsub *process_static_tuple_element\n\tpop // pop head offset\n\tconcat // concat head and tail\n\tframe_bury 0 // o: T10\n\n\t// tests/contracts/abi.algo.ts:1711\n\t// return o;\n\tframe_dig 0 // o: T10\n\n\t// set the subroutine return value\n\tframe_bury 0\n\tretsub\n\n*abi_route_createApplication:\n\tintc 1 // 1\n\treturn\n\n*create_NoOp:\n\tpushbytes 0xb8447b36 // method \"createApplication()void\"\n\ttxna ApplicationArgs 0\n\tmatch *abi_route_createApplication\n\n\t// this contract does not implement the given ABI method for create NoOp\n\terr\n\n*call_NoOp:\n\tpushbytes 0xc49cb9a7 // method \"nestedArrayAlongsideBoolean()(byte[4][],uint64,uint64,uint64,bool)\"\n\ttxna ApplicationArgs 0\n\tmatch *abi_route_nestedArrayAlongsideBoolean\n\n\t// this contract does not implement the given ABI method for call NoOp\n\terr\n\n*process_static_tuple_element:\n\tproto 4 3\n\tframe_dig -4 // tuple head\n\tframe_dig -1 // element\n\tconcat\n\tframe_dig -3 // tuple tail\n\tframe_dig -2 // head offset\n\tretsub\n\n*process_dynamic_tuple_element:\n\tproto 4 3\n\tframe_dig -4 // tuple head\n\tframe_dig -2 // head offset\n\tconcat\n\tframe_bury -4 // tuple head\n\tframe_dig -1 // element\n\tdup\n\tlen\n\tframe_dig -2 // head offset\n\tbtoi\n\t+\n\titob\n\textract 6 2\n\tframe_bury -2 // head offset\n\tframe_dig -3 // tuple tail\n\tswap\n\tconcat\n\tframe_bury -3 // tuple tail\n\tframe_dig -4 // tuple head\n\tframe_dig -3 // tuple tail\n\tframe_dig -2 // head offset\n\tretsub"
Received: "#pragma version 10\nintcblock 0 1\nbytecblock 0x\n\n// This TEAL was generated by TEALScript v0.106.0\n// https://github.com/algorandfoundation/TEALScript\n\n// This contract is compliant with and/or implements the
|
test
Process completed with exit code 1.
|
test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|