You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🧐 Motivation
Using natspec, the @dev specification is sometimes not useful because it redirects to the interface or to other contracts. Users should explore the source code to see what the function does.
Like this (verified contract on etherscan):
📝 Details
It could be useful to use the @inheritdoc specification and then add a @custom:something specification to list additional details. The custom specification should also be used in docs generation.
i.e.
/** * @inheritdoc IERC20 * * @custom:requirements * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */function transfer(addressto, uint256value) publicvirtualreturns (bool) {
address owner =_msgSender();
_transfer(owner, to, value);
returntrue;
}
The text was updated successfully, but these errors were encountered:
Most contracts using the See {IERC...} syntax were written before the introduction of @inheritdoc. Feel free to create a PR to shift to @inheritdoc--we'll migrate over time but it's not a priority right now.
🧐 Motivation
Using natspec, the
@dev
specification is sometimes not useful because it redirects to the interface or to other contracts. Users should explore the source code to see what the function does.Like this (verified contract on etherscan):
📝 Details
It could be useful to use the
@inheritdoc
specification and then add a@custom:something
specification to list additional details. The custom specification should also be used in docs generation.i.e.
The text was updated successfully, but these errors were encountered: