Skip to main content

Module utils

Module utils 

Source
Expand description

GitSource + Deployments helpers.

Pure functions ported from the legacy forge-doc preprocessors:

  • git_source_url: <repo>/blob/<commit>/<rel> for a source file.
  • read_deployments: load <dir>/<network>/<contract>.json artifacts.

Structs§

Deployment
A contract deployment entry, deserialised from <dir>/<network>/<contract>.json.

Functions§

git_raw_url
Return a {repo}/raw/{commit}/... URL suitable for embedding binary assets (images, fonts, etc.) directly rather than the GitHub blob viewer page.
git_source_url
Build the {repo}/blob/{commit}/{rel} URL for a source file.
read_deployments
Read all deployments for a Solidity contract file.