-
Notifications
You must be signed in to change notification settings - Fork 2
/
types.go
54 lines (51 loc) · 1.13 KB
/
types.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
package ancon
import "github.com/ethereum/go-ethereum/accounts/abi"
func CreateMetadataAbiMethod() abi.Method {
addressType, _ := abi.NewType("address", "", nil)
//bytesAType, _ := abi.NewType("bytes[]", "", nil)
//bytesType, _ := abi.NewType("bytes", "", nil)
stringType, _ := abi.NewType("string", "", nil)
method := abi.NewMethod(
"CreateMetadata",
"CreateMetadata",
abi.Function,
"nonpayable",
false,
false,
abi.Arguments{abi.Argument{
Name: "owner",
Type: addressType,
Indexed: false,
}, abi.Argument{
Name: "did",
Type: stringType,
Indexed: false,
}, abi.Argument{
Name: "name",
Type: stringType,
Indexed: false,
}, abi.Argument{
Name: "description",
Type: stringType,
Indexed: false,
}, abi.Argument{
Name: "image",
Type: stringType,
Indexed: false,
}, abi.Argument{
Name: "parent",
Type: stringType,
Indexed: false,
}, abi.Argument{
Name: "sources",
Type: stringType,
Indexed: false,
}, abi.Argument{
Name: "links",
Type: stringType,
Indexed: false,
}},
abi.Arguments{},
)
return method
}