{"id":30827497,"url":"https://github.com/praneshasp/sc-deployment-verification","last_synced_at":"2025-09-06T13:13:26.095Z","repository":{"id":254695091,"uuid":"847213785","full_name":"PraneshASP/sc-deployment-verification","owner":"PraneshASP","description":"A simple CI framework to verify manual smart contract deployments against a git branch","archived":false,"fork":false,"pushed_at":"2024-08-26T07:29:33.000Z","size":103,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-26T13:21:03.925Z","etag":null,"topics":["ci","evm","smartcontracts","tooling"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/PraneshASP.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-08-25T07:06:21.000Z","updated_at":"2024-08-25T10:48:36.000Z","dependencies_parsed_at":"2024-08-25T12:58:35.440Z","dependency_job_id":"3ab3156d-f7e1-4cd8-901e-c9c162761bc8","html_url":"https://github.com/PraneshASP/sc-deployment-verification","commit_stats":null,"previous_names":["praneshasp/sc-deployment-verification"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PraneshASP/sc-deployment-verification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PraneshASP%2Fsc-deployment-verification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PraneshASP%2Fsc-deployment-verification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PraneshASP%2Fsc-deployment-verification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PraneshASP%2Fsc-deployment-verification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PraneshASP","download_url":"https://codeload.github.com/PraneshASP/sc-deployment-verification/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PraneshASP%2Fsc-deployment-verification/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273908736,"owners_count":25189186,"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-09-06T02:00:13.247Z","response_time":2576,"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":["ci","evm","smartcontracts","tooling"],"created_at":"2025-09-06T13:13:23.178Z","updated_at":"2025-09-06T13:13:26.075Z","avatar_url":"https://github.com/PraneshASP.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":" \n# Smartcontract Bytecode Verification\n\nThis repository demonstrates a workflow for verifying the bytecode in GitHub CI for locally deployed (upgradeable) smart contracts. \n\n\u003e Avalanche testnet (Fuji) has been used in this repo for demonstration purposes.\n\n## How to Use\n\n1. Deploy contracts locally.\n2. The deploy script should write a JSON array with the following structure (see next section).\n3. Save the JSON file as `\u003cNETWORK\u003e-deployments.json` (e.g., `mainnet-deployments.json` for Ethereum).\n4. All deployments should be made from the `main` branch.\n5. Each deployment artifact should only contain info of contracts deployed at that moment.\n6. The branch name should start with `deploy/*` and target the `main` branch.\n7. Verification will start running in CI actions as soon as the PR is opened.\n8. We can add a rule to block merging if CI fails.\n9. Use the verification command: `npx hardhat verify-deployment --network \u003cNETWORK\u003e`\n\n### Deployment artifact (JSON)\n\n- `address`: The address of the deployed contract\n- `name`: The name of the contract\n- `timestamp`: Deployment timestamp\n- `isProxy`: `true` if it's a new deployment (proxy + implementation)\n- `isImplementation`: `true` for upgrades, only implementation contracts will be deployed\n- `args`: Constructor arguments, if any\n\n**Example**:\n```json\n[\n  {\n    \"address\": \"0x1234\",\n    \"name\": \"Box\",\n    \"timestamp\": 1724579038,\n    \"isProxy\": true,\n    \"isImplementation\": false,\n    \"args\": []\n  }\n]\n```\n\n## How It Works\n\nThe `verify-deployment.js` Hardhat task verifies the deployment based on the following flow:\n\n```mermaid\ngraph TD\n    A[Start] --\u003e B[Read deployment artifact]\n    B --\u003e C{For each deployment}\n    C --\u003e D[Read/Compile contract]\n    D --\u003e E[Fetch deployed bytecode]\n    E --\u003e F[Deploy contract locally using hre]\n    F --\u003e G[Get local bytecode]\n    G --\u003e H{Compare bytecodes}\n    H -- Match --\u003e I[Verification successful]\n    H -- Mismatch --\u003e J[Throw Error: Verification failed]\n    I --\u003e C\n    J --\u003e K[End]\n    C -- No more deployments --\u003e L[End]\n```\n\n## Note\n\nThis is still a work in progress tool and is subject to change.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraneshasp%2Fsc-deployment-verification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpraneshasp%2Fsc-deployment-verification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraneshasp%2Fsc-deployment-verification/lists"}