{"id":24532790,"url":"https://github.com/eltneg/dummy-ethers-zig","last_synced_at":"2026-05-19T01:32:20.780Z","repository":{"id":239013666,"uuid":"798252477","full_name":"eltNEG/dummy-ethers-zig","owner":"eltNEG","description":"Zig comptime implementation of Ether js contract initialization style","archived":false,"fork":false,"pushed_at":"2024-05-09T12:38:52.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T10:18:17.331Z","etag":null,"topics":["comptime","ethers","ethersjs","solidity","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/eltNEG.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,"publiccode":null,"codemeta":null}},"created_at":"2024-05-09T12:04:38.000Z","updated_at":"2024-05-09T12:38:55.000Z","dependencies_parsed_at":"2024-05-09T14:11:13.584Z","dependency_job_id":"09f1e168-e0fb-45f4-bb0e-db186b708925","html_url":"https://github.com/eltNEG/dummy-ethers-zig","commit_stats":null,"previous_names":["eltneg/dummy-ethers-zig"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eltNEG%2Fdummy-ethers-zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eltNEG%2Fdummy-ethers-zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eltNEG%2Fdummy-ethers-zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eltNEG%2Fdummy-ethers-zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eltNEG","download_url":"https://codeload.github.com/eltNEG/dummy-ethers-zig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243790969,"owners_count":20348387,"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":["comptime","ethers","ethersjs","solidity","zig"],"created_at":"2025-01-22T10:18:21.712Z","updated_at":"2026-05-19T01:32:15.752Z","avatar_url":"https://github.com/eltNEG.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ethers zig (dummy)\nIt implements the ethers js contract initialization style using zig comptime. This is a practice project built to master zig comptime. I recommend checking out [zabi](https://github.com/Raiden1411/zabi) if you are looking for somthing that works.\n\nEther js contract initialisation from the [doc](https://docs.ethers.org/v6/getting-started/#starting-contracts):\n```js\nabi = [\n  \"function decimals() view returns (string)\",\n  \"function symbol() view returns (string)\",\n  \"function balanceOf(address addr) view returns (uint)\"\n]\n\n// Create a contract\ncontract = new Contract(\"dai.tokens.ethers.eth\", abi, provider)\nsym = await contract.symbol()\n```\n\nEthers zig comptime contract initialisation:\n```js\nconst fns = [_][:0]const u8{\n    \"function decimals() view returns (string)\",\n    \"function symbol() view returns (string)\",\n    \"function balanceOf(address addr) view returns (uint)\",\n    \"function transfer(address to, uint amount)\",\n    \"event Transfer(address indexed from, address indexed to, uint amount)\",\n};\nconst contact = Contract(\u0026fns).init(); // init should be able to accept provider and contract address\n// balanceOf is now available to the contract instance\nconst balance = try contact.functions.balanceOf.call(.{ .addr = \"eltneg.eth\" });\nstd.debug.print(\"balance={?}\\n\", .{balance.value});\n```\n\n#### **Run `zig run main.zig` to see it in action**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feltneg%2Fdummy-ethers-zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feltneg%2Fdummy-ethers-zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feltneg%2Fdummy-ethers-zig/lists"}