Skip to content

Fix non-standard NatSpec #2

@jaybuidl

Description

@jaybuidl

Change

Prefix the following RAB tags with custom:: authors, reviewers, auditors, bounties, deployments, tools.

Motivation

As @greenlucid found out, our current RAB annotations does not conform to NatSpec and some parsers choke on it.

This would apply only to new undeployed contracts.

Note: the @author tag singular is standard NatSpec but @authors is not.

Example

Example seen in the wild of custom co-author natspec

/**
 * @title ...
 * @custom:version 1.0
 * @notice ...
 * @custom:coauthor foobar (0xfoobar)
 * @custom:coauthor wwchung (manifoldxyz)
 * ...
 * @custom:coauthor ryley-o (artblocks)
 */

Migration script

# To mass migrate a code base
for tag in authors reviewers auditors bounties deployments tools
do
    find ./src/ -type f -name '*.sol' | xargs sed -i.bak "s/@$tag/@custom:$tag/"
done

# To revert
git restore src/
rm src/**/*.sol.bak

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions