Skip to content

Commit

Permalink
new
Browse files Browse the repository at this point in the history
  • Loading branch information
novaknole committed Nov 17, 2024
1 parent 4b7ad94 commit 9107356
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 30 deletions.
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ generated
!configs/src/deployments/
!configs/src/test/unit/deployments/

contracts/docs/templates/contract.hbs
contracts/docs/templates/page.hbs


# files
*.env
*.log
Expand Down
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"code-complexity": ["error", 8],
"compiler-version": ["error", ">=0.8.4"],
"func-visibility": ["error", {"ignoreConstructors": true}],
"max-line-length": ["off"],
"max-line-length": ["error", 120],
"named-parameters-mapping": "warn",
"no-console": "off",
"not-rely-on-time": "off",
Expand Down
16 changes: 16 additions & 0 deletions contracts/docs/modules/api/pages/osx-commons.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
:xref-IDAO-Deposited-address-address-uint256-string-: xref:osx-commons.adoc#IDAO-Deposited-address-address-uint256-string-
:xref-IDAO-NativeTokenDeposited-address-uint256-: xref:osx-commons.adoc#IDAO-NativeTokenDeposited-address-uint256-
:xref-IDAO-TrustedForwarderSet-address-: xref:osx-commons.adoc#IDAO-TrustedForwarderSet-address-
:xref-Executor-nonReentrant--: xref:osx-commons.adoc#Executor-nonReentrant--
:xref-Executor-constructor--: xref:osx-commons.adoc#Executor-constructor--
:xref-Executor-supportsInterface-bytes4-: xref:osx-commons.adoc#Executor-supportsInterface-bytes4-
:xref-Executor-execute-bytes32-struct-Action---uint256-: xref:osx-commons.adoc#Executor-execute-bytes32-struct-Action---uint256-
Expand Down Expand Up @@ -45,6 +46,7 @@
:xref-DaoAuthorizableUpgradeable-__DaoAuthorizableUpgradeable_init-contract-IDAO-: xref:osx-commons.adoc#DaoAuthorizableUpgradeable-__DaoAuthorizableUpgradeable_init-contract-IDAO-
:xref-DaoAuthorizableUpgradeable-dao--: xref:osx-commons.adoc#DaoAuthorizableUpgradeable-dao--
:xref-PluginCloneable-TargetSet-struct-IPlugin-TargetConfig-: xref:osx-commons.adoc#PluginCloneable-TargetSet-struct-IPlugin-TargetConfig-
:xref-PluginUUPSUpgradeable-onlyCallAtInitialization--: xref:osx-commons.adoc#PluginUUPSUpgradeable-onlyCallAtInitialization--
:xref-PluginUUPSUpgradeable-constructor--: xref:osx-commons.adoc#PluginUUPSUpgradeable-constructor--
:xref-PluginUUPSUpgradeable-pluginType--: xref:osx-commons.adoc#PluginUUPSUpgradeable-pluginType--
:xref-PluginUUPSUpgradeable-getCurrentTargetConfig--: xref:osx-commons.adoc#PluginUUPSUpgradeable-getCurrentTargetConfig--
Expand Down Expand Up @@ -292,6 +294,13 @@ This doesn't use any type of permission for execution and can be called by anyon
If used with delegatecall, DO NOT add state variables in sequential slots, otherwise this will overwrite
the storage of the calling contract.

[.contract-index]
.Modifiers
--
* {xref-Executor-nonReentrant--}[`++nonReentrant()++`]

--

[.contract-index]
.Functions
--
Expand Down Expand Up @@ -858,6 +867,13 @@ Thrown when `delegatecall` fails.
[[PluginUUPSUpgradeable]]
=== `++PluginUUPSUpgradeable++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v/src/plugin/PluginUUPSUpgradeable.sol[{github-icon},role=heading-link]

[.contract-index]
.Modifiers
--
* {xref-PluginUUPSUpgradeable-onlyCallAtInitialization--}[`++onlyCallAtInitialization()++`]

--

[.contract-index]
.Functions
--
Expand Down
13 changes: 6 additions & 7 deletions contracts/docs/templates/contract.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@

{{{natspec.dev}}}

{{!-- {{#if modifiers}}
{{#if modifiers}}
[.contract-index]
.Modifiers
--
{{#if (isLocalContract contract.name)}}
{{#each modifiers}}
{{#if (isLocalContract __item_context.contract.name)}}
* {xref-{{anchor~}} }[`++{{name}}({{names params}})++`]
{{/each}}
{{else if (isAragonInherittedContract contract) }}
{{#each modifiers}}
{{else if (isAragonInherittedContract __item_context.file.absolutePath) }}
* link:{{getExternalLink __item_context.file.absolutePath}}[{{name}}]
{{/each}}
{{/if}}
{{/each}}

--
{{/if}} --}}
{{/if}}

{{#if has-functions}}
[.contract-index]
Expand Down
8 changes: 0 additions & 8 deletions contracts/docs/templates/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ module.exports['getExternalLink'] = absolutePath => {
return 'github.com';
};

// module.exports['isAragonInherittedContract1'] = contract => {
// console.log(contract, 'oe');
// };

// module.exports['getExternalLink1'] = item => {
// // console.log(item, 'oe');
// };

module.exports.names = params => params?.map(p => p.name).join(', ');

module.exports['typed-params'] = params => {
Expand Down
14 changes: 0 additions & 14 deletions contracts/docs/templates/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ module.exports.inheritance = function ({item, build}) {
throw new Error('used inherited-items on non-contract');
}

// console.log(
// item.linearizedBaseContracts
// .map(id => build.deref('ContractDefinition', id))
// .filter((c, i) => c.name !== 'Context' || i === 0),
// ' awesome'
// );
return item.linearizedBaseContracts
.map(id => build.deref('ContractDefinition', id))
.filter((c, i) => c.name !== 'Context' || i === 0);
Expand Down Expand Up @@ -87,13 +81,5 @@ module.exports['inherited-functions'] = function ({item}) {
),
}));

// d.map(item => {
// // console.log(item.contract.name);
// // console.log('starts');
// item.functions.map(item2 => {
// console.log(item2);
// });
// console.log('ends');
// });
return d;
};

0 comments on commit 9107356

Please sign in to comment.