contract.hbs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {{#each items}}
  2. :{{name}}: pass:normal[xref:#{{anchor}}[`++{{name}}++`]]
  3. {{/each}}
  4. [.contract]
  5. [[{{anchor}}]]
  6. === `++{{name}}++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v{{oz-version}}/{{__item_context.file.absolutePath}}[{github-icon},role=heading-link]
  7. [.hljs-theme-light.nopadding]
  8. ```solidity
  9. import "@openzeppelin/{{__item_context.file.absolutePath}}";
  10. ```
  11. {{{natspec.dev}}}
  12. {{#if modifiers}}
  13. [.contract-index]
  14. .Modifiers
  15. --
  16. {{#each modifiers}}
  17. * {xref-{{anchor~}} }[`++{{name}}({{names params}})++`]
  18. {{/each}}
  19. --
  20. {{/if}}
  21. {{#if has-functions}}
  22. [.contract-index]
  23. .Functions
  24. --
  25. {{#each inherited-functions}}
  26. {{#unless @first}}
  27. [.contract-subindex-inherited]
  28. .{{contract.name}}
  29. {{/unless}}
  30. {{#each functions}}
  31. * {xref-{{anchor~}} }[`++{{name}}({{names params}})++`]
  32. {{/each}}
  33. {{/each}}
  34. --
  35. {{/if}}
  36. {{#if has-events}}
  37. [.contract-index]
  38. .Events
  39. --
  40. {{#each inheritance}}
  41. {{#unless @first}}
  42. [.contract-subindex-inherited]
  43. .{{name}}
  44. {{/unless}}
  45. {{#each events}}
  46. * {xref-{{anchor~}} }[`++{{name}}({{names params}})++`]
  47. {{/each}}
  48. {{/each}}
  49. --
  50. {{/if}}
  51. {{#each modifiers}}
  52. [.contract-item]
  53. [[{{anchor}}]]
  54. ==== `[.contract-item-name]#++{{name}}++#++({{typed-params params}})++` [.item-kind]#modifier#
  55. {{{natspec.dev}}}
  56. {{/each}}
  57. {{#each functions}}
  58. [.contract-item]
  59. [[{{anchor}}]]
  60. ==== `[.contract-item-name]#++{{name}}++#++({{typed-params params}}){{#if returns}} → {{typed-params returns}}{{/if}}++` [.item-kind]#{{visibility}}#
  61. {{{natspec.dev}}}
  62. {{/each}}
  63. {{#each events}}
  64. [.contract-item]
  65. [[{{anchor}}]]
  66. ==== `[.contract-item-name]#++{{name}}++#++({{typed-params params}})++` [.item-kind]#event#
  67. {{{natspec.dev}}}
  68. {{/each}}