Replace custom errors with native panic codes in DoubleEndedQueue (#4872)
Co-authored-by: ernestognw <ernestognw@gmail.com>
This commit is contained in:
26
docs/templates/contract.hbs
vendored
26
docs/templates/contract.hbs
vendored
@ -74,6 +74,23 @@ import "@openzeppelin/{{__item_context.file.absolutePath}}";
|
||||
--
|
||||
{{/if}}
|
||||
|
||||
{{#if has-internal-variables}}
|
||||
[.contract-index]
|
||||
.Internal Variables
|
||||
--
|
||||
{{#each inheritance}}
|
||||
{{#unless @first}}
|
||||
[.contract-subindex-inherited]
|
||||
.{{name}}
|
||||
{{/unless}}
|
||||
{{#each internal-variables}}
|
||||
* {xref-{{anchor~}} }[`++{{typeDescriptions.typeString}} {{#if constant}}constant{{/if}} {{name}}++`]
|
||||
{{/each}}
|
||||
|
||||
{{/each}}
|
||||
--
|
||||
{{/if}}
|
||||
|
||||
{{#each modifiers}}
|
||||
[.contract-item]
|
||||
[[{{anchor}}]]
|
||||
@ -109,3 +126,12 @@ import "@openzeppelin/{{__item_context.file.absolutePath}}";
|
||||
{{{natspec.dev}}}
|
||||
|
||||
{{/each}}
|
||||
|
||||
{{#each internal-variables}}
|
||||
[.contract-item]
|
||||
[[{{anchor}}]]
|
||||
==== `{{typeDescriptions.typeString}} [.contract-item-name]#++{{name}}++#` [.item-kind]#internal{{#if constant}} constant{{/if}}#
|
||||
|
||||
{{{natspec.dev}}}
|
||||
|
||||
{{/each}}
|
||||
|
||||
8
docs/templates/properties.js
vendored
8
docs/templates/properties.js
vendored
@ -39,6 +39,14 @@ module.exports['has-errors'] = function ({ item }) {
|
||||
return item.inheritance.some(c => c.errors.length > 0);
|
||||
};
|
||||
|
||||
module.exports['internal-variables'] = function ({ item }) {
|
||||
return item.variables.filter(({ visibility }) => visibility === 'internal');
|
||||
};
|
||||
|
||||
module.exports['has-internal-variables'] = function ({ item }) {
|
||||
return module.exports['internal-variables']({ item }).length > 0;
|
||||
};
|
||||
|
||||
module.exports.functions = function ({ item }) {
|
||||
return [
|
||||
...[...findAll('FunctionDefinition', item)].filter(f => f.visibility !== 'private'),
|
||||
|
||||
Reference in New Issue
Block a user