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 762af58 commit 4b7ad94
Show file tree
Hide file tree
Showing 26 changed files with 2,759 additions and 151 deletions.
65 changes: 65 additions & 0 deletions contracts/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
= OSX Commons

This is the reference guide for the link:https://github.com/aragon/osx-commons[osx-commons-contracts] package.

== Core

{{IDAO}}

{{Executor}}

{{PermissionLib}}

{{DAOAuthorizable}}

{{DAOAuthorizableUpgradeable}}

== Plugins

{{Plugin}}

{{PluginCloneable}}

{{PluginUUPSUpgradeable}}

{{PluginSetup}}

{{PluginSetupUpgradeable}}

== Plugins Extensions

{{Proposal}}

{{ProposalUpgradeable}}

{{IMembership}}

{{Addresslist}}

== Utils

{{MetadataExtension}}

{{MetadataExtensionUpgradeable}}

{{ProtocolVersion}}

{{BitMap}}

{{Ratio}}

{{ProxyFactory}}

{{ProxyLib}}

== Conditions

{{PermissionCondition}}

{{PermissionConditionUpgradeable}}

{{RuledCondition}}

{{PermissionManager}}

{{CallbackHandler}}
7 changes: 7 additions & 0 deletions contracts/docs/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: osx-commons-contracts
title: OSX Commons
version: 1.x
prerelease: false
nav:
- modules/ROOT/nav.adoc
- modules/api/nav.adoc
14 changes: 14 additions & 0 deletions contracts/docs/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const path = require('path');
const fs = require('fs');

/** @type import('solidity-docgen/dist/config').UserConfig */
module.exports = {
outputDir: 'docs/modules/api/pages',
templates: 'docs/templates',
exclude: ['mocks', 'test'],
pageExtension: '.adoc',
collapseNewlines: true,
pages: (_, file, config) => {
return 'osx-commons' + config.pageExtension;
},
};
1 change: 1 addition & 0 deletions contracts/docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* xref:index.adoc[Overview]
3 changes: 3 additions & 0 deletions contracts/docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
= OSX Commons.

link:https://github.com/aragon/osx-commons[OSX commons] package is used to help with Aragon's project to avoid code duplication.
2 changes: 2 additions & 0 deletions contracts/docs/modules/api/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.API
* xref:osx-commons.adoc[Osx Commons]
2,206 changes: 2,206 additions & 0 deletions contracts/docs/modules/api/pages/osx-commons.adoc

Large diffs are not rendered by default.

35 changes: 0 additions & 35 deletions contracts/docs/templates/common.hbs

This file was deleted.

175 changes: 169 additions & 6 deletions contracts/docs/templates/contract.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,175 @@
## Description
{{#each items}}
:{{name}}: pass:normal[xref:#{{anchor}}[`++{{name}}++`]]
{{/each}}

[.contract]
[[{{anchor}}]]
=== `++{{name}}++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v{{oz-version}}/{{__item_context.file.absolutePath}}[{github-icon},role=heading-link]

{{{natspec.notice}}}

{{{natspec.dev}}}

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

{{#if has-functions}}
[.contract-index]
.Functions
--
{{#each inherited-functions}}
{{#unless @first}}
[.contract-subindex-inherited]
.{{contract.name}}
{{/unless}}
{{#if (isLocalContract contract.name)}}
{{#each functions}}
* {xref-{{anchor~}} }[`++{{name}}({{names params}})++`]
{{/each}}
{{else if (isAragonInherittedContract contract.__item_context.file.absolutePath) }}
{{#each functions}}
* link:{{getExternalLink __item_context.file.absolutePath}}[{{name}}]
{{/each}}
{{/if}}

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


{{#if has-events}}
[.contract-index]
.Events
--
{{#each inheritance}}
{{#unless @first}}
[.contract-subindex-inherited]
.{{name}}
{{/unless}}
{{#if (isLocalContract name)}}
{{#each events}}
* {xref-{{anchor~}} }[`++{{name}}({{names params}})++`]
{{/each}}
{{else if (isAragonInherittedContract __item_context.file.absolutePath) }}
{{#each events}}
* link:{{getExternalLink __item_context.file.absolutePath}}[{{name}}]
{{/each}}
{{/if}}

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

{{#if has-errors}}
[.contract-index]
.Errors
--
{{#each inheritance}}
{{#unless @first}}
[.contract-subindex-inherited]
.{{name}}
{{/unless}}
{{#if (isLocalContract contract.name)}}
{{#each errors}}
* {xref-{{anchor~}} }[`++{{name}}({{names params}})++`]
{{/each}}
{{else if (isAragonInherittedContract __item_context.file.absolutePath) }}
{{#each errors}}
* link:{{getExternalLink __item_context.file.absolutePath}}[{{name}}]
{{/each}}
{{/if}}

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


{{#if has-internal-variables}}
[.contract-index]
.Internal Variables
--
{{#each inheritance}}
{{#unless @first}}
[.contract-subindex-inherited]
.{{name}}
{{/unless}}
{{#if (isLocalContract contract.name)}}
{{#each internal-variables}}
* {xref-{{anchor~}} }[`++{{typeDescriptions.typeString}} {{#if constant}}constant{{/if}} {{name}}++`]
{{/each}}
{{else if (isAragonInherittedContract __item_context.file.absolutePath) }}
{{#each errors}}
* link:{{getExternalLink __item_context.file.absolutePath}}[{{name}}]
{{/each}}
{{/if}}

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

{{#each modifiers}}
[.contract-item]
[[{{anchor}}]]
==== `[.contract-item-name]#++{{name}}++#++({{typed-params params}})++` [.item-kind]#modifier#

{{natspec.notice}}

{{natspec.dev}}

{{/each}}

{{#each functions}}
[.contract-item]
[[{{anchor}}]]
==== `[.contract-item-name]#++{{name}}++#++({{typed-params params}}){{#if returns2}}{{typed-params returns2}}{{/if}}++` [.item-kind]#{{visibility}}#

{{natspec.notice}}

{{natspec.dev}}

{{/each}}

{{#each events}}
[.contract-item]
[[{{anchor}}]]
==== `[.contract-item-name]#++{{name}}++#++({{typed-params params}})++` [.item-kind]#event#

{{natspec.notice}}

{{natspec.dev}}

{{/each}}

{{#each errors}}
[.contract-item]
[[{{anchor}}]]
==== `[.contract-item-name]#++{{name}}++#++({{typed-params params}})++` [.item-kind]#error#

{{natspec.notice}}

{{natspec.dev}}

{{/each}}

{{#each internal-variables}}
[.contract-item]
[[{{anchor}}]]
==== `{{typeDescriptions.typeString}} [.contract-item-name]#++{{name}}++#` [.item-kind]#internal{{#if constant}} constant{{/if}}#

{{natspec.notice}}

{{natspec.dev}}

{{#each items}}
{{>item}}
{{/each}}
<!--CONTRACT_END-->
9 changes: 0 additions & 9 deletions contracts/docs/templates/enum.hbs

This file was deleted.

1 change: 0 additions & 1 deletion contracts/docs/templates/error.hbs

This file was deleted.

1 change: 0 additions & 1 deletion contracts/docs/templates/event.hbs

This file was deleted.

1 change: 0 additions & 1 deletion contracts/docs/templates/function.hbs

This file was deleted.

Loading

0 comments on commit 4b7ad94

Please sign in to comment.