合同不使用ZKSYNC-SOLC编译。他们的ABI和字节码似乎被打印为错误

发布于 2025-01-28 13:01:25 字数 1728 浏览 3 评论 0原文

我非常陌生,对stackoverflow提出问题,因此,如果我还能提供其他东西,请在评论中告诉我!

我已经安装了Docker, @MatterLabs/Hardhat-Zksync-Solc, @MatterLabs/Hardhat-ZkSync-Deploy,Zksync-Web3,hardhat, @openzeppelin/openzeppelin/conternzeppelin/Contracts-upgraded, @openzeppelin/openzeppelin/conterests和其他所有内容。

一项简单的合同存储UINT和部署ERC20合同的合同汇总了罚款,但是我正在从事的项目并没有编译,而是打印出一个很长的错误,似乎是ABIS和该项目中每个合同的字节码。

这是错误的开始:

Error in plugin @matterlabs/hardhat-zksync-solc: {"contracts":{"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol":{"ERC1967Proxy":{"abi":[{"inputs":[{"internalType":"address","name":"_logic","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}],"evm":{"legacyAssembly":null,"bytecode":{"object":"0c0000040004000000010000000000000000ffffffffffffffff0000000000000c000004000400000000ffffffffffffffffffffffffffffffff0000000000000e000000000200000001000000000000000000000000000000000000000000001a020004000800000002000000000000000000000000000000000000000000000c000010001000000001000000000000000001000000000000000000000000000c00001000100

I am pretty new to development and asking questions on stackoverflow, so if there is something else I could provide, please tell me in comments!

I have installed docker, @matterlabs/hardhat-zksync-solc, @matterlabs/hardhat-zksync-deploy, zksync-web3, hardhat, @openzeppelin/contracts-upgradeable, @openzeppelin/contracts and everything else.

A simple contract that stores uint and deploys ERC20 contract compiles fine, but the project I am working on does not compile and instead prints a very long error that seem to be ABIs and bytecodes of every contract that is used in the project.

Here is the beginning of the error:

Error in plugin @matterlabs/hardhat-zksync-solc: {"contracts":{"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol":{"ERC1967Proxy":{"abi":[{"inputs":[{"internalType":"address","name":"_logic","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}],"evm":{"legacyAssembly":null,"bytecode":{"object":"0c0000040004000000010000000000000000ffffffffffffffff0000000000000c000004000400000000ffffffffffffffffffffffffffffffff0000000000000e000000000200000001000000000000000000000000000000000000000000001a020004000800000002000000000000000000000000000000000000000000000c000010001000000001000000000000000001000000000000000000000000000c00001000100

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浮世清欢 2025-02-04 13:01:25

您是否知道代码停止的时间,例如导致合同失败的特定行/方法/函数?

另一个选择是加入他们的不和谐,并在Dev Chat 这里。他们非常有帮助,并且对新开发人员有耐心。

Do you know at what point the code stops, like the specific line/method/function that is causing the contract to fail at compile?

Another option would be to join their discord and drop in on the dev chat here. They've been incredibly helpful and are patient with new devs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文