Skip to main content

AST parser from solc json file

Project description

An AST parser for solc json outputs

Usage

Parsing AST with solidity source code and get contract information:

from solc_json_parser.parser import SolidityAst

# The input can be a file path or source code
ast = SolidityAst('contracts/BlackScholesEstimate_8.sol')
ast.all_contract_names

# List all functions in contract
ast.functions_in_contract_by_name('BlackScholesEstimate', name_only=True)

# Get source code by program counter
ast.source_by_pc('BlackScholesEstimate', 92)

# Get deployment code by contract name
ast.get_deploy_bin_by_contract_name('BlackScholesEstimate')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solc-json-parser-0.1.5.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solc_json_parser-0.1.5-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file solc-json-parser-0.1.5.tar.gz.

File metadata

  • Download URL: solc-json-parser-0.1.5.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.0

File hashes

Hashes for solc-json-parser-0.1.5.tar.gz
Algorithm Hash digest
SHA256 73d66d1b7f30fc9ff4d9fd30b84fdc5cfcf60bb7c59031e8fe7d69c7787b1590
MD5 304707acb96981551c56bfd86dc1551e
BLAKE2b-256 7275937a5f6729aa18ad65e09b224448056581c26f83df2e651ab8819e21f4b9

See more details on using hashes here.

File details

Details for the file solc_json_parser-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for solc_json_parser-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c9b38bb9b292f192fe3ebdbb3dbf80a4fe0bfd1efea73631ca67d29191741344
MD5 63ed7a149856e750ef5fc85021581ed8
BLAKE2b-256 4e485eb84f771838a5beb5064e37b8758093dcd65d5f4daef75010812fb63f3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page