我总共有两个问题
问题1:请告诉我为什么会这样:
pragma solidity ^0.5.0;
contract con1 {
byte[100][] a;
bytes32[] b;
function getArrays () public view returns (byte[100][] memory arr_a, bytes32[] memory arr_b) {
return (a, b);
}
}
并且这不会(不添加实用注释实验行)
pragma solidity ^0.5.0;
contract con1 {
function getArrays () public view returns (byte[100][] memory arr_a, bytes32[] memory arr_b) {}
}
contract con2 {
byte[100][] a;
bytes32[] b;
con1 iCon1;
constructor(address _c1) public {
iCon1 = con1(_c1);
}
function getArrays () public view returns (byte[100][] memory arr_a, bytes32[] memory arr_b) {
return iCon1.getArrays();
}
}
给出以下错误:
Dynamic exception type: boost::exception_detail::clone_impl<langutil::UnimplementedFeatureError>
std::exception::what: Nested memory arrays not yet implemented here.
[dev::tag_comment*] = Nested memory arrays not yet implemented here.
问题2:
添加后它确实会编译-实用的实验性ABIEncoderV2;
请告诉我,针对此特定功能使用实验性功能会有多大的风险。数量不多,只是从另一个合约返回具有1个固定长度的2d数组。