-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathcontract.hbs
More file actions
158 lines (126 loc) · 4.12 KB
/
contract.hbs
File metadata and controls
158 lines (126 loc) · 4.12 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
{{reset-function-counts}}<a id="{{anchor}}"></a>
<div style=\{{marginTop: "4em"}} className="w-full flex flex-row items-center justify-between">
## `{{{name}}}`
<a target="_blank" style=\{{marginTop: "1.5em"}} href="https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v{{oz-version}}/{{__item_context.file.absolutePath}}">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-github-icon lucide-github"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"/><path d="M9 18c-4.51 2-5-2-7-2"/></svg>
</a>
</div>
```solidity
import "@openzeppelin/{{__item_context.file.absolutePath}}";
```
{{{process-natspec natspec.dev}}}
{{#if modifiers}}
<div className="bg-secondary p-4 rounded-md mb-6">
<h3 style=\{{ marginTop: "0"}}>Modifiers</h3>
<div className="font-mono">
{{#each modifiers}}
- [{{{name}}}({{names params}})](#{{anchor}})
{{/each}}
</div>
</div>
{{/if}}
{{#if has-functions}}
<div className="bg-secondary p-4 rounded-md mb-6">
<h3 style=\{{ marginTop: "0"}}>Functions</h3>
<div className="font-mono">
{{#each inherited-functions}}
{{#unless @first}}
#### {{contract.name}} [!toc]
{{/unless}}
{{#each functions}}
- [{{{name}}}({{names params}})](#{{anchor}})
{{/each}}
{{/each}}
</div>
</div>
{{/if}}
{{#if has-events}}
<div className="bg-secondary p-4 rounded-md mb-6">
<h3 style=\{{ marginTop: "0"}}>Events</h3>
<div className="font-mono">
{{#each inheritance}}
{{#unless @first}}
#### {{name}} [!toc]
{{/unless}}
{{#each events}}
- [{{{name}}}({{names params}})](#{{anchor}})
{{/each}}
{{/each}}
</div>
</div>
{{/if}}
{{#if has-errors}}
<div className="bg-secondary p-4 rounded-md mb-6">
<h3 style=\{{ marginTop: "0"}}>Errors</h3>
<div className="font-mono">
{{#each inheritance}}
{{#unless @first}}
#### {{name}} [!toc]
{{/unless}}
{{#each errors}}
- [{{{name}}}({{names params}})](#{{anchor}})
{{/each}}
{{/each}}
</div>
</div>
{{/if}}
{{#each modifiers}}
<a id="{{anchor}}"></a>
<div className="border rounded-md mb-4">
<div className="bg-secondary flex w-full justify-between px-4">
<p className="font-bold text-sm font-mono">{{{name}}}({{typed-params params}})</p>
<div className="flex flex-row items-center gap-2">
<p className="font-light text-sm">{{visibility}}</p>
<a className="peer" data-card href="#{{anchor}}">#</a>
</div>
</div>
<div className="px-4">
{{{process-natspec natspec.dev}}}
</div>
</div>
{{/each}}
{{#each functions}}
<a id="{{anchor}}"></a>
<div className="border rounded-md mb-4">
<div className="bg-secondary flex w-full justify-between px-4">
<p className="font-bold text-sm font-mono">{{{name}}}({{typed-params params}}){{#if returns2}} → {{typed-params returns2}}{{/if}}</p>
<div className="flex flex-row items-center gap-2">
<p className="font-light text-sm">{{visibility}}</p>
<a className="peer" data-card href="#{{anchor}}">#</a>
</div>
</div>
<div className="px-4">
{{{process-natspec natspec.dev}}}
</div>
</div>
{{/each}}
{{#each events}}
<a id="{{anchor}}"></a>
<div className="border rounded-md mb-4">
<div className="bg-secondary flex w-full justify-between px-4">
<p className="font-bold text-sm font-mono">{{{name}}}({{typed-params params}})</p>
<div className="flex flex-row items-center gap-2">
<p className="font-light text-sm">event</p>
<a className="peer" data-card href="#{{anchor}}">#</a>
</div>
</div>
<div className="px-4">
{{{process-natspec natspec.dev}}}
</div>
</div>
{{/each}}
{{#each errors}}
<a id="{{anchor}}"></a>
<div className="border rounded-md mb-4">
<div className="bg-secondary flex w-full justify-between px-4">
<p className="font-bold text-sm font-mono">{{{name}}}({{typed-params params}})</p>
<div className="flex flex-row items-center gap-2">
<p className="font-light text-sm">error</p>
<a className="peer" data-card href="#{{anchor}}">#</a>
</div>
</div>
<div className="px-4">
{{{process-natspec natspec.dev}}}
</div>
</div>
{{/each}}