{"id":20416688,"url":"https://github.com/andreas-timm/solidity-preprocessor","last_synced_at":"2026-01-06T05:42:10.690Z","repository":{"id":248389433,"uuid":"828541697","full_name":"andreas-timm/solidity-preprocessor","owner":"andreas-timm","description":"Easy way to preprocess Solidity files, allowing modification of smart contract code dynamically before deployment, improving flexibility in various use cases.","archived":false,"fork":false,"pushed_at":"2024-09-17T11:24:18.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-01T18:58:38.979Z","etag":null,"topics":["contract","hardhat","preprocessing","solidity","typescript","viem"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreas-timm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"andreas-timm"}},"created_at":"2024-07-14T13:15:14.000Z","updated_at":"2024-09-17T11:24:40.000Z","dependencies_parsed_at":"2024-07-14T15:58:53.829Z","dependency_job_id":"25e62517-68e0-42fa-8b2b-f6b5d9d5235e","html_url":"https://github.com/andreas-timm/solidity-preprocessor","commit_stats":null,"previous_names":["andreas-timm/solidity-preprocessor"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreas-timm%2Fsolidity-preprocessor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreas-timm%2Fsolidity-preprocessor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreas-timm%2Fsolidity-preprocessor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreas-timm%2Fsolidity-preprocessor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreas-timm","download_url":"https://codeload.github.com/andreas-timm/solidity-preprocessor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253085702,"owners_count":21851683,"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":["contract","hardhat","preprocessing","solidity","typescript","viem"],"created_at":"2024-11-15T06:21:56.624Z","updated_at":"2026-01-06T05:42:10.650Z","avatar_url":"https://github.com/andreas-timm.png","language":"TypeScript","readme":"# Solidity preprocessor\n\n[![test](https://github.com/andreas-timm/solidity-preprocessor/actions/workflows/test.yml/badge.svg)](https://github.com/andreas-timm/solidity-preprocessor/actions/workflows/test.yml)\n\n## Motivation\n\nEasy way to preprocess Solidity files, allowing modification of smart contract code dynamically before deployment, improving flexibility in various use cases.\n\n## Usage\n```solidity\n// TestNft1155.sol\n// SPDX-License-Identifier: UNLICENSED\n\npragma solidity ^0.8.25;\n\nimport {ERC1155} from \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\n\ncontract TestNft1155 is ERC1155 {\n    constructor(string memory uri_) ERC1155(uri_) {\n        _mint(address(0), 1, 100, \"\");\n    }\n}\n```\n\n```ts\nimport { preprocessor } from \"@andreas-timm/solidity-preprocessor\";\n\nconst res = await preprocessor({path: 'contracts/TestNft1155.sol', replace: [\n  ['_mint(address(0), 1, 100, \"\")', '_mint(0x630C6C3180d3b4B6912644D046f6769dA3e54843, 1, 10000, \"\")']\n]});\n\nconsole.log(res.bytecode);\n```\n\n## License\n[![CC BY 4.0][cc-by-shield]][cc-by]\n\nThis work is licensed under a [Creative Commons Attribution 4.0 International License][cc-by].\n\n[![CC BY 4.0][cc-by-image]][cc-by]\n\n[cc-by]: http://creativecommons.org/licenses/by/4.0/\n[cc-by-image]: https://i.creativecommons.org/l/by/4.0/88x31.png\n[cc-by-shield]: https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg\n\n- [LICENSE](https://github.com/andreas-timm//blob/main/LICENSE)\n- Author: [Andreas Timm](https://github.com/andreas-timm)\n","funding_links":["https://github.com/sponsors/andreas-timm"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreas-timm%2Fsolidity-preprocessor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreas-timm%2Fsolidity-preprocessor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreas-timm%2Fsolidity-preprocessor/lists"}