{"id":26848213,"url":"https://github.com/0xpolarzero/optimize-dependencies","last_synced_at":"2025-03-30T20:53:33.922Z","repository":{"id":212087938,"uuid":"730660073","full_name":"0xpolarzero/optimize-dependencies","owner":"0xpolarzero","description":"A basic solution to find better optimized dependencies for a Solidity smart contract.","archived":false,"fork":false,"pushed_at":"2023-12-21T20:36:27.000Z","size":368,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-15T05:02:27.864Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://optimize-dependencies.vercel.app","language":"TypeScript","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/0xpolarzero.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}},"created_at":"2023-12-12T12:02:03.000Z","updated_at":"2023-12-15T09:26:08.000Z","dependencies_parsed_at":"2023-12-21T15:10:33.348Z","dependency_job_id":null,"html_url":"https://github.com/0xpolarzero/optimize-dependencies","commit_stats":null,"previous_names":["0xpolarzero/optimize-contract","0xpolarzero/optimize-dependencies"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xpolarzero%2Foptimize-dependencies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xpolarzero%2Foptimize-dependencies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xpolarzero%2Foptimize-dependencies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xpolarzero%2Foptimize-dependencies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xpolarzero","download_url":"https://codeload.github.com/0xpolarzero/optimize-dependencies/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246379378,"owners_count":20767696,"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":"2025-03-30T20:53:33.360Z","updated_at":"2025-03-30T20:53:33.912Z","avatar_url":"https://github.com/0xpolarzero.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# optimize_deps\n\nA basic solution to find better optimized dependencies for a Solidity smart contract, as well as a few basic best practices for saving gas.\n\nIMAGE\n\nDesign forked and modified from [5/9's website](https://fiveoutofnine.com).\n\n## Features\n\n| Input                       | Output                            | Details                                                     |\n| --------------------------- | --------------------------------- | ----------------------------------------------------------- |\n| OpenZeppelin dependency     | Solady alternative (if it exists) | Imports diff, links, description, updated contracts, audits |\n| Solmate dependency          | Solady alternative (if it exists) | Imports diff, links, description, updated contracts, audits |\n| Openzeppelin Multicall      | Solady Multicaller                | Imports diff, links, description, updated contracts, audits |\n| ERC721 batch operations     | Advice and mock mitigation        | Imports diff, links, description, updated contracts, audits |\n| Events emitted inside loops | Advice and mock mitigation        | Code diff, basic modification                               |\n| Airdrop pattern             | Advice and alternative            | Mitigation, link to alternative method (Gaslite Drop)       |\n| Thirdweb contracts          | Advice and alternative (?)        | Mitigation, template for alternative method (?)             |\n\n## TODO\n\n- [x] Support Openzeppelin\n- [x] Support Solmate\n- [x] Support multicall contracts (find mostly used implementations) =\u003e recommend https://github.com/Vectorized/multicaller\n- [ ] Recognize events emitted inside loops, recommend {Event}Batch outside\n- [x] Recognize multicall function inside the contract as well\n- [ ] Consider [this](https://github.com/lambdalf-dev/ethereum-contracts) for ERC721 batch operations (need to run benchmarks with Solady)\n- [ ] Pattern matching: recognize some kind of airdrop pattern =\u003e recommend an optimized solution (Gaslite drop)\n- [ ] Thirdweb contracts (e.g. DropERC20Token): do you really need all this? recommend a simpler solution (maybe provide some templates??)\n- [ ] Provide some gas benchmarks diff for each replaced contracts (e.g. OZ ERC20 =\u003e Solady ERC20 ~x% gas savings, with links)\n\n## Replace when branding is done\n\n- replace optimize_deps (name)\n- replace optimize_deps_description (description)\n- replace optimize_deps_url (url)\n- replace https://github.com/0xpolarzero/optimize-dependencies (github url)\n- replace optimize_deps_github_name (github name)\n- regenerate og image for home, and add it as public/static/og-images/home.png\n  http://localhost:3000/api/og/page?title=optimize_deps\u0026description=optimize_deps_description\u0026path=/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xpolarzero%2Foptimize-dependencies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xpolarzero%2Foptimize-dependencies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xpolarzero%2Foptimize-dependencies/lists"}