contract.hbs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. {{~#*inline "typed-variable-array"~}}
  2. {{#each .}}++[.var-type]#++{{typeName}}++#++{{#if name}} ++[.var-name]#++{{name}}++#++{{/if}}{{#unless @last}}, {{/unless}}{{/each}}
  3. {{~/inline~}}
  4. {{#each linkable}}
  5. :{{name}}: pass:normal[xref:#{{anchor}}[`++{{name}}++`]]
  6. {{/each}}
  7. [.contract]
  8. [[{{anchor}}]]
  9. === `++{{name}}++`
  10. {{natspec.devdoc}}
  11. {{#if modifiers}}
  12. [.contract-index]
  13. .Modifiers
  14. --
  15. {{#each inheritedItems}}
  16. {{#unless @first}}
  17. [.contract-subindex-inherited]
  18. .{{contract.name}}
  19. {{/unless}}
  20. {{#each modifiers}}
  21. * {xref-{{slug anchor~}} }[`++{{name}}({{args.names}})++`]
  22. {{/each}}
  23. {{/each}}
  24. --
  25. {{/if}}
  26. {{#if functions}}
  27. [.contract-index]
  28. .Functions
  29. --
  30. {{#each inheritedItems}}
  31. {{#if (or @first (ne contract.name "Context"))}}
  32. {{#unless @first}}
  33. [.contract-subindex-inherited]
  34. .{{contract.name}}
  35. {{/unless}}
  36. {{#each functions}}
  37. * {xref-{{slug anchor~}} }[`++{{name}}({{args.names}})++`]
  38. {{/each}}
  39. {{/if}}
  40. {{/each}}
  41. --
  42. {{/if}}
  43. {{#if events}}
  44. [.contract-index]
  45. .Events
  46. --
  47. {{#each inheritedItems}}
  48. {{#unless @first}}
  49. [.contract-subindex-inherited]
  50. .{{contract.name}}
  51. {{/unless}}
  52. {{#each events}}
  53. * {xref-{{slug anchor~}} }[`++{{name}}({{args.names}})++`]
  54. {{/each}}
  55. {{/each}}
  56. --
  57. {{/if}}
  58. {{#each ownModifiers}}
  59. [.contract-item]
  60. [[{{anchor}}]]
  61. ==== `++{{name}}({{> typed-variable-array args}})++` [.item-kind]#modifier#
  62. {{natspec.devdoc}}
  63. {{/each}}
  64. {{#each ownFunctions}}
  65. [.contract-item]
  66. [[{{anchor}}]]
  67. ==== `++{{name}}({{> typed-variable-array args}}){{#if outputs}} → {{> typed-variable-array outputs}}{{/if}}++` [.item-kind]#{{visibility}}#
  68. {{natspec.devdoc}}
  69. {{/each}}
  70. {{#each ownEvents}}
  71. [.contract-item]
  72. [[{{anchor}}]]
  73. ==== `++{{name}}({{> typed-variable-array args}})++` [.item-kind]#event#
  74. {{natspec.devdoc}}
  75. {{/each}}