summaryrefslogtreecommitdiff
path: root/data/abi/abi_type.go
diff options
context:
space:
mode:
Diffstat (limited to 'data/abi/abi_type.go')
-rw-r--r--data/abi/abi_type.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/data/abi/abi_type.go b/data/abi/abi_type.go
index eb93f9eea..353517027 100644
--- a/data/abi/abi_type.go
+++ b/data/abi/abi_type.go
@@ -457,3 +457,14 @@ func (t Type) ByteLen() (int, error) {
return -1, fmt.Errorf("%s is a dynamic type", t.String())
}
}
+
+// IsTransactionType checks if a type string represents a transaction type
+// argument, such as "txn", "pay", "keyreg", etc.
+func IsTransactionType(s string) bool {
+ switch s {
+ case "txn", "pay", "keyreg", "acfg", "axfer", "afrz", "appl":
+ return true
+ default:
+ return false
+ }
+}