Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions data/transactions/logic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ Starting from version 2 TEAL evaluator can run programs in two modes:
2. Application run (stateful)

Differences between modes include:
1. Max program length (consensus parameters LogicSigMaxSize, MaxApprovalProgramLen and MaxClearStateProgramLen)
1. Max program length (consensus parameters LogicSigMaxSize, MaxAppProgramLen & MaxExtraAppProgramPages)
2. Max program cost (consensus parameters LogicSigMaxCost, MaxAppProgramCost)
3. Opcodes availability. For example, all stateful operations are only available in stateful mode. Refer to [opcodes document](TEAL_opcodes.md) for details.
3. Opcode availability. For example, all stateful operations are only available in stateful mode. Refer to [opcodes document](TEAL_opcodes.md) for details.

## Constants

Expand Down Expand Up @@ -214,8 +214,8 @@ Some of these have immediate data in the byte or bytes after the opcode.
| `store i` | pop a value from the stack and store to scratch space |
| `gload t i` | push Ith scratch space index of the Tth transaction in the current group |
| `gloads i` | push Ith scratch space index of the Ath transaction in the current group |
| `gaid t` | push the creatable ID of the Tth transaction in the current group |
| `gaids` | push the creatable ID of the Ath transaction in the current group |
| `gaid t` | push the ID of the asset or application created in the Tth transaction of the current group |
| `gaids` | push the ID of the asset or application created in the Ath transaction of the current group |

**Transaction Fields**

Expand Down
8 changes: 6 additions & 2 deletions data/transactions/logic/TEAL_opcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -550,19 +550,23 @@ The `gloads` opcode can only access scratch spaces of previous app calls contain
- Opcode: 0x3c
- Pops: _None_
- Pushes: uint64
- push the creatable ID of the Tth transaction in the current group
- push the ID of the asset or application created in the Tth transaction of the current group
- LogicSigVersion >= 4
- Mode: Application

The `gaid` opcode can only access the ID of assets or applications created by previous txns in the current group.

## gaids

- Opcode: 0x3d
- Pops: *... stack*, uint64
- Pushes: uint64
- push the creatable ID of the Ath transaction in the current group
- push the ID of the asset or application created in the Ath transaction of the current group
- LogicSigVersion >= 4
- Mode: Application

The `gaids` opcode can only access the ID of assets or applications created by previous txns in the current group.

## bnz target

- Opcode: 0x40 {int16 branch offset, big endian. (negative offsets are illegal before v4)}
Expand Down
6 changes: 4 additions & 2 deletions data/transactions/logic/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ var opDocByName = map[string]string{
"store": "pop a value from the stack and store to scratch space",
"gload": "push Ith scratch space index of the Tth transaction in the current group",
"gloads": "push Ith scratch space index of the Ath transaction in the current group",
"gaid": "push the creatable ID of the Tth transaction in the current group",
"gaids": "push the creatable ID of the Ath transaction in the current group",
"gaid": "push the ID of the asset or application created in the Tth transaction of the current group",
"gaids": "push the ID of the asset or application created in the Ath transaction of the current group",
"bnz": "branch to TARGET if value X is not zero",
"bz": "branch to TARGET if value X is zero",
"b": "branch unconditionally to TARGET",
Expand Down Expand Up @@ -200,6 +200,8 @@ var opDocExtras = map[string]string{
"gtxns": "for notes on transaction fields available, see `txn`. If top of stack is _i_, `gtxns field` is equivalent to `gtxn _i_ field`. gtxns exists so that _i_ can be calculated, often based on the index of the current transaction.",
"gload": "The `gload` opcode can only access scratch spaces of previous app calls contained in the current group.",
"gloads": "The `gloads` opcode can only access scratch spaces of previous app calls contained in the current group.",
"gaid": "The `gaid` opcode can only access the ID of assets or applications created by previous txns in the current group.",
"gaids": "The `gaids` opcode can only access the ID of assets or applications created by previous txns in the current group.",
"btoi": "`btoi` panics if the input is longer than 8 bytes.",
"concat": "`concat` panics if the result would be greater than 4096 bytes.",
"pushbytes": "pushbytes args are not added to the bytecblock during assembly processes",
Expand Down