MCPcopy Create free account
hub / github.com/DNAProject/DNA / TestParseNativeParam

Function TestParseNativeParam

cmd/utils/native_param_test.go:33–108  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31)
32
33func TestParseNativeParam(t *testing.T) {
34 paramAbi := []*abi.NativeContractParamAbi{
35 {
36 Name: "Param1",
37 Type: "String",
38 },
39 {
40 Name: "Param2",
41 Type: "Int",
42 },
43 {
44 Name: "Param3",
45 Type: "Bool",
46 },
47 {
48 Name: "Param4",
49 Type: "Address",
50 },
51 {
52 Name: "Param5",
53 Type: "Uint256",
54 },
55 {
56 Name: "Param6",
57 Type: "Byte",
58 },
59 {
60 Name: "Param7",
61 Type: "ByteArray",
62 },
63 {
64 Name: "Param8",
65 Type: "Array",
66 SubType: []*abi.NativeContractParamAbi{
67 {
68 Name: "",
69 Type: "Int",
70 },
71 },
72 },
73 {
74 Name: "Param9",
75 Type: "Struct",
76 SubType: []*abi.NativeContractParamAbi{
77 {
78 Name: "Param9_0",
79 Type: "String",
80 },
81 {
82 Name: "Param9_1",
83 Type: "Int",
84 },
85 },
86 },
87 }
88 addr := common.Address([20]byte{})
89 address := addr.ToBase58()
90

Callers

nothing calls this directly

Calls 5

AddressTypeAlias · 0.92
NewParamsBuilderFunction · 0.92
ParseNativeFuncParamFunction · 0.85
ToBase58Method · 0.80
ErrorfMethod · 0.80

Tested by

no test coverage detected