{"id":13621223,"url":"https://github.com/unstoppabledomains/solidity-sizer","last_synced_at":"2025-03-05T03:40:43.853Z","repository":{"id":98976771,"uuid":"538546107","full_name":"unstoppabledomains/solidity-sizer","owner":"unstoppabledomains","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-22T10:39:53.000Z","size":142,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-02-18T00:46:41.378Z","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/unstoppabledomains.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":"2022-09-19T14:35:53.000Z","updated_at":"2023-03-23T20:04:49.000Z","dependencies_parsed_at":"2023-04-05T14:18:16.893Z","dependency_job_id":null,"html_url":"https://github.com/unstoppabledomains/solidity-sizer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unstoppabledomains%2Fsolidity-sizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unstoppabledomains%2Fsolidity-sizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unstoppabledomains%2Fsolidity-sizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unstoppabledomains%2Fsolidity-sizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unstoppabledomains","download_url":"https://codeload.github.com/unstoppabledomains/solidity-sizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241960833,"owners_count":20049342,"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-08-01T21:01:03.745Z","updated_at":"2025-03-05T03:40:43.807Z","avatar_url":"https://github.com/unstoppabledomains.png","language":"TypeScript","readme":"# solidity-sizer\n\nA GitHub action that comments the pull request with the size of the Solidity\ncontracts.\n\n## Usage\n\n### Contracts size and delta\n\nhardhat size-contracts doesn't support git based delta calculation, it uses\ncache/.hardhat_contract_sizer_output.json to store contracts size data and then\njust compare new results against this file to get delta.\n\nSo, we need two jobs to get the delta between the source and target branches:\n\n- `target-contracts-size` will checkout the target branch, run hardhat\n  size-contracts and put `cache/.hardhat_contract_sizer_output.json` into the\n  artifacts.\n- `pr-contracts-size` will checkout the source branch, download artifacts and\n  run solidity-sizer which will calculate the delta using\n  `hardhat_contract_sizer_output.json` from `target-contracts-size`\n\n```yml\non: pull_request\n\njobs:\n  target-contracts-size:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          ref: ${{ github.event.pull_request.base.ref }}\n      - uses: actions/setup-node@v2\n        with:\n          node-version: 16.x\n      - run: yarn install\n      - run: yarn compile:size\n      - uses: actions/upload-artifact@v3\n        with:\n          name: hardhat-contract-sizer-output\n          path: cache/.hardhat_contract_sizer_output.json\n\n  pr-contracts-size:\n    runs-on: ubuntu-latest\n    needs: target-contracts-size\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-node@v2\n        with:\n          node-version: 16.x\n      - run: yarn install\n      - uses: actions/download-artifact@v3\n        with:\n          name: hardhat-contract-sizer-output\n          path: cache/\n      - uses: unstoppabledomains/solidity-sizer@v0.1.0\n        with:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Only contracts size\n\n```yml\non: pull_request\n  contracts-size:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/setup-node@v2\n        with:\n          node-version: 16.x\n      - run: yarn install\n      - uses: actions/download-artifact@v3\n        with:\n          name: hardhat-contract-sizer-output\n          path: cache/\n      - uses: unstoppabledomains/solidity-sizer@v0.1.0\n        with:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## Inputs\n\n### Action inputs\n\n| Name           | Description                                  | Required | Default                         |\n| -------------- | -------------------------------------------- | -------- | ------------------------------- |\n| `GITHUB_TOKEN` | Token that is used to create comment         | ✅       |                                 |\n| `command`      | Command that will run hardhat size-contracts |          | yarn run hardhat size-contracts |\n","funding_links":[],"categories":["Tools"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funstoppabledomains%2Fsolidity-sizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funstoppabledomains%2Fsolidity-sizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funstoppabledomains%2Fsolidity-sizer/lists"}