contract.hbs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 ownModifiers}}
  12. [.contract-index]
  13. .Modifiers
  14. --
  15. {{#each ownModifiers}}
  16. * {xref-{{slug anchor~}} }[`++{{name}}({{args.names}})++`]
  17. {{/each}}
  18. --
  19. {{/if}}
  20. {{#if functions}}
  21. [.contract-index]
  22. .Functions
  23. --
  24. {{#each inheritedItems}}
  25. {{#if (or @first (ne contract.name "Context"))}}
  26. {{#unless @first}}
  27. [.contract-subindex-inherited]
  28. .{{contract.name}}
  29. {{/unless}}
  30. {{#each functions}}
  31. * {xref-{{slug anchor~}} }[`++{{name}}({{args.names}})++`]
  32. {{/each}}
  33. {{/if}}
  34. {{/each}}
  35. --
  36. {{/if}}
  37. {{#if events}}
  38. [.contract-index]
  39. .Events
  40. --
  41. {{#each inheritedItems}}
  42. {{#unless @first}}
  43. [.contract-subindex-inherited]
  44. .{{contract.name}}
  45. {{/unless}}
  46. {{#each events}}
  47. * {xref-{{slug anchor~}} }[`++{{name}}({{args.names}})++`]
  48. {{/each}}
  49. {{/each}}
  50. --
  51. {{/if}}
  52. {{#each ownModifiers}}
  53. [.contract-item]
  54. [[{{anchor}}]]
  55. ==== `++{{name}}({{> typed-variable-array args}})++` [.item-kind]#modifier#
  56. {{natspec.devdoc}}
  57. {{/each}}
  58. {{#each ownFunctions}}
  59. [.contract-item]
  60. [[{{anchor}}]]
  61. ==== `++{{name}}({{> typed-variable-array args}}){{#if outputs}} → {{> typed-variable-array outputs}}{{/if}}++` [.item-kind]#{{visibility}}#
  62. {{natspec.devdoc}}
  63. {{/each}}
  64. {{#each ownEvents}}
  65. [.contract-item]
  66. [[{{anchor}}]]
  67. ==== `++{{name}}({{> typed-variable-array args}})++` [.item-kind]#event#
  68. {{natspec.devdoc}}
  69. {{/each}}