diff --git a/data/transactions/logic/TEAL_opcodes.md b/data/transactions/logic/TEAL_opcodes.md
index a816146576..7a4d94ca1a 100644
--- a/data/transactions/logic/TEAL_opcodes.md
+++ b/data/transactions/logic/TEAL_opcodes.md
@@ -778,17 +778,6 @@ When A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on
Decodes A using the base64 encoding E. Specify the encoding with an immediate arg either as URL and Filename Safe (`URLEncoding`) or Standard (`StdEncoding`). See RFC 4648 (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`.
-## base64_decode e
-
-- Opcode: 0x5c {uint8 encoding index}
-- Pops: *... stack*, []byte
-- Pushes: []byte
-- decode X which was base64-encoded using _encoding_ E. Fail if X is not base64 encoded with encoding E
-- **Cost**: 25
-- LogicSigVersion >= 6
-
-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 RFC 4648 (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`.
-
## balance
- Opcode: 0x60
diff --git a/data/transactions/logic/doc.go b/data/transactions/logic/doc.go
index cd2db13c79..e64cd2cae4 100644
--- a/data/transactions/logic/doc.go
+++ b/data/transactions/logic/doc.go
@@ -482,10 +482,6 @@ var globalFieldDocs = map[string]string{
"CallerApplicationAddress": "The application address of the application that called this application. ZeroAddress if this application is at the top-level.",
}
-type extractor interface {
- getExtraFor(string) string
-}
-
func addExtra(original string, extra string) string {
if len(original) == 0 {
return extra
@@ -500,15 +496,6 @@ func addExtra(original string, extra string) string {
return original + sep + extra
}
-func fieldsDocWithExtra(source map[string]string, ex extractor) map[string]string {
- result := make(map[string]string, len(source))
- for name, doc := range source {
- extra := ex.getExtraFor(name)
- result[name] = addExtra(doc, extra)
- }
- return result
-}
-
// AssetHoldingFieldDocs are notes on fields available in `asset_holding_get`
var assetHoldingFieldDocs = map[string]string{
"AssetBalance": "Amount of the asset unit held by this account",
diff --git a/data/transactions/logic/fields.go b/data/transactions/logic/fields.go
index 9668f416d4..2f2794e29d 100644
--- a/data/transactions/logic/fields.go
+++ b/data/transactions/logic/fields.go
@@ -17,8 +17,6 @@
package logic
import (
- "fmt"
-
"github.com/algorand/go-algorand/data/transactions"
"github.com/algorand/go-algorand/protocol"
)
@@ -557,49 +555,24 @@ var base64EncodingSpecByName base64EncodingSpecMap
type base64EncodingSpecMap map[string]base64EncodingSpec
-func (s base64EncodingSpecMap) getExtraFor(name string) (extra string) {
- // Uses 6 here because base64_decode fields were introduced in 6
- if s[name].version > 6 {
- extra = fmt.Sprintf("Introduced v%d.", s[name].version)
- }
- return
+func (fs *base64EncodingSpec) Type() StackType {
+ return fs.ftype
}
-// Base64Encoding is an enum for the `base64decode` opcode
-type Base64Encoding int
-
-const (
- // URLEncoding represents the base64url encoding defined in https://www.rfc-editor.org/rfc/rfc4648.html
- URLEncoding Base64Encoding = iota
- // StdEncoding represents the standard encoding of the RFC
- StdEncoding
- invalidBase64Alphabet
-)
-
-// After running `go generate` these strings will be available:
-var base64EncodingNames [2]string = [...]string{URLEncoding.String(), StdEncoding.String()}
-
-type base64EncodingSpec struct {
- field Base64Encoding
- ftype StackType
- version uint64
+func (fs *base64EncodingSpec) OpVersion() uint64 {
+ return 6
}
-var base64EncodingSpecs = []base64EncodingSpec{
- {URLEncoding, StackBytes, 6},
- {StdEncoding, StackBytes, 6},
+func (fs *base64EncodingSpec) Version() uint64 {
+ return fs.version
}
-var base64EncodingSpecByField map[Base64Encoding]base64EncodingSpec
-var base64EncodingSpecByName base64EncodingSpecMap
-
-type base64EncodingSpecMap map[string]base64EncodingSpec
-
+func (fs *base64EncodingSpec) Note() string {
+ note := "" // no doc list?
+ return note
+}
func (s base64EncodingSpecMap) getExtraFor(name string) (extra string) {
// Uses 6 here because base64_decode fields were introduced in 6
- if s[name].version > 6 {
- extra = fmt.Sprintf("LogicSigVersion >= %d.", s[name].version)
- }
return
}