Skip to content

Commit

Permalink
0.14.0 - Tuple refactor (#46)
Browse files Browse the repository at this point in the history
* storage prefix

* 0.13.0

* remove accidental import

* 0.14.0 - Tuple refactor (#45)

* replace err() with throw Error()

* subroutines for processing tuple elements

* remove scratch.oldTupleElement

* add tsconfig to tests/contracts/

* use Address instead of Account

* remove empty create

* WIP with a lot of TODOs

* getElementEnd WIP

* saving work WIP

* dynamicArrayInMiddleOfTuple

* DynamicArrayInMiddleOfTupl

* namedTuple

* staticStringArrayArg

* nestedTuple, es2020

* better dryrun()

* getTupleElement

* getElementHead

* save WIP

* save progress WIP

* passing literal access, non-update tests

* move dynamic element access

* updateDynamicElementInTupleWithSameLength

* updateDynamicArrayInMiddleOfTuple

* passing all update tests

* passing all tests

* remove dead code

* compile/run examples, add pre-commit script

* accessDynamicStringArray

* properly specify arrayType for custom types

* 0.14.0

* recompile contacts app
  • Loading branch information
joe-p authored Jun 17, 2023
1 parent 16226dc commit ed24564
Show file tree
Hide file tree
Showing 22 changed files with 10,781 additions and 8,287 deletions.
2 changes: 1 addition & 1 deletion examples/arc75/arc75_client.ts

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions examples/arc75/artifacts/ARC75.approval.teal
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,16 @@ deleteAppFromWhitelist:
// examples/arc75/arc75.algo.ts:102
// assert(spliced[0] === appID)
frame_dig -7 // spliced: uint64[]
store 0 // full array
int 0 // initial offset
int 0
int 8 // element length
* // element offset
int 8
* // acc * typeLength
+
int 2
+ // add two for length
load 0 // full array
swap
int 8
extract3
btoi
Expand Down
2 changes: 1 addition & 1 deletion examples/arc75/artifacts/ARC75.json

Large diffs are not rendered by default.

109 changes: 58 additions & 51 deletions examples/arc75/artifacts/ARC75.src_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -659,61 +659,68 @@
"657": 519,
"658": 519,
"659": 520,
"660": 521,
"661": 522,
"662": 523,
"663": 524,
"664": 525,
"665": 526,
"666": 527,
"667": 528,
"660": 520,
"661": 521,
"662": 522,
"663": 523,
"664": 524,
"665": 525,
"666": 526,
"667": 527,
"668": 528,
"669": 529,
"670": 530,
"671": 534,
"672": 534,
"673": 535,
"674": 535,
"675": 535,
"676": 536,
"677": 539,
"669": 528,
"670": 529,
"671": 530,
"672": 531,
"673": 532,
"674": 533,
"675": 533,
"676": 534,
"677": 535,
"678": 539,
"679": 540,
"679": 539,
"680": 540,
"681": 540,
"682": 541,
"682": 540,
"683": 541,
"684": 542,
"685": 543,
"686": 544,
"687": 544,
"688": 544,
"689": 547,
"690": 547,
"684": 544,
"685": 544,
"686": 545,
"687": 545,
"688": 545,
"689": 546,
"690": 546,
"691": 547,
"692": 547,
"693": 547,
"694": 547,
"695": 548,
"696": 548,
"697": 548,
"698": 548,
"699": 548,
"700": 548,
"701": 549,
"702": 549,
"703": 549,
"704": 549,
"705": 549,
"706": 549,
"707": 550,
"708": 550,
"709": 550,
"710": 550,
"711": 550,
"712": 550,
"713": 551,
"714": 551,
"715": 551,
"716": 552
"692": 548,
"693": 549,
"694": 549,
"695": 549,
"696": 552,
"697": 552,
"698": 552,
"699": 552,
"700": 552,
"701": 552,
"702": 553,
"703": 553,
"704": 553,
"705": 553,
"706": 553,
"707": 553,
"708": 554,
"709": 554,
"710": 554,
"711": 554,
"712": 554,
"713": 554,
"714": 555,
"715": 555,
"716": 555,
"717": 555,
"718": 555,
"719": 555,
"720": 556,
"721": 556,
"722": 556,
"723": 557
}
9 changes: 7 additions & 2 deletions examples/merkle/artifacts/MerkleTree.approval.teal
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,14 @@ for_1:
// examples/merkle/merkle.algo.ts:38
// elem = path[i]
frame_dig -2 // path: byte[33][3]
store 0 // full array
int 0 // initial offset
frame_dig -4 // i: uint64
int 33 // element length
* // element offset
int 33
* // acc * typeLength
+
load 0 // full array
swap
int 33
extract3
frame_bury -5 // elem: byte[33]
Expand Down
2 changes: 1 addition & 1 deletion examples/merkle/artifacts/MerkleTree.json

Large diffs are not rendered by default.

Loading

0 comments on commit ed24564

Please sign in to comment.