{"id":13759966,"url":"https://github.com/poanetwork/solidity-flattener","last_synced_at":"2025-05-16T18:10:40.844Z","repository":{"id":23213255,"uuid":"98442115","full_name":"poanetwork/solidity-flattener","owner":"poanetwork","description":"Utility to combine Solidity project to a flat file","archived":false,"fork":false,"pushed_at":"2024-06-16T11:51:34.000Z","size":213,"stargazers_count":328,"open_issues_count":11,"forks_count":111,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-13T14:20:57.837Z","etag":null,"topics":["contracts","solidity"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poanetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-07-26T16:09:11.000Z","updated_at":"2025-04-04T02:17:55.000Z","dependencies_parsed_at":"2024-01-17T16:58:17.095Z","dependency_job_id":"f02fb79f-2f79-4c47-9991-5e157b78c286","html_url":"https://github.com/poanetwork/solidity-flattener","commit_stats":{"total_commits":76,"total_committers":7,"mean_commits":"10.857142857142858","dds":0.3157894736842105,"last_synced_commit":"4ccc21dc1ee4c018c5a4daac9f89139c26f0cef0"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poanetwork%2Fsolidity-flattener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poanetwork%2Fsolidity-flattener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poanetwork%2Fsolidity-flattener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poanetwork%2Fsolidity-flattener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poanetwork","download_url":"https://codeload.github.com/poanetwork/solidity-flattener/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254582907,"owners_count":22095518,"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":["contracts","solidity"],"created_at":"2024-08-03T13:01:01.589Z","updated_at":"2025-05-16T18:10:40.824Z","avatar_url":"https://github.com/poanetwork.png","language":"JavaScript","funding_links":[],"categories":["dApps directory"],"sub_categories":["Solidity Developer Tools"],"readme":"# Solidity smart-contract flattened source file generation\n\n[![Build Status](https://travis-ci.org/poanetwork/solidity-flattener.svg?branch=master)](https://travis-ci.org/poanetwork/solidity-flattener)\n[![Known Vulnerabilities](https://snyk.io/test/github/poanetwork/solidity-flattener/badge.svg)](https://snyk.io/test/github/poanetwork/solidity-flattener)\n[![Coverage Status](https://coveralls.io/repos/github/poanetwork/solidity-flattener/badge.svg?branch=master)](https://coveralls.io/github/poanetwork/solidity-flattener?branch=master)\n\n## Utility to combine all imports to one flatten .sol file\n\n### Installation from npm\n\n`npm i @poanet/solidity-flattener`\n\n### Usage\n\n`./node_modules/.bin/poa-solidity-flattener ./contracts/example.sol`\n\nIt will save flattened source of Solidity smart-contract into `./out` directory\n\n### Installation from source\n\n\n```\ngit clone https://github.com/poanetwork/solidity-flattener\ncd solidity-flattener\nnpm install\n```\n\nYou can start script either\n\n```\nnpm start \"path_to_not_flat_contract_definition_file.sol\"\n```\n\nor without paramaters (path to input file will be extracted from `./config.json`)\n\n```\nnpm start\n```\n\n\n\nExpected result: \n\n```\nSuccess! Flat file ORIGINAL_FILE_NAME_flat.sol is generated to ./out directory\n```\n\n`./flatContract.sol` - flat .sol file is created in output directory (`./out/` by default)\n\n**Note:** *utility doesn't support aliases at import statements*\n\n## Config\n\npath `./config.json`\n\n```\n{\n\t\"inputFilePath\": \"./demo/src/Oracles.sol\",\n\t\"outputDir\": \"./out\"\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoanetwork%2Fsolidity-flattener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoanetwork%2Fsolidity-flattener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoanetwork%2Fsolidity-flattener/lists"}