{"id":19762826,"url":"https://github.com/dutterbutter/zksync-layer0-example","last_synced_at":"2025-07-16T14:41:40.477Z","repository":{"id":198592524,"uuid":"701120163","full_name":"dutterbutter/zksync-layer0-example","owner":"dutterbutter","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-06T13:23:09.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T23:42:50.146Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dutterbutter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-06T00:52:53.000Z","updated_at":"2023-10-06T00:54:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6ba9ec6-2b26-43a7-b40f-c862887cf4f6","html_url":"https://github.com/dutterbutter/zksync-layer0-example","commit_stats":null,"previous_names":["dutterbutter/zksync-layer0-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dutterbutter%2Fzksync-layer0-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dutterbutter%2Fzksync-layer0-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dutterbutter%2Fzksync-layer0-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dutterbutter%2Fzksync-layer0-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dutterbutter","download_url":"https://codeload.github.com/dutterbutter/zksync-layer0-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241094698,"owners_count":19908686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T04:07:11.316Z","updated_at":"2025-02-28T03:27:27.091Z","avatar_url":"https://github.com/dutterbutter.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌐 OmniCounter Example using LayerZero and zkSync \n\nLearn how to send a cross-chain message from `optimism-goerli` to `zksync-testnet`.\n\n## 🛠 Installation\n\n### Prerequisites\n1. NodeJS \u0026 Yarn installed.\n2. Wallets funded on both `optimism-goerli` and `zksync-testnet` networks.\n\n### Install Dependencies\nRun the following command to install required dependencies:\n```bash\nyarn install\n```\n\n### Environment Setup\nCreate a `.env` file at the project root with your `PRIVATE_KEY`:\n```env\nPRIVATE_KEY=\"\"\n```\n\n## 🚀 Example\n\nOmniCounter is a simplistic contract that incorporates a counter. The only way to increment this counter is *remotely*!\n\n### Step 1: Deploy OmniCounters\n\nDeploy the contract on both networks:\n\n```bash\nnpx hardhat --network zksync-testnet deploy --tags OmniCounter\nnpx hardhat --network optimism-goerli deploy --tags OmniCounter\n```\n\n### Step 2: Configure Remote Addresses\n\nNavigate to the `setTrustedRemote.js` file under `/tasks` and add the zkSync deployed address to the following field:\n```\nconst ZKSYNC_OMNICOUNTER = \"YOUR-ZKSYNC-DEPLOYED-OMNICOUNTER-ADDRESS\n```\n\nEstablish trust between contracts to enable message reception:\n\n```bash\nnpx hardhat --network zksync-testnet setTrustedRemote --target-network optimism-goerli --contract OmniCounter\nnpx hardhat --network optimism-goerli setTrustedRemote --target-network zksync-testnet --contract OmniCounter\n```\n\n### Step 3: Send Cross-Chain Message\n\nTime to send a cross-chain message from `optimism-goerli` to `zksync-testnet`:\n\n```bash\nnpx hardhat --network optimism-goerli incrementCounter --target-network zksync-testnet\n```\n\n## 🌐 Official Links\n\n- 🌍 [Website](https://zksync.io/)\n- 📚 [Documentation](https://v2-docs.zksync.io/dev/)\n- 🖥 [GitHub](https://github.com/matter-labs)\n- 🐦 [Twitter](https://twitter.com/zksync)\n- 💬 [Discord](https://discord.gg/nMaPGrDDwk)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdutterbutter%2Fzksync-layer0-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdutterbutter%2Fzksync-layer0-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdutterbutter%2Fzksync-layer0-example/lists"}