ConsenSysDiligence / ConsenSysDiligence/python-solidity-parser

Feature Request: Get object's raw source

Open
#21 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
145
Forks
40
PR merge metrics
No merged PRs in 30d

Description

Hi,

How are you? Thanks of all, thanks for doing the port of the tool, I was thinking of doing it myself and I found someone else did it :smile:

I was wondering if there was a way to get the raw source of an objects, let's say a contract or function.

I was thinking in something like:

```
sourceUnitObject = parser.objectify(sourceUnit)
raw_text = sourceUnitObject.contracts['MyContract'].raw
print(raw_text)
>>'contract MyContract { ..'
```

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.