Skip to content

Commit 2a5bfb0

Browse files
committed
chore: Merge branch 'main' into chore/telegram-visibility
2 parents 9701536 + ba42074 commit 2a5bfb0

File tree

78 files changed

+1036
-321
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1036
-321
lines changed

.github/workflows/sync-search.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: Sync Search Content
33
on:
44
push:
55
branches: [main]
6-
pull_request:
7-
branches: [main]
86

97
jobs:
108
sync-search:

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,52 @@ Product-specific icons located in `src/components/icons/`:
131131
- **Version Switching**: Multi-version documentation support
132132
- **Responsive Design**: Mobile-optimized navigation and content
133133

134+
## Solidity Docgen
135+
136+
Any library using Solidity Docgen can utilize the `docgen` templates and config file in their repo to generate markdown API references for the docs. To get started follow the instructions below:
137+
138+
### 1. Add the templates to your repo
139+
140+
Inside this docs repo is the [`docgen`](https://github.com/OpenZeppelin/docs/tree/main/docgen) folder which contains [`templates-md`](https://github.com/OpenZeppelin/docs/tree/main/docgen/templates-md) and [`config-md.js`](https://github.com/OpenZeppelin/docs/blob/main/docgen/config-md.js). Copy both of these items into your `docs` folder in your repo. Once there open the [`templates-md/helpers.js`](https://github.com/OpenZeppelin/docs/blob/main/docgen/templates-md/helpers.js) file and update the `API_DOCS_PATH` constant to match your export path.
141+
142+
```js
143+
const API_DOCS_PATH = 'contracts/5.x/api';
144+
// const API_DOCS_PATH = 'community-contracts/api';
145+
// const API_DOCS_PATH = 'confidential-contracts/api';
146+
// const API_DOCS_PATH = 'uniswap-hooks/api';
147+
```
148+
149+
### 2. Update the `hardhat.config.js` file
150+
151+
With the `config-md.js` file now in the `docs` folder, update your `hardhat.config.js` to use the new config file.
152+
153+
```js
154+
{
155+
// other config options
156+
docgen: require('./docs/config-md'),
157+
}
158+
```
159+
160+
Once added make sure these are accessible in your branches going forward. If you are generating an API reference for previous branches you will need to repeat steps 1 and 2 for those branches.
161+
162+
### 3. Run the `generate-api-docs.js` script
163+
164+
With your remote repo setup with the new template files you can run the `scripts/generate-api-docs.js` script. Be sure to pass in the correct arguements for your docs
165+
166+
```bash
167+
node scripts/generate-api-docs.js \
168+
--repo https://github.com/OpenZeppelin/openzeppelin-community-contracts.git \
169+
--branch release-v5.5 \
170+
--api-output content/contracts/5.x/api \
171+
--examples-output examples
172+
```
173+
174+
This wil lexport the contents to
175+
176+
### Automated Setup
177+
178+
In the case you want to setup an automated GitHub workflow to create these API docs visit the [docs-api-generation-workflows](https://github.com/OpenZeppelin/docs-api-generation-workflows) for more info. This repo (`OpenZeppelin/docs`) is the `Docs Receiver` side of the equation.
179+
134180
## Content Management
135181

136182
### Adding New Content

content/relayer/1.1.x/api/callPlugin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _openapi:
1212

1313
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
1414

15-
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/docs/openapi.json"} operations={[{"path":"/api/v1/plugins/{plugin_id}/call","method":"post"}]} webhooks={[]} hasHead={false} />
15+
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/openapi.json"} operations={[{"path":"/api/v1/plugins/{plugin_id}/call","method":"post"}]} webhooks={[]} hasHead={false} />

content/relayer/1.1.x/api/cancelTransaction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _openapi:
1212

1313
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
1414

15-
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/docs/openapi.json"} operations={[{"path":"/api/v1/relayers/{relayer_id}/transactions/{transaction_id}","method":"delete"}]} webhooks={[]} hasHead={false} />
15+
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/openapi.json"} operations={[{"path":"/api/v1/relayers/{relayer_id}/transactions/{transaction_id}","method":"delete"}]} webhooks={[]} hasHead={false} />

content/relayer/1.1.x/api/createNotification.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _openapi:
1212

1313
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
1414

15-
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/docs/openapi.json"} operations={[{"path":"/api/v1/notifications","method":"post"}]} webhooks={[]} hasHead={false} />
15+
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/openapi.json"} operations={[{"path":"/api/v1/notifications","method":"post"}]} webhooks={[]} hasHead={false} />

content/relayer/1.1.x/api/createRelayer.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _openapi:
1212

1313
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
1414

15-
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/docs/openapi.json"} operations={[{"path":"/api/v1/relayers","method":"post"}]} webhooks={[]} hasHead={false} />
15+
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/openapi.json"} operations={[{"path":"/api/v1/relayers","method":"post"}]} webhooks={[]} hasHead={false} />

content/relayer/1.1.x/api/createSigner.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _openapi:
1212

1313
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
1414

15-
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/docs/openapi.json"} operations={[{"path":"/api/v1/signers","method":"post"}]} webhooks={[]} hasHead={false} />
15+
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/openapi.json"} operations={[{"path":"/api/v1/signers","method":"post"}]} webhooks={[]} hasHead={false} />

content/relayer/1.1.x/api/deleteNotification.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _openapi:
1212

1313
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
1414

15-
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/docs/openapi.json"} operations={[{"path":"/api/v1/notifications/{notification_id}","method":"delete"}]} webhooks={[]} hasHead={false} />
15+
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/openapi.json"} operations={[{"path":"/api/v1/notifications/{notification_id}","method":"delete"}]} webhooks={[]} hasHead={false} />

content/relayer/1.1.x/api/deletePendingTransactions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _openapi:
1212

1313
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
1414

15-
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/docs/openapi.json"} operations={[{"path":"/api/v1/relayers/{relayer_id}/transactions/pending","method":"delete"}]} webhooks={[]} hasHead={false} />
15+
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/openapi.json"} operations={[{"path":"/api/v1/relayers/{relayer_id}/transactions/pending","method":"delete"}]} webhooks={[]} hasHead={false} />

content/relayer/1.1.x/api/deleteRelayer.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _openapi:
1212

1313
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
1414

15-
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/docs/openapi.json"} operations={[{"path":"/api/v1/relayers/{relayer_id}","method":"delete"}]} webhooks={[]} hasHead={false} />
15+
<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/main/openapi.json"} operations={[{"path":"/api/v1/relayers/{relayer_id}","method":"delete"}]} webhooks={[]} hasHead={false} />

0 commit comments

Comments
 (0)