Skip to content

Commit

Permalink
Merge branch 'staging' into patch/aragon-osx-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
banasa44 authored May 10, 2024
2 parents 4d113d0 + 7c0147c commit d352c0f
Show file tree
Hide file tree
Showing 255 changed files with 59 additions and 9,369 deletions.
10 changes: 10 additions & 0 deletions docs/osx/01-get-started.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: ''
sidebar_label: Get Started
sidebar_position: 1
hide_table_of_contents: true
---

import GetStarted from '../../src/pages/get-started.tsx';

<GetStarted />
2 changes: 1 addition & 1 deletion docs/osx/02-how-to-guides/02-plugin-development/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: How to build a DAO Plugin
title: Developing a Plugin
---

## Plugin Development Quickstart Guide
Expand Down
4 changes: 2 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ const config = {
'@graphql-markdown/docusaurus',
{
schema: `./static/subgraph/schema-introspection-partial.json`,
rootPath: './docs/',
rootPath: './versioned_docs/version-1.3.0',
baseURL: 'osx/subgraph/reference-guide',
homepage: './static/subgraph/index.md',
linkRoot: '/docs/1.4.0',
linkRoot: '/docs',
loaders: {
JsonFileLoader: {
module: '@graphql-tools/json-file-loader',
Expand Down
28 changes: 14 additions & 14 deletions scripts/prune-subgraph-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@ line_exists() {

# Add `className: hidden` in 1s line of _category_.yml files
# or `sidebar_class_name: hidden` in 2nd line of .mdx files to hide them from sidebar (added .hidden class in markdown.css)
if ! line_exists "className: hidden" "docs/osx/subgraph/reference-guide/directives/_category_.yml"; then
sed -i '1s/^/className: hidden\n/' "docs/osx/subgraph/reference-guide/directives/_category_.yml"
if ! line_exists "className: hidden" "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/directives/_category_.yml"; then
sed -i '1s/^/className: hidden\n/' "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/directives/_category_.yml"
fi

if ! line_exists "className: hidden" "docs/osx/subgraph/reference-guide/scalars/_category_.yml"; then
sed -i '1s/^/className: hidden\n/' "docs/osx/subgraph/reference-guide/scalars/_category_.yml"
if ! line_exists "className: hidden" "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/scalars/_category_.yml"; then
sed -i '1s/^/className: hidden\n/' "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/scalars/_category_.yml"
fi

if ! line_exists "sidebar_class_name: hidden" "docs/osx/subgraph/reference-guide/objects/query.mdx"; then
sed -i '2s/^/sidebar_class_name: hidden\n/' "docs/osx/subgraph/reference-guide/objects/query.mdx"
if ! line_exists "sidebar_class_name: hidden" "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/objects/query.mdx"; then
sed -i '2s/^/sidebar_class_name: hidden\n/' "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/objects/query.mdx"
fi

# Add pagination_next/pagination_previous to gracefully skip the previous sidbar hidden pages, to hide them from the
# next/previous page buttons at the bottom of the webpages
if ! line_exists "pagination_prev: osx/subgraph/reference-guide/index" "docs/osx/subgraph/reference-guide/enums/permission-operation.mdx"; then
sed -i '2s#^#pagination_prev: osx/subgraph/reference-guide/index\n#' "docs/osx/subgraph/reference-guide/enums/permission-operation.mdx"
if ! line_exists "pagination_prev: osx/subgraph/reference-guide/index" "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/enums/permission-operation.mdx"; then
sed -i '2s#^#pagination_prev: osx/subgraph/reference-guide/index\n#' "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/enums/permission-operation.mdx"
fi

if ! line_exists "pagination_next: osx/subgraph/reference-guide/objects/standard-callback" "docs/osx/subgraph/reference-guide/objects/plugin-version.mdx"; then
sed -i '2s#^#pagination_next: osx/subgraph/reference-guide/objects/standard-callback\n#' "docs/osx/subgraph/reference-guide/objects/plugin-version.mdx"
if ! line_exists "pagination_next: osx/subgraph/reference-guide/objects/standard-callback" "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/objects/plugin-version.mdx"; then
sed -i '2s#^#pagination_next: osx/subgraph/reference-guide/objects/standard-callback\n#' "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/objects/plugin-version.mdx"
fi

if ! line_exists "pagination_prev: osx/subgraph/reference-guide/objects/plugin-version" "docs/osx/subgraph/reference-guide/objects/standard-callback.mdx"; then
sed -i '2s#^#pagination_prev: osx/subgraph/reference-guide/objects/plugin-version\n#' "docs/osx/subgraph/reference-guide/objects/standard-callback.mdx"
if ! line_exists "pagination_prev: osx/subgraph/reference-guide/objects/plugin-version" "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/objects/standard-callback.mdx"; then
sed -i '2s#^#pagination_prev: osx/subgraph/reference-guide/objects/plugin-version\n#' "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/objects/standard-callback.mdx"
fi

if ! line_exists "pagination_next: null" "docs/osx/subgraph/reference-guide/objects/transaction-actions-proposal.mdx"; then
sed -i '2s/^/pagination_next: null\n/' "docs/osx/subgraph/reference-guide/objects/transaction-actions-proposal.mdx"
if ! line_exists "pagination_next: null" "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/objects/transaction-actions-proposal.mdx"; then
sed -i '2s/^/pagination_next: null\n/' "versioned_docs/version-1.3.0/osx/subgraph/reference-guide/objects/transaction-actions-proposal.mdx"
fi
42 changes: 0 additions & 42 deletions src/components/illustrations/aragon-sdk.tsx

This file was deleted.

79 changes: 0 additions & 79 deletions src/components/illustrations/aragon-subgraph.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/illustrations/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
export * from './aragon-sdk';
export * from './design-system';
export * from './aragon-osx';
export * from './aragon-subgraph';
export * from './rocket-icon';
export * from './info-icon';
export * from './page-icon';
22 changes: 1 addition & 21 deletions src/data/ComponentCards.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import React from 'react';
import {IComponentCardProps} from '../components/ComponentCard';
import {
IllustrationSdk,
IllustrationOsx,
IllustrationSubgraph,
IllustrationDesignSystem,
} from '../components';
import {IllustrationOsx, IllustrationDesignSystem} from '../components';

const componentCards: IComponentCardProps[] = [
{
Expand All @@ -15,21 +10,6 @@ const componentCards: IComponentCardProps[] = [
img: <IllustrationOsx />,
to: '/docs/osx',
},
{
title: 'Aragon SDK',
description:
'A Software Development Kit designed with dApp builders in mind. Your gateway into the Aragon OSx protocol in pure JS - no Solidity required.',
img: <IllustrationSdk />,
to: '/docs/sdk',
},
// {
// title: 'Aragon Subgraph',
// description:
// 'A powerful indexing and querying tool to get information from events emitted by the Aragon OSx contracts. The site is currently under development.',
// img: <IllustrationSubgraph />,
// to: '/docs/subgraph',
// cta: 'Learn More (WiP)',
// },
{
title: 'Design System',
description:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: The Smart Contracts behind DAOs
sidebar_label: Smart Contracts
---

## The Contracts Constituting Your DAO
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Framework - How Everything Connects
sidebar_label: Framework
---

## The Infrastructure Running the Aragon OSx Protocol
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: How to Operate a DAO
title: Operating a DAO
---

DAOs are decentralized autonomous organizations. They are a group of people managing on-chain assets through a set of smart contracts.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Upgradeability and the deployment method of a plugin contract go hand in hand. T
Some key things to keep in mind:

- With upgradeable smart contracts, you can modify their code while keep using or even extending the storage (see the guide [Writing Upgradeable Contracts](https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable) by OpenZepplin).
- With upgradeable smart contracts, you can modify their code while keep using or even extending the storage (see the guide [Writing Upgradeable Contracts](https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable) by OpenZeppelin).
- To enable upgradeable smart contracts (as well as cheap contract clones), the proxy pattern is used.
- Depending on your upgradeability requirements and the deployment method you choose, you can also greatly reduce the gas costs to distribute your plugin. However, the upgradeability and deployment method can introduce caveats during [the plugin setup](../../01-how-it-works/02-framework/02-plugin-management/02-plugin-setup/index.md), especially when updating from an older version to a new one.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ contract SimpleAdmin is PluginCloneable {
}
```

We must protect it from being called multiple times by using [OpenZepplin's `initializer` modifier made available through `Initalizable`](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Initializable) and call the internal function `__PluginCloneable_init(IDAO _dao)` available through the `PluginCloneable` base contract to store the `IDAO _dao` reference in the right place.
We must protect it from being called multiple times by using [OpenZeppelin's `initializer` modifier made available through `Initalizable`](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Initializable) and call the internal function `__PluginCloneable_init(IDAO _dao)` available through the `PluginCloneable` base contract to store the `IDAO _dao` reference in the right place.

:::caution
If you forget calling `__PluginCloneable_init(_dao)` inside your `initialize` function, your plugin won't be associated with a DAO and cannot use the DAO's `PermissionManager`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ contract SimpleAdminSetup is PluginSetup {
}
```

Then, we will use [OpenZepplin's `Clones` library](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Clones) to clone our Plugin contract and initialize it with the `admin` address. The first line, `using Clones for address;`, allows us to call OpenZepplin `Clones` library to clone contracts deployed at an address.
Then, we will use [OpenZeppelin's `Clones` library](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Clones) to clone our Plugin contract and initialize it with the `admin` address. The first line, `using Clones for address;`, allows us to call OpenZeppelin `Clones` library to clone contracts deployed at an address.

The second line introduces a custom error being thrown if the admin address specified is the zero address.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Intialization

To deploy your implementation contract via the [UUPS pattern (ERC-1822)](https://eips.ethereum.org/EIPS/eip-1822), you inherit from the `PluginUUPSUpgradeable` contract.

We must protect it from being set up multiple times by using [OpenZepplin's `initializer` modifier made available through `Initalizable`](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Initializable). In order to do this, we will call the internal function `__PluginUUPSUpgradeable_init(IDAO _dao)` function available through the `PluginUUPSUpgradeable` base contract to store the `IDAO _dao` reference in the right place.
We must protect it from being set up multiple times by using [OpenZeppelin's `initializer` modifier made available through `Initalizable`](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Initializable). In order to do this, we will call the internal function `__PluginUUPSUpgradeable_init(IDAO _dao)` function available through the `PluginUUPSUpgradeable` base contract to store the `IDAO _dao` reference in the right place.

:::note
This has to be called - otherwise, anyone else could call the plugin's initialization with whatever params they wanted.
Expand Down
Loading

0 comments on commit d352c0f

Please sign in to comment.