contract Donate{
uint size = 0;
struct DonateInfo{
uint id;
uint value;
uint time;
}
DonateInfo[] public list;
function all() public returns (DonateInfo []){
return list;
}
}
执行all方法后报错
Failed to decode output: Error: Unsupported or invalid type: tuple
求大神解答
推荐你看一下这篇文章,专门讲solidity数组相关问题的:
Solidity字符串数组长度设置?
solidity 暂时不支持返回结构体数组,甚至不支持返回结构体