{"id":15441164,"url":"https://github.com/zdenham/diamond-etherscan","last_synced_at":"2025-04-19T18:25:13.757Z","repository":{"id":63108668,"uuid":"502439160","full_name":"zdenham/diamond-etherscan","owner":"zdenham","description":"Make your EIP-2535 Diamond Etherscan compatible","archived":false,"fork":false,"pushed_at":"2024-04-06T17:58:58.000Z","size":540,"stargazers_count":45,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-18T12:18:28.324Z","etag":null,"topics":["eip-2535","ethereum","solidity"],"latest_commit_sha":null,"homepage":"https://etherscan.diamonds.dev","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/zdenham.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-11T19:31:28.000Z","updated_at":"2024-07-31T16:55:32.000Z","dependencies_parsed_at":"2024-04-06T18:49:44.998Z","dependency_job_id":null,"html_url":"https://github.com/zdenham/diamond-etherscan","commit_stats":{"total_commits":63,"total_committers":2,"mean_commits":31.5,"dds":"0.015873015873015928","last_synced_commit":"be2c3d361874be8494e689ea179de4e493345310"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdenham%2Fdiamond-etherscan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdenham%2Fdiamond-etherscan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdenham%2Fdiamond-etherscan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdenham%2Fdiamond-etherscan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zdenham","download_url":"https://codeload.github.com/zdenham/diamond-etherscan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249239232,"owners_count":21235820,"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":["eip-2535","ethereum","solidity"],"created_at":"2024-10-01T19:16:56.903Z","updated_at":"2025-04-16T12:30:35.622Z","avatar_url":"https://github.com/zdenham.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"300px; margin-top: 10px;\" alt=\"etherscan diamond\" src=\"https://user-images.githubusercontent.com/16373521/201745986-08ad050e-df47-4839-8ac1-2916c7f37bb6.png\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cb style=\"font-size: 30px\"\u003e\n    Diamond Etherscan\n  \u003c/b\u003e\n  \u003cbr/\u003e\n  \u003ci\u003e\n    Make your \u003ca href=\"https://eips.ethereum.org/EIPS/eip-2535\" target=\"_blank\"\u003eEIP-2535\u003c/a\u003e diamond \u003ca href=\"https://eips.ethereum.org/EIPS/eip-2535\" target=\"_blank\"\u003eetherscan\u003c/a\u003e compatible. \u003cbr/\u003e Generate your dummy diamond at \u003ca target=\"_blank\" href=\"https://etherscan.diamonds.dev\"\u003eetherscan.diamonds.dev\u003c/a\u003e\n  \u003c/i\u003e\n\u003c/p\u003e\n\n## Motivation\n\n[EIP-2535 Diamond Standard](https://github.com/ethereum/EIPs/issues/2535) is really cool. But etherscan (the most popular block explorer) doesn't support diamonds yet. [Louper](https://louper.dev) is a great tool that solves this issue, but many users have more experience with etherscan and might prefer to interact with the contract there.\n\nAnd so, we are left with diamond etherscan, a workaround to support etherscan interactions with diamonds.\n\n## How it works\n\nDiamond Etherscan has two components.\n\nThe first is a script to generate a \"Dummy Implementation\" of your diamond located at [`scripts/runGenerateDummy.ts`](https://github.com/zdenham/diamond-etherscan/blob/main/scripts/runGenerateDummy.ts). This uses the etherscan API to grab all of your facets' ABI and then generates a noop mock of your whole diamond. **Note** this will only work for verified facets.\n\nThe second is a Facet called [`DiamondEtherscanFacet.sol`](https://github.com/zdenham/diamond-etherscan/blob/main/contracts/facets/DiamondEtherscanFacet.sol) that implements [EIP-1967](https://eips.ethereum.org/EIPS/eip-1967) so you can point your diamond proxy to the dummy implementation. Because all of your diamond function signatures are implemented in the dummy, etherscan which knows about EIP-1967 will be able to appropriately display functions for interaction.\n\n## How to support etherscan in your diamond\n\n1. Generate your dummy implementation (via the [website](https://etherscan.diamonds.dev/) / cli or manually)\n2. Deploy your dummy implementation\n3. Add the EtherscanFacet to your diamond\n4. Set the proxy implementation to point to the deployed dummy\n5. Repeat any time you update the diamond\n\n\n## Generating your dummy implementation\n\nWe have built a few tools to make it easier to generate a dummy implementation of your diamond.\n\n### **(New!)** Via the [Website](https://etherscan.diamonds.dev) UI: \n\n\u003cimg width=\"973\" alt=\"Screen Shot 2022-11-13 at 10 52 54 PM\" src=\"https://user-images.githubusercontent.com/16373521/201594198-de153e9f-3b31-425b-bb89-13c5ed9bdef9.png\"\u003e\n\n1. Input your diamond address and network on the diamond etherscan [website](https://etherscan.diamonds.dev/)\n2. Generate your dummy diamond implementation\n\n### Via the CLI\n\nFirst you will need to rename .env.example to .env and add the appropriate block explorer / infura api keys. We use `[UPPERCASE_NETWORK_NAME]_EXPLORER_API_KEY`.\n\n```\ngit clone https://github.com/zdenham/diamond-etherscan.git\nyarn install\nyarn run generate-dummy [0xyourdiamondaddress] [yourNetwork]\n```\n\nThe dummy contract will be written to `contracts/dummy/DummyDiamondImplementation.sol`\n\n## Example\n\nHere is a live example [contract](https://rinkeby.etherscan.io/address/0xc173ae57b7479b95EA9EF0B1A3C70a61e84d0F30) deployed to rinkeby.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdenham%2Fdiamond-etherscan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzdenham%2Fdiamond-etherscan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdenham%2Fdiamond-etherscan/lists"}