{"id":30199744,"url":"https://github.com/codingwithmanny/zkevm-viem","last_synced_at":"2025-08-13T08:41:45.836Z","repository":{"id":233414518,"uuid":"623973375","full_name":"codingwithmanny/zkevm-viem","owner":"codingwithmanny","description":"Demonstrating how to deploy a contract, read from it, write to it, read it logs from zkEVM Testnet using viem","archived":false,"fork":false,"pushed_at":"2023-04-06T18:50:14.000Z","size":20,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-04T06:55:50.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codingwithmanny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-04-05T13:30:33.000Z","updated_at":"2023-04-05T18:37:37.000Z","dependencies_parsed_at":"2024-04-16T05:03:09.750Z","dependency_job_id":"2fa492d5-c0db-4d4c-84ec-5b275dc252a4","html_url":"https://github.com/codingwithmanny/zkevm-viem","commit_stats":null,"previous_names":["codingwithmanny/zkevm-viem"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codingwithmanny/zkevm-viem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingwithmanny%2Fzkevm-viem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingwithmanny%2Fzkevm-viem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingwithmanny%2Fzkevm-viem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingwithmanny%2Fzkevm-viem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codingwithmanny","download_url":"https://codeload.github.com/codingwithmanny/zkevm-viem/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingwithmanny%2Fzkevm-viem/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270212064,"owners_count":24546100,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-08-13T08:41:41.665Z","updated_at":"2025-08-13T08:41:45.829Z","avatar_url":"https://github.com/codingwithmanny.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zkEVM Viem\n\nThis repository demonstrates how you can deploy, read, write, and view logs from zkEVM Testnet using viem.\n\n---\n\n## Requirements\n\n- NVM or Node v18.15.0 (Mandatory for fetch requests)\n- Wallet with zkEVM Testnet token (use [http://wallet.polygon.technology](http://wallet.polygon.technology) for briding)\n\n---\n\n## Getting Started\n\nInstall your dependencies:\n\n```bash\n# FROM: ./\n\npnpm install; # npm install;\n```\n\n### Set Wallet Private Key\n\n```bash\n# FROM: ./\n\ncp .env.example .env;\n```\n\n**File:** `./env`\n\n```toml\nWALLET_PRIVATE_KEY=\"\u003cYOUR_WALLET_PRIVATE_KEY\u003e\"\n```\n\n### Deploy Contract\n\n```bash\n# FROM: ./\n\npnpm contract:deploy; # npm run contract:deploy;\n\n# Expected Output:\n# Main Function\n#   {\n#     hash: '0xa6de910c8c215c5a3c974f6d611113186f88fc0f112a5d1a2aac0fddc82e166d'\n#   }\n#   {\n#     receipt: {\n#       root: '0xa9962c7da4d1e42a00b155099c9914a36f56f68da2c042f70f815c181ec958a2',\n#       cumulativeGasUsed: 497507n,\n#       logsBloom: '0x00000000000000000000000000000000008000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000',\n#       logs: [ [Object] ],\n#       status: 'success',\n#       transactionHash: '0xa6de910c8c215c5a3c974f6d611113186f88fc0f112a5d1a2aac0fddc82e166d',\n#       transactionIndex: 0,\n#       blockHash: '0x3dc7a407088b5e6e5e07c961d27580ab37eda69f2fb4a3ec806ac812ed010161',\n#       blockNumber: 538891n,\n#       gasUsed: 497507n,\n#       from: '0xb3f03b93f0bd65b960ee950d9afc6867d461c33f',\n#       to: null,\n#       contractAddress: '0xd375621d9fce7f04f971e696ed7f851a7cba0bc2',\n#       type: 'legacy',\n#       effectiveGasPrice: null\n#     }\n#   }\n#   Contract successfully deployed to 0xd375621d9fce7f04f971e696ed7f851a7cba0bc2\n```\n\nUpdate your `.env` file with the deployed contract address.\n\n**File:** `./env`\n\n```toml\nWALLET_PRIVATE_KEY=\"\u003cYOUR_WALLET_PRIVATE_KEY\u003e\"\nCONTRACT_ADDRESS=\"0xd375621d9fce7f04f971e696ed7f851a7cba0bc2\"\n```\n\n### Read Contract\n\n```bash\n# FROM: ./\n\npnpm contract:read; # npm run contract:read;\n\n# Expected Output:\n# Main Function\n#   { result: 'Hello from @codingwithmanny' }\n```\n\n### Write Contract\n\n```bash\n# FROM: ./\n\npnpm contract:write; # npm run contract:write;\n\n# Expected Output:\n# Main Function\n#   {\n#     hash: '0xc311ffb939286a1fe94413f24a749ca798f1d17e677fdc853524ac8f4c4bb75c'\n#   }\n#   {\n#     receipt: {\n#       root: '0xc02d96263ce56e822e0860f4e93fdcd8ed7c783660ef7c89200b44e3d878c48d',\n#       cumulativeGasUsed: 30669n,\n#       logsBloom: '0x00000000000000000000000000000000008000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000',\n#       logs: [ [Object] ],\n#       status: 'success',\n#       transactionHash: '0xc311ffb939286a1fe94413f24a749ca798f1d17e677fdc853524ac8f4c4bb75c',\n#       transactionIndex: 0,\n#       blockHash: '0x9a2adb19e1ebeee0723362b3d746275c3e6473931a6483e4ced4976e3c9ca709',\n#       blockNumber: 538900n,\n#       gasUsed: 30669n,\n#       from: '0xb3f03b93f0bd65b960ee950d9afc6867d461c33f',\n#       to: '0xd375621d9fce7f04f971e696ed7f851a7cba0bc2',\n#       contractAddress: null,\n#       type: 'legacy',\n#       effectiveGasPrice: null\n#     }\n#   }\n#   { result: 'Another greeting!' }\n```\n\n### Contract Logs\n\n```bash\n# FROM: ./\n\npnpm contract:logs; # npm run contract:logs;\n\n# Expected Output:\n# Main Function\n#   { blockNumber: 538905n }\n#   {\n#     logs: [\n#       {\n#         address: '0xd375621d9fce7f04f971e696ed7f851a7cba0bc2',\n#         topics: [Array],\n#         data: '0x000000000000000000000000b3f03b93f0bd65b960ee950d9afc6867d461c33f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001b48656c6c6f2066726f6d2040636f64696e67776974686d616e6e790000000000',\n#         blockNumber: 538891n,\n#         transactionHash: '0xa6de910c8c215c5a3c974f6d611113186f88fc0f112a5d1a2aac0fddc82e166d',\n#         transactionIndex: 0n,\n#         blockHash: '0x3dc7a407088b5e6e5e07c961d27580ab37eda69f2fb4a3ec806ac812ed010161',\n#         logIndex: 0n,\n#         removed: false,\n#         args: [Object],\n#         eventName: 'NewGreeting'\n#       },\n#       {\n#         address: '0xd375621d9fce7f04f971e696ed7f851a7cba0bc2',\n#         topics: [Array],\n#         data: '0x000000000000000000000000b3f03b93f0bd65b960ee950d9afc6867d461c33f00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000011416e6f74686572206772656574696e6721000000000000000000000000000000',\n#         blockNumber: 538900n,\n#         transactionHash: '0xc311ffb939286a1fe94413f24a749ca798f1d17e677fdc853524ac8f4c4bb75c',\n#         transactionIndex: 0n,\n#         blockHash: '0x9a2adb19e1ebeee0723362b3d746275c3e6473931a6483e4ced4976e3c9ca709',\n#         logIndex: 0n,\n#         removed: false,\n#         args: [Object],\n#         eventName: 'NewGreeting'\n#       }\n#     ]\n#   }\n#   {\n#     topics: {\n#       eventName: 'NewGreeting',\n#       args: {\n#         sender: '0xB3f03B93F0bd65B960EE950d9aFC6867D461C33f',\n#         message: 'Hello from @codingwithmanny'\n#       }\n#     }\n#   }\n```\n\n---\n\nbuilt by [@codingwithmanny](https://twitter.com/codingwithmanny)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingwithmanny%2Fzkevm-viem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodingwithmanny%2Fzkevm-viem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingwithmanny%2Fzkevm-viem/lists"}