NethermindEth / zksync-remix-plugin

Remix plugin for zkSync
MIT License
13 stars 11 forks source link

Issue with zkSync Plugin: Contract Deployment Confirmation but Unable to Proceed #124

Closed juanc004 closed 2 months ago

juanc004 commented 3 months ago

Description of the Issue

While using the zkSync plugin on Remix, I encountered a problem. After deploying the contract, I received a green checkmark and confirmation of the contract deployment. However, in the deploy tab, the message "No contracts ready for deployment yet, compile a solidity contract" persisted. Despite repeatedly compiling the SimpleStorage contract and reinstalling the plugin, the issue remained unresolved.

Steps to Reproduce

  1. Write and compile the SimpleStorage contract.
  2. Deploy the contract using the zkSync plugin.
  3. Observe the confirmation message indicating successful deployment.
  4. Check the deploy tab for the status message.

Screenshot of the Issue

Screenshot 2024-06-28 at 11 39 24 AM

Troubleshooting Steps Taken

Request for Assistance

I would appreciate any guidance or solutions to resolve this issue, as I am unable to proceed with the project. If anyone has faced a similar problem or has suggestions on how to fix it, please let me know.

rangoc commented 3 months ago

Nothing helpful to add in terms of solution, except for the fact that I came across the same issue. Hoping this gets resolved soon! 🙏🏻

essnuked commented 3 months ago

nothing to add but i ran into the same issue

giorgiabes commented 3 months ago

Same issue

silentfoe commented 3 months ago

Nothing to add in terms of a fix but I ran into the same issue myself which led me here.

satyambnsal commented 3 months ago

@juanc004 @rangoc @essnuked @silentfoe I was trying to reproduce the issue, but failed to so. though really hard to tell what was the exact issue on your side, best guess is it might be local browser cache issue.

I've created a new issue to track the cache issue #126

Could you please try once more to see if the issue still persists ?

https://www.loom.com/share/92823ce63cf3465ca0e23130dd580272?sid=4e86a877-d999-4d1e-9cda-4f88f101703c

rangoc commented 3 months ago

@satyambnsal I've removed zksync plugin from my Remix IDE, and re-activated it...tried compiling again and compile process of contract goes through successfully but it still doesn't register it as deployable.

Here's a screenshot that might provide a bit of a more insight

Screenshot 2024-07-01 at 13 59 04
BowtiedHarpyEagle commented 3 months ago

@juanc004 @rangoc @essnuked @silentfoe I was trying to reproduce the issue, but failed to so. though really hard to tell what was the exact issue on your side, best guess is it might be local browser cache issue.

I've created a new issue to track the cache issue #126

Could you please try once more to see if the issue still persists ?

https://www.loom.com/share/92823ce63cf3465ca0e23130dd580272?sid=4e86a877-d999-4d1e-9cda-4f88f101703c

You are using a different contract from juanc004. He is using the solidity simple storage contract from here:

https://github.com/Cyfrin/remix-simple-storage-cu/blob/main/SimpleStorage.sol

The only change is on line 4, pragma solidity 0.8.24, supposedly that's the solidity version zksync plugin uses.

The template workspace contract 1_Storage.sol compiles and deploys without a problem. But the SimpleStorage.sol from cyfrin course doesn't.

I'm not sure if it is about the solidity version difference between the two files or what, but it is what it is.

I don't have a solution to the problem, I just wanted to help you guys replicate it, to hopefully help solve it.

I'll add my loom video of how one contract deploys, but the other doesn't, to hopefully provide some more information about the problem.

https://www.loom.com/share/1d464f6cca2749dcb04a795798651120

BowtiedHarpyEagle commented 3 months ago

I tested the SimpleStorage.sol contract with

pragma solidity >=0.8.2 <0.9.0;

and

pragma solidity ^0.8.19;

on line 4, thinking it may be about solidity version somehow. Still having the same issue, compiles, but does not deploy.

PatrickAlphaC commented 3 months ago

Ok. Try this. I have been able to reproduce the bug.

  1. Create a new workspace
  2. Select blank
  3. Swap to the workspace Add this contract to a new file:
// SPDX-License-Identifier: MIT

pragma solidity 0.8.24;

contract Hi {}
  1. Compile on the zksync remix plugin
  2. It will not show anything in the deploy area
MexicanAce commented 3 months ago

@satyambnsal I can confirm Patrick's repro steps above and that things only start to work when the *.sol files are within a contracts/ directory. Is there something hard-coded within the plugin expecting this folder structure?

satyambnsal commented 3 months ago

Now I'm also able to reproduce the issue. I see that the compile-async API is causing this issue. It expects the /contracts path in the contract filename in order to consider the file for compilation. We will get this fixed as soon as possible!

silentfoe commented 3 months ago

Now I'm also able to reproduce the issue. I see that the compile-async API is causing this issue. It expects the /contracts path in the contract filename in order to consider the file for compilation. We will get this fixed as soon as possible!

Thank you for the insight and the update! We appreciate your help and your hard work!

stranger80 commented 3 months ago

Please note that at the moment the Remix plugin replicates exactly the functionality of Hardhat, ie. the source code must reside in contracts workspace folder. If your selected .sol file is outside of that folder, it will not be submitted for compilation.

Realizing this is potentially confusing, we are refactoring the UX to explicitly list two compilation options - https://github.com/NethermindEth/zksync-remix-plugin/issues/128

PatrickAlphaC commented 3 months ago

Glad that helped all. I hate to ask, but is there an ETA on this? I'm getting a lot of reports of this as a new wave of junior devs is trying this flow, and are 100% getting frustrated.

varex83 commented 3 months ago

I think it will be ready in the next few days, but in the meantime everyone can compile their contracts just by placing them in the contracts directory, and everything will work fine!

satyambnsal commented 2 months ago

Fixed as part of 0.4.2 release.