-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.0版本solidity转java不支持结构体 #757
Comments
如果事件中定义了数组,solidity合约也是不能生成java类 |
Hi @shanyoufusu org.fisco-bcos.code-generator:bcos-code-generator:1.1.0-SNAPSHOT |
你好,在java-sdk-demo中引入compile('org.fisco-bcos.code-generator:bcos-code-generator:1.1.0-SNAPSHOT')后,java-sdk-demo分支不管是在main分支还是release-3.3.0分支下,仍然会有IndexOutOfBoundsException异常 |
确认在引入之后,java-sdk-demo删除已经编译的dist和build,重新生成。 |
是的,在确认删除dist和build目录后,重新生成仍然是不可以的,java-sdk-demo使用的分支是main,solcJ版本是0.5.2.2,bcos-code-generator版本是1.1.0-SNAPSHOT,fisco-bcos-java-sdk版本是3.2.0 |
在1.1.0SNAPSHOT版本中,这段代码还是存在 if (namedType.getInternalType().isEmpty()) { |
这里的代码没有问题。请提供会出现问题的测试合约(脱敏过后),上面提供的合约我在本地测试不会有问题。
|
在2.9.0版本,不管是java-sdk,console控制台以及java-sdk-demo都是可以将合约中的结构体转为java对象。升级到3.0后,再转换的过程中会出现集合索引越界的异常Index: 0, Size: 0。断点定位到出现问题的代码在如图位置
下面是我合约的部分代码
import "./Utils.sol";
contract InnerProductVerifier {
using Utils for uint256;
using Utils for Utils.G1Point;
}
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;
library Utils {
struct G1Point {
bytes32 x;
bytes32 y;
}
}
The text was updated successfully, but these errors were encountered: