{"id":22970788,"url":"https://github.com/labteral/easysolc","last_synced_at":"2026-04-18T15:02:03.738Z","repository":{"id":57425268,"uuid":"164224967","full_name":"labteral/easysolc","owner":"labteral","description":"Python wrapper for solc (Solidity compiler)","archived":false,"fork":false,"pushed_at":"2019-08-19T16:59:40.000Z","size":25,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-28T12:18:15.070Z","etag":null,"topics":["ethereum","pysolc","solc","solcpy","solidity","web3","web3py","wrapper"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/easysolc","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/labteral.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}},"created_at":"2019-01-05T15:03:23.000Z","updated_at":"2022-01-06T17:14:52.000Z","dependencies_parsed_at":"2022-08-29T22:51:04.258Z","dependency_job_id":null,"html_url":"https://github.com/labteral/easysolc","commit_stats":null,"previous_names":["brunneis/easysolc"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/labteral/easysolc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labteral%2Feasysolc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labteral%2Feasysolc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labteral%2Feasysolc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labteral%2Feasysolc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/labteral","download_url":"https://codeload.github.com/labteral/easysolc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labteral%2Feasysolc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31973202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":["ethereum","pysolc","solc","solcpy","solidity","web3","web3py","wrapper"],"created_at":"2024-12-14T22:14:36.053Z","updated_at":"2026-04-18T15:02:03.699Z","avatar_url":"https://github.com/labteral.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# easysolc\n\n\u003e Tested with solc 0.5.2+commit.1df8f40c\n\nEasysolc is a simple wrapper for the Solidity compiler (`solc`). You can specify a custom `solc` binary or use the first available following the paths specified under the `$PATH` environment variable.\n\nThis library also faciliates the creation of web3 contract instances directly from the source code or from previously generated files containing the ABI and the bytecode.\n\nAll the `solc` parameters are supported and they can be set when invoking the `compile` method. However, you can also specify all the arguments directly with the `args` parameter.\n\n# Usage\n## Installation\n```bash\npip install easysolc\n```\n\n## Create an instance of the compiler\nIf a path is not indicated, the binary used will be the first accesible following the paths of the `$PATH` environment variable:\n```python\nfrom easysolc import Solc\nsolc = Solc()\n```\n\nIt is also possible to load the compiler from custom paths:\n```python\nsolc = Solc('/usr/local/bin/solc')\n```\n```python\nsolc = Solc('/usr/local/bin')\n```\n```python\nsolc = Solc('/usr/local/bin/')\n```\n\n## Functionalities\n\nCompile the source code using files as output in the current directory:\n```python\nsolc.compile('ballot.sol', output_dir='.')\n```\n\nDo the same but manually indicating the arguments:\n```python\nsolc.compile('ballot.sol', '--abi --bin -o .')\n```\n```python\nsolc.compile(args='--overwrite --abi --bin -o . ballot.sol')\n```\n```python\nsolc.compile(args=['--overwrite', '--abi', '--bin', '-o', '.', 'ballot.sol'])\n```\n\nGet a web3 contract instance given the source code:\n```python\ncontract = solc.get_contract_instance(source='ballot.sol',\n                                      contract_name='Ballot')\n```\n\nGet a web3 contract instance given the files containing the ABI and bytecode:\n```python\ncontract = solc.get_contract_instance(abi_file='ballot.abi',\n                                      bytecode_file='ballot.bin')\n```\n\nGet a web3 contract instance given the ABI file and the contract address:\n```python\nfrom web3 import Web3\nw3 = Web3(Web3.IPCProvider(\"~/Library/Ethereum/geth.ipc\"))\ncontract = solc.get_contract_instance(w3=w3,\n                                      abi_file='ballot.abi',\n                                      address=\"0x0\")\n```\n\u003e **Note**. If you are going to interact with the contract, instead of deploying it, fill the web3 parameter with your instance.\n\nGet a dictionary with the ABI and bytecode given the source code:\n```python\ncontract_dict = solc.compile('ballot.sol')\n```\n\nGet a web3 contract instance given a dictionary with the ABI and bytecode of the contract:\n```python\ncontract = solc.get_contract_instance(contract_dict['Ballot'])\n```\n\n## List of parameters and default values of the `compile` method\n```python\nsource='*.sol'\nargs=None\noptimize=False\noptimize_runs=200\npretty_json=False\nlibraries=None\noutput_dir=None\noverwrite=True\ncombined_json=None\ngas=False\nstandard_json=False\nassemble=False\nyul=False\nstrict_assembly=False\nmachine=None\nlink=False\nmetadata_literal=False\nallow_paths=None\nignore_missing=False\nast=False\nast_json=False\nast_compact_json=False\nasm=False\nasm_json=False\nopcodes=False\nbin_=True\nbin_runtime=False\nabi=True\nhashes=False\nuserdoc=False\ndevdoc=False\nmetadata=False\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabteral%2Feasysolc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabteral%2Feasysolc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabteral%2Feasysolc/lists"}