contract.hbs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. {{#each items}}
  2. :{{name}}: pass:normal[xref:#{{anchor}}[`++{{name}}++`]]
  3. {{/each}}
  4. {{#each functions}}
  5. :{{fullname}}: pass:normal[xref:#{{anchor}}[`++{{name}}++`]]
  6. {{/each}}
  7. [.contract]
  8. [[{{anchor}}]]
  9. === `++{{name}}++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v{{oz-version}}/{{__item_context.file.absolutePath}}[{github-icon},role=heading-link]
  10. [.hljs-theme-light.nopadding]
  11. ```solidity
  12. import "@openzeppelin/{{__item_context.file.absolutePath}}";
  13. ```
  14. {{{natspec.dev}}}
  15. {{#if modifiers}}
  16. [.contract-index]
  17. .Modifiers
  18. --
  19. {{#each modifiers}}
  20. * {xref-{{anchor~}} }[`++{{name}}({{names params}})++`]
  21. {{/each}}
  22. --
  23. {{/if}}
  24. {{#if has-functions}}
  25. [.contract-index]
  26. .Functions
  27. --
  28. {{#each inherited-functions}}
  29. {{#unless @first}}
  30. [.contract-subindex-inherited]
  31. .{{contract.name}}
  32. {{/unless}}
  33. {{#each functions}}
  34. * {xref-{{anchor~}} }[`++{{name}}({{names params}})++`]
  35. {{/each}}
  36. {{/each}}
  37. --
  38. {{/if}}
  39. {{#if has-events}}
  40. [.contract-index]
  41. .Events
  42. --
  43. {{#each inheritance}}
  44. {{#unless @first}}
  45. [.contract-subindex-inherited]
  46. .{{name}}
  47. {{/unless}}
  48. {{#each events}}
  49. * {xref-{{anchor~}} }[`++{{name}}({{names params}})++`]
  50. {{/each}}
  51. {{/each}}
  52. --
  53. {{/if}}
  54. {{#if has-errors}}
  55. [.contract-index]
  56. .Errors
  57. --
  58. {{#each inheritance}}
  59. {{#unless @first}}
  60. [.contract-subindex-inherited]
  61. .{{name}}
  62. {{/unless}}
  63. {{#each errors}}
  64. * {xref-{{anchor~}} }[`++{{name}}({{names params}})++`]
  65. {{/each}}
  66. {{/each}}
  67. --
  68. {{/if}}
  69. {{#if has-internal-variables}}
  70. [.contract-index]
  71. .Internal Variables
  72. --
  73. {{#each inheritance}}
  74. {{#unless @first}}
  75. [.contract-subindex-inherited]
  76. .{{name}}
  77. {{/unless}}
  78. {{#each internal-variables}}
  79. * {xref-{{anchor~}} }[`++{{typeDescriptions.typeString}} {{#if constant}}constant{{/if}} {{name}}++`]
  80. {{/each}}
  81. {{/each}}
  82. --
  83. {{/if}}
  84. {{#each modifiers}}
  85. [.contract-item]
  86. [[{{anchor}}]]
  87. ==== `[.contract-item-name]#++{{name}}++#++({{typed-params params}})++` [.item-kind]#modifier#
  88. {{{natspec.dev}}}
  89. {{/each}}
  90. {{#each functions}}
  91. [.contract-item]
  92. [[{{anchor}}]]
  93. ==== `[.contract-item-name]#++{{name}}++#++({{typed-params params}}){{#if returns2}} → {{typed-params returns2}}{{/if}}++` [.item-kind]#{{visibility}}#
  94. {{{natspec.dev}}}
  95. {{/each}}
  96. {{#each events}}
  97. [.contract-item]
  98. [[{{anchor}}]]
  99. ==== `[.contract-item-name]#++{{name}}++#++({{typed-params params}})++` [.item-kind]#event#
  100. {{{natspec.dev}}}
  101. {{/each}}
  102. {{#each errors}}
  103. [.contract-item]
  104. [[{{anchor}}]]
  105. ==== `[.contract-item-name]#++{{name}}++#++({{typed-params params}})++` [.item-kind]#error#
  106. {{{natspec.dev}}}
  107. {{/each}}
  108. {{#each internal-variables}}
  109. [.contract-item]
  110. [[{{anchor}}]]
  111. ==== `{{typeDescriptions.typeString}} [.contract-item-name]#++{{name}}++#` [.item-kind]#internal{{#if constant}} constant{{/if}}#
  112. {{{natspec.dev}}}
  113. {{/each}}