We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在使用TransactionDecoder解析event的时候,当解析带有数值类型的定长数组的参数错误Bug。
例如,定义如下函数:
event LogSetSArray(uint8[2] o, uint8[2] n); function getSArray() public returns (uint8[2]){ uint8[2] memory arr = [uint8(1),2]; emit LogSetSArray(arr, _uint8SArray); return arr; }
执行以后,会发现events解析为空,从控制台运行的结果就能看出来:
============================================================================================= [group:1]> deploy ComplexSol 1 "1" contract address: 0xec839b4a14c00ff2d002450599efd36e4819313d [group:1]> call ComplexSol 0xec839b4a14c00ff2d002450599efd36e4819313d getSArray transaction hash: 0xd65aa1a00ff469c158b8559d2d7e67673c7bc7dda86778a0fc3dabcd3db3ba8f --------------------------------------------------------------------------------------------- Output function: getSArray() return type: (uint8[2]) return value: ([1, 2]) --------------------------------------------------------------------------------------------- Event logs ---------------------------------------------------------------------------------------------
查看web3sdk代码,发现问题的原因出在StaticArrayReference的create2函数,里面只支持转换为256类的数值类型。这会导致event所build的method id与event logs里面的topic内容不一致,造成无法解析event的错误。
相反,在js版本的web3j里,不存在同样的bug。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在使用TransactionDecoder解析event的时候,当解析带有数值类型的定长数组的参数错误Bug。
例如,定义如下函数:
执行以后,会发现events解析为空,从控制台运行的结果就能看出来:
查看web3sdk代码,发现问题的原因出在StaticArrayReference的create2函数,里面只支持转换为256类的数值类型。这会导致event所build的method id与event logs里面的topic内容不一致,造成无法解析event的错误。
相反,在js版本的web3j里,不存在同样的bug。
The text was updated successfully, but these errors were encountered: