Skip to content
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

console调用precompiled合约,报错Abi is empty #787

Open
ywy2090 opened this issue Aug 1, 2023 · 1 comment
Open

console调用precompiled合约,报错Abi is empty #787

ywy2090 opened this issue Aug 1, 2023 · 1 comment
Assignees
Labels
improve Improve ease of use v3.x

Comments

@ywy2090
Copy link
Collaborator

ywy2090 commented Aug 1, 2023

image

@ywy2090
Copy link
Collaborator Author

ywy2090 commented Aug 1, 2023

这里是因为预编译合约没有abi文件导致的,可以暂时采用下面的方法:

  • precompiled合约的地址需要补齐,加0x前缀,长度为42个字符,0x00000000........5003
  • 使用solc编译precompiled的接口声明文件 PaillierPrecompiled.sol
    ~/.fisco/solc/0.4.25/keccak256/solc --abi PaillierPrecompiled.sol

输出类似于下面:
image
Contract ABI JSON下面的内容为合约的ABI内容

  • console/contracts/.compiled/群组名/PaillierPrecompiled 目录下创建 mkdir 0x00000000........5003 目录(注意补齐长度为42字符),然后创建文件PaillierPrecompiled.abi,然后将上面的ABI的内容拷贝至这个文件
  • console上重新调用合约,注意合约地址应该使用补齐后的地址

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improve Improve ease of use v3.x
Projects
None yet
Development

No branches or pull requests

2 participants