go-sdk 执行solidity合约 传参string[]的时候报错
// 设置指定 key 的数组值
function set(string memory key, string[] memory value) public {
data[key] = value;
} solidity是这样写的
然后我执行go-sdk的时候这样使用:
method := "set"
a := []string{"dsa", "das"}
dataByte, err := myAbi.Pack(method, "key", a)
if err != nil {
fmt.Println(err)
}
dataString := hex.EncodeToString(dataByte)
kvs := []*common.KeyValuePair{
{
Key: "data",
Value: []byte(dataString),
},
}
resp, err := cc.InvokeContract("ffb3d95fb80749c1f4613cec62a702b410315078", method, "", kvs, -1, true)
if err != nil {
fmt.Println(err)
}
但是会报错!求助
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information