Skip to content

Commit

Permalink
Merge pull request #549 from algorandfoundation/dev
Browse files Browse the repository at this point in the history
0.104.0: cblock creation in compiler
  • Loading branch information
joe-p authored Oct 21, 2024
2 parents f57ee5a + cef90dd commit 8fe99f6
Show file tree
Hide file tree
Showing 636 changed files with 71,611 additions and 236,450 deletions.
Binary file modified bun.lockb
Binary file not shown.
52 changes: 27 additions & 25 deletions examples/amm/tealscript_artifacts/ConstantProductAMM.approval.teal
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#pragma version 10
intcblock 0 10000000000 1 1000
bytecblock 0x 0x61 0x62 0x67 0x70 0x72

// This TEAL was generated by TEALScript v0.103.2
// This TEAL was generated by TEALScript v0.104.0
// https://github.com/algorandfoundation/TEALScript

// This contract is compliant with and/or implements the following ARCs: [ ARC4 ]
Expand All @@ -12,7 +14,7 @@
// If the action is not implemented in the contract, its respective branch will be "*NOT_IMPLEMENTED" which just contains "err"
txn ApplicationID
!
int 6
pushint 6
*
txn OnCompletion
+
Expand Down Expand Up @@ -54,17 +56,17 @@ doCreatePoolToken:
// configAssetReserve: this.app.address,
// });
itxn_begin
int acfg
pushint 3 // acfg
itxn_field TypeEnum

// examples/amm/amm.algo.ts:27
// configAssetName: 'DPT-' + aAsset.unitName + '-' + bAsset.unitName
byte 0x4450542d // "DPT-"
pushbytes 0x4450542d // "DPT-"
frame_dig -1 // aAsset: AssetID
asset_params_get AssetUnitName
pop
concat
byte 0x2d // "-"
pushbytes 0x2d // "-"
concat
frame_dig -2 // bAsset: AssetID
asset_params_get AssetUnitName
Expand All @@ -74,7 +76,7 @@ doCreatePoolToken:

// examples/amm/amm.algo.ts:28
// configAssetUnitName: 'dpt'
byte 0x647074 // "dpt"
pushbytes 0x647074 // "dpt"
itxn_field ConfigAssetUnitName

// examples/amm/amm.algo.ts:29
Expand All @@ -84,7 +86,7 @@ doCreatePoolToken:

// examples/amm/amm.algo.ts:30
// configAssetDecimals: 3
int 3
pushint 3
itxn_field ConfigAssetDecimals

// examples/amm/amm.algo.ts:31
Expand Down Expand Up @@ -117,7 +119,7 @@ doAxfer:
// assetAmount: amount,
// })
itxn_begin
int axfer
pushint 4 // axfer
itxn_field TypeEnum

// examples/amm/amm.algo.ts:38
Expand Down Expand Up @@ -309,7 +311,7 @@ tokensToSwap:

// examples/amm/amm.algo.ts:73
// factor = SCALE - FEE
int 995
pushint 995
frame_bury 0 // factor: uint64

// examples/amm/amm.algo.ts:74
Expand Down Expand Up @@ -353,7 +355,7 @@ tokensToSwap:
txna ApplicationArgs 1
dup
len
int 32
pushint 32
==

// argument 0 (governor) for set_governor must be a address
Expand Down Expand Up @@ -389,7 +391,7 @@ set_governor:
// bootstrap(pay,uint64,uint64)uint64
*abi_route_bootstrap:
// The ABI return prefix
byte 0x151f7c75
pushbytes 0x151f7c75

// bAsset: uint64
txna ApplicationArgs 2
Expand All @@ -405,7 +407,7 @@ set_governor:
-
dup
gtxns TypeEnum
int pay
int 1 // pay
==

// argument 2 (seed) for bootstrap must be a pay transaction
Expand Down Expand Up @@ -437,7 +439,7 @@ bootstrap:
// examples/amm/amm.algo.ts:85
// assert(globals.groupSize === 2)
global GroupSize
int 2
pushint 2
==
assert

Expand All @@ -455,7 +457,7 @@ bootstrap:
// verify amount
frame_dig -1 // seed: PayTxn
gtxns Amount
int 300_000
pushint 300_000
>=

// transaction verification failed: {"txn":"seed","field":"amount","condition":"greaterThanEqualTo","expected":">=300_000"}
Expand Down Expand Up @@ -524,19 +526,19 @@ bootstrap:
-
dup
gtxns TypeEnum
int axfer
pushint 4 // axfer
==

// argument 3 (bXfer) for mint must be a axfer transaction
assert

// aXfer: axfer
txn GroupIndex
int 2
pushint 2
-
dup
gtxns TypeEnum
int axfer
pushint 4 // axfer
==

// argument 4 (aXfer) for mint must be a axfer transaction
Expand Down Expand Up @@ -775,7 +777,7 @@ mint:
-
dup
gtxns TypeEnum
int axfer
pushint 4 // axfer
==

// argument 3 (poolXfer) for burn must be a axfer transaction
Expand Down Expand Up @@ -937,7 +939,7 @@ burn:
-
dup
gtxns TypeEnum
int axfer
pushint 4 // axfer
==

// argument 2 (swapXfer) for swap must be a axfer transaction
Expand Down Expand Up @@ -1087,19 +1089,19 @@ swap:
retsub

*create_NoOp:
method "createApplication()void"
pushbytes 0xb8447b36 // 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 "set_governor(address)void"
method "bootstrap(pay,uint64,uint64)uint64"
method "mint(axfer,axfer,uint64,uint64,uint64)void"
method "burn(axfer,uint64,uint64,uint64)void"
method "swap(axfer,uint64,uint64)void"
pushbytes 0xddc4cb4a // method "set_governor(address)void"
pushbytes 0x25e6c376 // method "bootstrap(pay,uint64,uint64)uint64"
pushbytes 0x10045c79 // method "mint(axfer,axfer,uint64,uint64,uint64)void"
pushbytes 0x028e37c1 // method "burn(axfer,uint64,uint64,uint64)void"
pushbytes 0x632aaed8 // method "swap(axfer,uint64,uint64)void"
txna ApplicationArgs 0
match *abi_route_set_governor *abi_route_bootstrap *abi_route_mint *abi_route_burn *abi_route_swap

Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 8fe99f6

Please sign in to comment.