TypeError: Data location must be "memory" for return parameter in function, but none was given.
在用truffle编译智能合约时,报错 TypeError: Data location must be "memory" for return parameter in function, but none was given.这是由于solidity 0.5.0版本的更新导致的,只需要在address[16]后面加上memory就可以了。
即: function getAdopters() public view returns (address[16] memory) {
return adopters;
}
编译通过,美滋滋