forked from algorand/go-algorand-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabi.go
68 lines (51 loc) · 2.62 KB
/
abi.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package abi
import (
avm_abi "github.com/algorand/avm-abi/abi"
)
// Type is an ABI type
type Type = avm_abi.Type
// TypeOf returns the ABI type of a string representation of a type.
func TypeOf(str string) (Type, error) {
return avm_abi.TypeOf(str)
}
// MakeTupleType makes tuple ABI type by taking an array of tuple element types as argument.
func MakeTupleType(argumentTypes []Type) (Type, error) {
return avm_abi.MakeTupleType(argumentTypes)
}
// AnyTransactionType is the ABI argument type string for a nonspecific transaction argument
const AnyTransactionType = avm_abi.AnyTransactionType
// PaymentTransactionType is the ABI argument type string for a payment transaction argument
const PaymentTransactionType = avm_abi.PaymentTransactionType
// KeyRegistrationTransactionType is the ABI argument type string for a key registration transaction
// argument
const KeyRegistrationTransactionType = avm_abi.KeyRegistrationTransactionType
// AssetConfigTransactionType is the ABI argument type string for an asset configuration transaction
// argument
const AssetConfigTransactionType = avm_abi.AssetConfigTransactionType
// AssetTransferTransactionType is the ABI argument type string for an asset transfer transaction
// argument
const AssetTransferTransactionType = avm_abi.AssetTransferTransactionType
// AssetFreezeTransactionType is the ABI argument type string for an asset freeze transaction
// argument
const AssetFreezeTransactionType = avm_abi.AssetFreezeTransactionType
// ApplicationCallTransactionType is the ABI argument type string for an application call
// transaction argument
const ApplicationCallTransactionType = avm_abi.ApplicationCallTransactionType
// IsTransactionType checks if a type string represents a transaction type
// argument, such as "txn", "pay", "keyreg", etc.
func IsTransactionType(typeStr string) bool {
return avm_abi.IsTransactionType(typeStr)
}
// AccountReferenceType is the ABI argument type string for account references
const AccountReferenceType = avm_abi.AccountReferenceType
// AssetReferenceType is the ABI argument type string for asset references
const AssetReferenceType = avm_abi.AssetReferenceType
// ApplicationReferenceType is the ABI argument type string for application references
const ApplicationReferenceType = avm_abi.ApplicationReferenceType
// IsReferenceType checks if a type string represents a reference type argument,
// such as "account", "asset", or "application".
func IsReferenceType(typeStr string) bool {
return avm_abi.IsReferenceType(typeStr)
}
// VoidReturnType is the ABI return type string for a method that does not return any value
const VoidReturnType = avm_abi.VoidReturnType