Skip to content

Commit

Permalink
fix(docs): fix docs template return values
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrickGT committed Jan 4, 2022
1 parent f78cda0 commit fa61587
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions templates/contract.hbs
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
{{{natspec.userdoc}}}
{{{natspec.devdoc}}}

{{#each ownStructs}}
{{#if structs}}
## Structs
{{/if}}
{{#each structs}}
### `{{name}}`

{{#each members}}
- {{type}} {{name}}
- {{type}} {{name}}
{{/each}}

{{/each}}

{{#each ownEnums}}
{{#if enums}}
## Enums
{{/if}}
{{#each enums}}
### `{{name}}`

All members: {{members}}

{{#each members}}
- {{.}}
{{/each}}

{{/each}}

{{#if functions}}
## Functions
{{/if}}
Expand All @@ -43,10 +45,10 @@ All members: {{members}}
|`{{param}}` | {{#lookup ../args.types @index}}{{/lookup}} | {{ description }}{{/natspec.params}}{{/if}}
{{#if natspec.returns}}
#### Return Values:
| Name | Type | Description |
| :----------------------------- | :------------ | :--------------------------------------------------------------------------- |
| Type | Description |
| :------------ | :--------------------------------------------------------------------------- |
{{#natspec.returns}}
|`{{param}}`| {{#lookup ../args.types @index}}{{/lookup}} | {{{description}}}{{/natspec.returns}}{{/if}}
| {{#lookup ../outputs.types @index}}{{/lookup}} | {{param}} {{{description}}}{{/natspec.returns}}{{/if}}
{{/unless}}
{{/functions}}
{{#if events}}
Expand All @@ -69,4 +71,4 @@ All members: {{members}}
| :----------------------------- | :------------ | :--------------------------------------------- |
{{#natspec.params}}
|`{{param}}`| {{#lookup ../args.types @index}}{{/lookup}} | {{{description}}}{{/natspec.params}}{{/if}}
{{/events}}
{{/events}}

0 comments on commit fa61587

Please sign in to comment.