Welcome to the ZKsync Remix Plugin repository! 🎉
This tool seamlessly integrates with the Remix IDE, enabling developers to effortlessly deploy and interact with ZKsync contracts.
Table of Contents
If you're looking to utilize the capabilities of ZKsync contracts within the Remix IDE, you've come to the right place. This section provides you with a straightforward guide to get started.
-
Installation: Get excited, folks, no complicated installations needed here! If you're a user, all you have to do is head over to the Remix IDE and locate the ZKsync Remix Plugin in the plugins section. Want to make it even simpler? Click right through to Remix using this direct link and you're good to go! 🎉
-
Usage: Once the plugin is activated, you'll find a user-friendly interface that allows you to deploy and interact with ZKsync contracts. Follow the on-screen prompts and tooltips for an effortlessly smooth experience!
-
Feedback: Your feedback is invaluable to us 🌟! If you encounter any issues or have game-changing suggestions, don't hesitate to reach out through our Community Forum. Let's make something awesome together! 🤝
Our API is built with Rocket, a web framework for Rust. So, you'll need to get Rust and Cargo on your machine to get started. 🛠️
The easiest way to install Rust and Cargo is by using rustup. It's the recommended tool for managing Rust versions and associated tools for your project.
Then:
cd api
cd hardhat_env
yarn
cd ..
VITE_URL=http://localhost:3000 cargo run
Note: By default, the crate version will be used to represent the version of the backend. It's possible to override it
via SERVICE_VERSION
environment variable, but it's not recommended.
The plugin it self is a React project, you'll need to install pnpm.
cd plugin;
pnpm install;
Firstly, you need to define ENV variables for the server:
- VITE_URL=http://localhost:3000 - the address of the UI
And ENV variables for the plugin:
- API_SERVICE_URL="http://127.0.0.1:8000" - the address of the API
- WALLETCONNECT_PROJECT_ID=<your_walletconnect_project_id> - the project id for WalletConnect
- ZKSYNC_DEVNET_URL="https://zksync-devnet.nethermind.dev" - the address of the ZKsync devnet
Note: By default, the package version will be used to represent the version of the plugin. It's possible to override it
via VITE_VERSION
environment variable, but it's not recommended.
You need to be running both the server and the plugin in order to have a working environment.
For your dev environment:
cd plugin;
pnpm run start;
For an optimized build (will not listen to changes):
pnpm run deploy;
pnpm run serve;
cd api
cd hardhat_env
yarn
cd ..
VITE_URL=http://localhost:3000 cargo run
or alternatively, you can run the server in watch mode (with cargo watch
):
cargo install cargo-watch;
cargo watch -x run;
In Remix, go to the Plugin Manager
at the bottom of the left panel, and click
on Connect to a Local Plugin
.
Then, chose a name for the plugin, and in the URL
field, enter http://localhost:3000
, the Type of Connection
should iframe
and the Location in remix
Side Panel
and click on Ok
.
You should be all set to see the magic happen! Activate the plugin and it should now be visible and ready to be hacked with! 🚀
Feel free to contribute! Spotted any issues? Head on over to our good first issues or read through our Contribution Guidelines to get started. 📝
We're thrilled for you to experience the ZKsync Remix Plugin, and we can't wait to see the inventive ways you'll engage with ZKsync contracts! Happy coding! 💡
This repository is based on the work done by Nethermind team.