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
* alphabet begone in favor of encoding
* unit test various padding and whitespace scenarios
* padding permutations also fail
* "Slicing" --> "Manipulation"
* fix the codegen fail?
* Documenting padding, whitespace, other character behavior
Copy file name to clipboardExpand all lines: data/transactions/logic/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,7 +165,7 @@ various sizes.
165
165
|`extract_uint16`| 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 |
166
166
|`extract_uint32`| 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 |
167
167
|`extract_uint64`| 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 |
168
-
|`base64_decode e`| decode X which was base64-encoded using _encoding alphabet_E. Fail if X is not base64 encoded with alphabet E |
168
+
|`base64_decode e`| decode X which was base64-encoded using _encoding_E. Fail if X is not base64 encoded with encoding E |
169
169
170
170
These opcodes take byte-array values that are interpreted as
171
171
big-endian unsigned integers. For mathematical operators, the
Copy file name to clipboardExpand all lines: data/transactions/logic/TEAL_opcodes.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -856,14 +856,14 @@ When A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on
856
856
857
857
## base64_decode e
858
858
859
-
- Opcode: 0x5c {uint8 alphabet index}
859
+
- Opcode: 0x5c {uint8 encoding index}
860
860
- Pops: *... stack*, []byte
861
861
- Pushes: []byte
862
-
- decode X which was base64-encoded using _encoding alphabet_E. Fail if X is not base64 encoded with alphabet E
862
+
- decode X which was base64-encoded using _encoding_E. Fail if X is not base64 encoded with encoding E
863
863
-**Cost**: 25
864
864
- LogicSigVersion >= 6
865
865
866
-
decodes X using the base64 encoding alphabet E. Specify the alphabet with an immediate arg either as URL and Filename Safe (`URLAlph`) or Standard (`StdAlph`). See <ahref="https://rfc-editor.org/rfc/rfc4648.html#section-4">RFC 4648</a> (sections 4 and 5)
866
+
Decodes X using the base64 encoding E. Specify the encoding with an immediate arg either as URL and Filename Safe (`URLEncoding`) or Standard (`StdEncoding`). See <ahref="https://rfc-editor.org/rfc/rfc4648.html#section-4">RFC 4648</a> (sections 4 and 5). It is assumed that the encoding ends with the exact number of `=` padding characters as required by the RFC. When padding occurs, any unused pad bits in the encoding must be set to zero or the decoding will fail. The special cases of `\n` and `\r` are allowed but completely ignored. An error will result when attempting to decode a string with a character that is not in the encoding alphabet or not one of `=`, `\r`, or `\n`.
Copy file name to clipboardExpand all lines: data/transactions/logic/doc.go
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -133,7 +133,7 @@ var opDocByName = map[string]string{
133
133
"extract_uint16": "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",
134
134
"extract_uint32": "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",
135
135
"extract_uint64": "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",
136
-
"base64_decode": "decode X which was base64-encoded using _encoding alphabet_ E. Fail if X is not base64 encoded with alphabet E",
136
+
"base64_decode": "decode X which was base64-encoded using _encoding_ E. Fail if X is not base64 encoded with encoding E",
137
137
138
138
"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.",
139
139
"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.",
@@ -231,7 +231,7 @@ var opcodeImmediateNotes = map[string]string{
231
231
"ecdsa_pk_decompress": "{uint8 curve index}",
232
232
"ecdsa_pk_recover": "{uint8 curve index}",
233
233
234
-
"base64_decode": "{uint8 alphabet index}",
234
+
"base64_decode": "{uint8 encoding index}",
235
235
}
236
236
237
237
// OpImmediateNote returns a short string about immediate data which follows the op byte
@@ -286,7 +286,7 @@ var opDocExtras = map[string]string{
286
286
"itxn_begin": "`itxn_begin` initializes Sender to the application address; Fee to the minimum allowable, taking into account MinTxnFee and credit from overpaying in earlier transactions; FirstValid/LastValid to the values in the top-level transaction, and all other fields to zero values.",
287
287
"itxn_field": "`itxn_field` fails if X is of the wrong type for F, including a byte array of the wrong size for use as an address when F is an address field. `itxn_field` also fails if X is an account or asset that does not appear in `txn.Accounts` or `txn.ForeignAssets` of the top-level transaction. (Setting addresses in asset creation are exempted from this requirement.)",
288
288
"itxn_submit": "`itxn_submit` resets the current transaction so that it can not be resubmitted. A new `itxn_begin` is required to prepare another inner transaction.",
289
-
"base64_decode": "decodes X using the base64 encoding alphabet E. Specify the alphabet with an immediate arg either as URL and Filename Safe (`URLAlph`) or Standard (`StdAlph`). See <a href=\"https://rfc-editor.org/rfc/rfc4648.html#section-4\">RFC 4648</a> (sections 4 and 5)",
289
+
"base64_decode": "Decodes X using the base64 encoding E. Specify the encoding with an immediate arg either as URL and Filename Safe (`URLEncoding`) or Standard (`StdEncoding`). See <a href=\"https://rfc-editor.org/rfc/rfc4648.html#section-4\">RFC 4648</a> (sections 4 and 5). It is assumed that the encoding ends with the exact number of `=` padding characters as required by the RFC. When padding occurs, any unused pad bits in the encoding must be set to zero or the decoding will fail. The special cases of `\\n` and `\\r` are allowed but completely ignored. An error will result when attempting to decode a string with a character that is not in the encoding alphabet or not one of `=`, `\\r`, or `\\n`.",
290
290
}
291
291
292
292
// OpDocExtra returns extra documentation text about an op
0 commit comments