Skip to content

Commit 923cc5f

Browse files
committed
Fix incorrect gaid and gaids docs
1 parent 6465943 commit 923cc5f

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

data/transactions/logic/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ Starting from version 2 TEAL evaluator can run programs in two modes:
3636
2. Application run (stateful)
3737

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

4343
## Constants
4444

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

220220
**Transaction Fields**
221221

data/transactions/logic/TEAL_opcodes.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,19 +550,23 @@ The `gloads` opcode can only access scratch spaces of previous app calls contain
550550
- Opcode: 0x3c
551551
- Pops: _None_
552552
- Pushes: uint64
553-
- push the creatable ID of the Tth transaction in the current group
553+
- push the ID of the asset or application created in the Tth transaction of the current group
554554
- LogicSigVersion >= 4
555555
- Mode: Application
556556

557+
The `gaid` opcode can only access the ID of assets or applications created by previous txns in the current group.
558+
557559
## gaids
558560

559561
- Opcode: 0x3d
560562
- Pops: *... stack*, uint64
561563
- Pushes: uint64
562-
- push the creatable ID of the Ath transaction in the current group
564+
- push the ID of the asset or application created in the Ath transaction of the current group
563565
- LogicSigVersion >= 4
564566
- Mode: Application
565567

568+
The `gaids` opcode can only access the ID of assets or applications created by previous txns in the current group.
569+
566570
## bnz target
567571

568572
- Opcode: 0x40 {int16 branch offset, big endian. (negative offsets are illegal before v4)}

data/transactions/logic/doc.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ var opDocByName = map[string]string{
9090
"store": "pop a value from the stack and store to scratch space",
9191
"gload": "push Ith scratch space index of the Tth transaction in the current group",
9292
"gloads": "push Ith scratch space index of the Ath transaction in the current group",
93-
"gaid": "push the creatable ID of the Tth transaction in the current group",
94-
"gaids": "push the creatable ID of the Ath transaction in the current group",
93+
"gaid": "push the ID of the asset or application created in the Tth transaction of the current group",
94+
"gaids": "push the ID of the asset or application created in the Ath transaction of the current group",
9595
"bnz": "branch to TARGET if value X is not zero",
9696
"bz": "branch to TARGET if value X is zero",
9797
"b": "branch unconditionally to TARGET",
@@ -200,6 +200,8 @@ var opDocExtras = map[string]string{
200200
"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.",
201201
"gload": "The `gload` opcode can only access scratch spaces of previous app calls contained in the current group.",
202202
"gloads": "The `gloads` opcode can only access scratch spaces of previous app calls contained in the current group.",
203+
"gaid": "The `gaid` opcode can only access the ID of assets or applications created by previous txns in the current group.",
204+
"gaids": "The `gaids` opcode can only access the ID of assets or applications created by previous txns in the current group.",
203205
"btoi": "`btoi` panics if the input is longer than 8 bytes.",
204206
"concat": "`concat` panics if the result would be greater than 4096 bytes.",
205207
"pushbytes": "pushbytes args are not added to the bytecblock during assembly processes",

0 commit comments

Comments
 (0)