在solidity語言中
注釋符為//
注解符為/* 內容*/ 或者 是 ///內容 注解中含有這幾個標簽給予我們使用
@title
|
一個應該描述合約/介面的標題 | contract, library, interface |
@author
|
作者的名字 | contract, library, interface |
@notice
|
向終端用戶解釋這個東西的作用 | contract, library, interface, function, public state variable, event |
@dev
|
向開發人員解釋任何額外的細節 | contract, library, interface, function, state variable, event |
@param
|
就像在Doxygen中一樣記錄一個引數(必須在引數名之后) | function, event |
@return
|
記錄一個合約的函式的回傳變數 | function, public state variable |
@inheritdoc
|
從基本函式中復制所有缺失的標簽(必須在合約名稱之后) | function, public state variable |
@custom:...
|
自定義標簽,語意由應用程式定義 | everywhere |
注解標簽在開發的程序中是非常有必要的
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/546067.html
標籤:區塊鏈
上一篇:評價指標:相似度、GAS消耗
下一篇:solidity 參考型別修飾符memory、calldata與storage 常量修飾符Constant與Immutable區別