-
Notifications
You must be signed in to change notification settings - Fork 10
/
contract.hbs
66 lines (60 loc) · 1.87 KB
/
contract.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{{h}} {{name}}
{{#if natspec.title}}
### {{{natspec.title}}}
{{/if}}
{{{natspec.user}}}
{{{natspec.dev}}}
{{#if functions}}
## Functions
{{/if}}
{{#functions}}
### {{name}}
```solidity
function {{name}}(
{{#each params}}
{{formatVariable this}}{{#if @last}}{{else}},{{/if}}
{{/each}}
) {{visibility}}{{#if returns}} returns ({{#each returns}}{{type}} {{#if name}}{{name}}{{else}}[{{@index}}]{{/if}}{{#if @last}}{{else}}, {{/if}}{{/each}}){{/if}}
```
{{#if natspec.user}}{{natspec.user}}{{/if}}
{{#if natspec.dev}}{{natspec.dev}}{{/if}}
{{#if natspec.params}}
#### Parameters:
| Name | Type | Description |
| :--- | :--- | :------------------------------------------------------------------- |
{{#each params}}
| {{name}} | {{type}} | {{{joinLines natspec}}} |
{{/each}}
{{/if}}
{{#if natspec.returns}}
#### Return Values:
| Name | Type | Description |
| :----------------------------- | :------------ | :--------------------------------------------------------------------------- |
{{#each returns}}
| {{#if name}}`{{name}}`{{else}}`[{{@index}}]`{{/if}} | {{type}} | {{{joinLines natspec}}} |
{{/each}}
{{/if}}
{{/functions}}
{{#if natspec.events}}
## Events
{{/if}}
{{#events}}
### {{name}}
```solidity
event {{name}}(
{{#each params}}
{{formatVariable this}}{{#if @last}}{{else}},{{/if}}
{{/each}}
)
```
{{#if natspec.user}}{{natspec.user}}{{/if}}
{{#if natspec.dev}}{{natspec.dev}}{{/if}}
{{#if params}}
#### Parameters:
| Name | Type | Description |
| :----------------------------- | :------------ | :--------------------------------------------- |
{{#each params}}
| {{name}} | {{type}} | {{{joinLines natspec}}} |
{{/each}}
{{/if}}
{{/events}}