Skip to content

docs: add detailed docstrings and inline comments to ErgoBridgeConnector#1

Open
foreverzyf wants to merge 1 commit into
mainfrom
docs/add-ergo-connector-comments
Open

docs: add detailed docstrings and inline comments to ErgoBridgeConnector#1
foreverzyf wants to merge 1 commit into
mainfrom
docs/add-ergo-connector-comments

Conversation

@foreverzyf

Copy link
Copy Markdown
Owner

Summary

Adds comprehensive docstrings and inline comments to src/bridge/ergo_connector.py for the Easy Bounty #1608 (2 RTC).

What changed

  • Added module-level docstring explaining the bridge's purpose and why Ergo was chosen
  • Added class-level docstring for ErgoBridgeConnector with architecture overview
  • Added detailed Args, Returns, and Raises sections to every method
  • Added inline comments explaining non-obvious decisions:
    • Why booleans are explicitly rejected in init (Python's isinstance(True, int) quirk)
    • Why URL-encoding is applied to contract addresses (prevents path traversal with base58 slashes)
    • Why �erify_contract() exists (sanity check before spending transaction fees)

Focus on 'why', not 'what'

All comments explain the reasoning behind implementation choices rather than restating obvious code behavior.

Bounty claim

This PR addresses bounty #1608: Add code comments explaining any complex function — 2 RTC per file.


Disclosure: This contribution was made as part of a RustChain bounty program.

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.

1 participant