You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drive the checking of whether tx_field can set a particular field in a table-driven way, rather than by simple switch. This is cleaner as we add functionality in later versions, and will allow generating the spec for tx_field.
Copy file name to clipboardExpand all lines: data/transactions/logic/README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,10 +148,10 @@ various sizes.
148
148
|`substring s e`| pop a byte-array A. For immediate values in 0..255 S and E: extract a range of bytes from A starting at S up to but not including E, push the substring result. If E < S, or either is larger than the array length, the program fails |
149
149
|`substring3`| pop a byte-array A and two integers B and C. Extract a range of bytes from A starting at B up to but not including C, push the substring result. If C < B, or either is larger than the array length, the program fails |
150
150
|`extract s l`| pop a byte-array A. For immediate values in 0..255 S and L: extract a range of bytes from A starting at S up to but not including S+L, push the substring result. If L is 0, then extract to the end of the string. If S or S+L is larger than the array length, the program fails |
151
-
|`extract3`| pop a byte-array A and two integers B and C. Extract a range of bytes from A starting at B up to but not including B+C, push the substring result. If B or B+C is larger than the array length, the program fails |
152
-
|`extract16bits`| pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+2, convert bytes as big endian and push the uint64 result. If B or B+2 is larger than the array length, the program fails |
153
-
|`extract32bits`| pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+4, convert bytes as big endian and push the uint64 result. If B or B+4 is larger than the array length, the program fails |
154
-
|`extract64bits`| pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+8, convert bytes as big endian and push the uint64 result. If B or B+8 is larger than the array length, the program fails |
151
+
|`extract3`| pop a byte-array A and two integers B and C. Extract a range of bytes from A starting at B up to but not including B+C, push the substring result. If B+C is larger than the array length, the program fails |
152
+
|`extract16bits`| pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+2, convert bytes as big endian and push the uint64 result. If B+2 is larger than the array length, the program fails |
153
+
|`extract32bits`| pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+4, convert bytes as big endian and push the uint64 result. If B+4 is larger than the array length, the program fails |
154
+
|`extract64bits`| pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+8, convert bytes as big endian and push the uint64 result. If B+8 is larger than the array length, the program fails |
155
155
156
156
These opcodes take byte-array values that are interpreted as
157
157
big-endian unsigned integers. For mathematical operators, the
@@ -197,9 +197,9 @@ The following opcodes allow for the construction and submission of
197
197
198
198
| Op | Description |
199
199
| --- | --- |
200
-
|`tx_begin`|Prepare a new application action|
201
-
|`tx_field f`| Set field F of the current application action|
202
-
|`tx_submit`| Execute the current application action. Panic on any failure. |
200
+
|`tx_begin`|Begin preparation of a new inner transaction|
201
+
|`tx_field f`| Set field F of the current inner transaction to X|
202
+
|`tx_submit`| Execute the current inner transaction. Panic on any failure. |
203
203
204
204
205
205
### Loading Values
@@ -390,7 +390,7 @@ App fields used in the `app_params_get` opcode.
390
390
|`dup`| duplicate last value on stack |
391
391
|`dup2`| duplicate two last values on stack: A, B -> A, B, A, B |
392
392
|`dig n`| push the Nth value from the top of the stack. dig 0 is equivalent to dup |
393
-
|`cover n`| remove top of stack, and place it down the stack such that N elements are above it |
393
+
|`cover n`| remove top of stack, and place it deeper in the stack such that N elements are above it |
394
394
|`uncover n`| remove the value at depth N in the stack and shift above items down so the Nth deep value is on top of the stack |
395
395
|`swap`| swaps two last values on stack: A, B -> B, A |
396
396
|`select`| selects one of two values based on top-of-stack: A, B, C -> (if C != 0 then B else A) |
- pop a byte-array A and two integers B and C. Extract a range of bytes from A starting at B up to but not including B+C, push the substring result. If B or B+C is larger than the array length, the program fails
756
+
- pop a byte-array A and two integers B and C. Extract a range of bytes from A starting at B up to but not including B+C, push the substring result. If B+C is larger than the array length, the program fails
757
757
- LogicSigVersion >= 5
758
758
759
759
## extract16bits
760
760
761
761
- Opcode: 0x59
762
762
- Pops: *... stack*, {[]byte A}, {uint64 B}
763
763
- Pushes: uint64
764
-
- pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+2, convert bytes as big endian and push the uint64 result. If B or B+2 is larger than the array length, the program fails
764
+
- pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+2, convert bytes as big endian and push the uint64 result. If B+2 is larger than the array length, the program fails
765
765
- LogicSigVersion >= 5
766
766
767
767
## extract32bits
768
768
769
769
- Opcode: 0x5a
770
770
- Pops: *... stack*, {[]byte A}, {uint64 B}
771
771
- Pushes: uint64
772
-
- pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+4, convert bytes as big endian and push the uint64 result. If B or B+4 is larger than the array length, the program fails
772
+
- pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+4, convert bytes as big endian and push the uint64 result. If B+4 is larger than the array length, the program fails
773
773
- LogicSigVersion >= 5
774
774
775
775
## extract64bits
776
776
777
777
- Opcode: 0x5b
778
778
- Pops: *... stack*, {[]byte A}, {uint64 B}
779
779
- Pushes: uint64
780
-
- pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+8, convert bytes as big endian and push the uint64 result. If B or B+8 is larger than the array length, the program fails
780
+
- pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+8, convert bytes as big endian and push the uint64 result. If B+8 is larger than the array length, the program fails
Copy file name to clipboardExpand all lines: data/transactions/logic/doc.go
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,7 @@ var opDocByName = map[string]string{
100
100
"dup": "duplicate last value on stack",
101
101
"dup2": "duplicate two last values on stack: A, B -> A, B, A, B",
102
102
"dig": "push the Nth value from the top of the stack. dig 0 is equivalent to dup",
103
-
"cover": "remove top of stack, and place it down the stack such that N elements are above it",
103
+
"cover": "remove top of stack, and place it deeper in the stack such that N elements are above it",
104
104
"uncover": "remove the value at depth N in the stack and shift above items down so the Nth deep value is on top of the stack",
105
105
"swap": "swaps two last values on stack: A, B -> B, A",
106
106
"select": "selects one of two values based on top-of-stack: A, B, C -> (if C != 0 then B else A)",
@@ -112,10 +112,10 @@ var opDocByName = map[string]string{
112
112
"getbyte": "pop a byte-array A and integer B. Extract the Bth byte of A and push it as an integer",
113
113
"setbyte": "pop a byte-array A, integer B, and small integer C (between 0..255). Set the Bth byte of A to C, and push the result",
114
114
"extract": "pop a byte-array A. For immediate values in 0..255 S and L: extract a range of bytes from A starting at S up to but not including S+L, push the substring result. If L is 0, then extract to the end of the string. If S or S+L is larger than the array length, the program fails",
115
-
"extract3": "pop a byte-array A and two integers B and C. Extract a range of bytes from A starting at B up to but not including B+C, push the substring result. If B or B+C is larger than the array length, the program fails",
116
-
"extract16bits": "pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+2, convert bytes as big endian and push the uint64 result. If B or B+2 is larger than the array length, the program fails",
117
-
"extract32bits": "pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+4, convert bytes as big endian and push the uint64 result. If B or B+4 is larger than the array length, the program fails",
118
-
"extract64bits": "pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+8, convert bytes as big endian and push the uint64 result. If B or B+8 is larger than the array length, the program fails",
115
+
"extract3": "pop a byte-array A and two integers B and C. Extract a range of bytes from A starting at B up to but not including B+C, push the substring result. If B+C is larger than the array length, the program fails",
116
+
"extract16bits": "pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+2, convert bytes as big endian and push the uint64 result. If B+2 is larger than the array length, the program fails",
117
+
"extract32bits": "pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+4, convert bytes as big endian and push the uint64 result. If B+4 is larger than the array length, the program fails",
118
+
"extract64bits": "pop a byte-array A and integer B. Extract a range of bytes from A starting at B up to but not including B+8, convert bytes as big endian and push the uint64 result. If B+8 is larger than the array length, the program fails",
119
119
120
120
"balance": "get balance for account A, in microalgos. The balance is observed after the effects of previous transactions in the group, and after the fee for the current transaction is deducted.",
121
121
"min_balance": "get minimum required balance for account A, in microalgos. Required balance is affected by [ASA](https://developer.algorand.org/docs/features/asa/#assets-overview) and [App](https://developer.algorand.org/docs/features/asc1/stateful/#minimum-balance-requirement-for-a-smart-contract) usage. When creating or opting into an app, the minimum balance grows before the app code runs, therefore the increase is visible there. When deleting or closing out, the minimum balance decreases after the app executes.",
@@ -152,9 +152,9 @@ var opDocByName = map[string]string{
152
152
"b~": "X with all bits inverted",
153
153
154
154
"log": "write bytes to log state of the current application",
155
-
"tx_begin": "Prepare a new application action",
156
-
"tx_field": "Set field F of the current application action",
157
-
"tx_submit": "Execute the current application action. Panic on any failure.",
155
+
"tx_begin": "Begin preparation of a new inner transaction",
156
+
"tx_field": "Set field F of the current inner transaction to X",
157
+
"tx_submit": "Execute the current inner transaction. Panic on any failure.",
158
158
159
159
"txnas": "push Xth value of the array field F of the current transaction",
160
160
"gtxnas": "push Xth value of the array field F from the Tth transaction in the current group",
0 commit comments