manifoldfinance / mevETH2

mevETH LST Protocol - Repo has migrated see link
https://github.com/MEV-Protocol/meveth
27 stars 2 forks source link

Feature: Agree to and document what custom natspec usage to use #10

Closed sambacha closed 1 year ago

sambacha commented 1 year ago

dappspec custom natspec identifiers

Previously we have used a few @custom: natspec directives, I have them documented here: https://github.com/sambacha/dappspec#motivation

in the MevEth.sol contract


        /// @custom SAFETY: When finalizing the update to the MevEthShareVault, make sure to grant any remaining rewards from the existing share vault.

        emit MevEthShareVaultUpdateFinalized(mevEthShareVault, address(pendingMevEthShareVault));

Example of using custom for protected variable id for analysis detector

contract Internal {
    /// @custom:security write-protection="onlyOwner()"
    address owner;

Additionally the natspec comment must be of the syntax @custom:safety

sambacha commented 1 year ago

0.8.21 solidity fucked us on this, anyways we got a dope waifu comment instead. Thanks solc team