Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Natspec #395

Merged
merged 6 commits into from
Apr 8, 2020
Merged

Natspec #395

merged 6 commits into from
Apr 8, 2020

Conversation

iamdefinitelyahuman
Copy link
Member

What I did

Add Contract.info and ContractTx.info methods to view NatSpec documentation in the console.
Closes #378

How I did it

  1. In brownie.project.compiler.utils, the merge_natspec method combines userdoc and devdoc into a single dict, which is included in the build artifact for each contract.
  2. In brownie.network.contract, the _print_natspec converts the natspec dict into human readable form and outputs to stdout.

How to verify it

Run tests. I added new cases, including checks against solc v0.5.0 (single return field) and v0.6.0 (multiple return fields) as well a vyper.

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have updated the documentation
  • I have added an entry to the changelog

@iamdefinitelyahuman iamdefinitelyahuman merged commit fbc38d9 into master Apr 8, 2020
@iamdefinitelyahuman iamdefinitelyahuman deleted the natspec branch April 8, 2020 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate NatSpec info in the console
1 participant