Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f41f1b0
chore: added markdown docs templates
stevedylandev Oct 31, 2025
82aa343
chore: refactored per coderabbit comments
stevedylandev Oct 31, 2025
a76241a
chore: refactored docs/
stevedylandev Nov 12, 2025
5d2d091
Merge remote-tracking branch 'upstream/master'
stevedylandev Nov 13, 2025
e0c1e37
chore: updated cryptograpy README.md to reflect master changes
stevedylandev Nov 13, 2025
164114f
chore: updated solidity natspec
stevedylandev Nov 18, 2025
fae529f
chore: removed process callouts
stevedylandev Nov 18, 2025
17b89be
chore: cleaned up legacy modules from helpers.js
stevedylandev Nov 18, 2025
c065899
chore: updated generation templates for enumerable
stevedylandev Nov 18, 2025
0ee41ef
chore: updated TIP callouts to 'idea'
stevedylandev Nov 24, 2025
6faf9d8
chore: removed unused adoc files
stevedylandev Nov 24, 2025
a2e8e16
chore: removed `antora.yml`
stevedylandev Nov 24, 2025
0cfc359
chore: removed gen-nav
stevedylandev Nov 24, 2025
a294999
feat: add github workflow for api docs generation
stevedylandev Nov 24, 2025
1c7c1e8
chore: Update trigger-docs-generation.yml
stevedylandev Nov 24, 2025
1077e7d
Trigger docs update
james-toussaint Nov 24, 2025
86870b2
fix: added missing closing tag
stevedylandev Nov 24, 2025
9889ba1
chore: added path prefix
stevedylandev Nov 24, 2025
0ad34f6
Init docs preview
james-toussaint Nov 25, 2025
15ff88e
Copy to build site
james-toussaint Nov 25, 2025
1020289
Build docs with pnpm
james-toussaint Nov 25, 2025
5310211
Add netlify nextjs plugin config
james-toussaint Nov 25, 2025
14bb82f
Publish to .next
james-toussaint Nov 25, 2025
2c612dc
Update next path
james-toussaint Nov 25, 2025
c3b2b33
Publish to out
james-toussaint Nov 25, 2025
3182f6e
Watch oz docs
james-toussaint Nov 25, 2025
a84511e
Replace docs workflow
james-toussaint Nov 25, 2025
75ee8d8
No watch by default
james-toussaint Nov 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ name: Build Docs
on:
push:
branches: [master]

permissions:
contents: write
workflow_dispatch: {}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- run: bash scripts/git-user-config.sh
- run: node scripts/update-docs-branch.js
- run: git push --all origin
- run: |
gh workflow run generate-api-docs-community-contracts.yml \
--repo OpenZeppelin/docs \
--field tag_name="${{ github.sha }}" \
--field trigger_type="commit"
env:
GH_TOKEN: ${{ secrets.DOCS_REPO_TOKEN }}
12 changes: 0 additions & 12 deletions contracts/access/README.adoc

This file was deleted.

15 changes: 15 additions & 0 deletions contracts/access/README.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Access
---

<Callout>
This document is better viewed at https://docs.openzeppelin.com/community-contracts/api/access
</Callout>

This directory contains utility contracts to restrict access control in smart contracts. These include:

* AccessManagerLight: A simpler version of an AccessManager that uses `bytes8` roles to allow function calls identified by their 4-bytes selector.

## AccessManager

AccessManagerLight
56 changes: 0 additions & 56 deletions contracts/account/README.adoc

This file was deleted.

60 changes: 60 additions & 0 deletions contracts/account/README.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: Account
---

<Callout>
This document is better viewed at https://docs.openzeppelin.com/community-contracts/api/account
</Callout>

This directory includes contracts to build accounts for ERC-4337. These include:

* ERC7579Executor: An executor module that enables executing calls from accounts where the it’s installed.
* ERC7579DelayedExecutor: An executor module that adds a delay before executing an account operation.
* ERC7579SelectorExecutor: An executor module that restricts execution to specific function selectors.
* ERC7579Validator: Abstract validator module for ERC-7579 accounts that provides base implementation for signature validation.
* ERC7579Signature: Implementation of ERC7579Validator using ERC-7913 signature verification for address-less cryptographic keys and account signatures.
* ERC7579Multisig: An extension of ERC7579Validator that enables validation using ERC-7913 signer keys.
* ERC7579MultisigWeighted: An extension of ERC7579Multisig that allows different weights to be assigned to signers.
* ERC7579MultisigConfirmation: An extension of ERC7579Multisig that requires each signer to provide a confirmation signature.
* ERC7579MultisigStorage: An extension of ERC7579Multisig that allows storing presigned approvals in storage.
* PaymasterCore: An ERC-4337 paymaster implementation that includes the core logic to validate and pay for user operations.
* PaymasterERC20: A paymaster that allows users to pay for user operations using ERC-20 tokens.
* PaymasterERC20Guarantor: A paymaster that enables third parties to guarantee user operations by pre-funding gas costs, with the option for users to repay or for guarantors to absorb the cost.
* PaymasterERC721Owner: A paymaster that allows users to pay for user operations based on ERC-721 ownership.
* PaymasterSigner: A paymaster that allows users to pay for user operations using an authorized signature.

## Modules

### Executors

ERC7579Executor

ERC7579DelayedExecutor

ERC7579SelectorExecutor

### Validators

ERC7579Validator

ERC7579Signature

ERC7579Multisig

ERC7579MultisigWeighted

ERC7579MultisigConfirmation

ERC7579MultisigStorage

## Paymaster

PaymasterCore

PaymasterERC20

PaymasterERC20Guarantor

PaymasterERC721Owner

PaymasterSigner
26 changes: 18 additions & 8 deletions contracts/account/modules/ERC7579DelayedExecutor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {ERC7579Executor} from "./ERC7579Executor.sol";
* @dev Extension of {ERC7579Executor} that allows scheduling and executing delayed operations
* with expiration. This module enables time-delayed execution patterns for smart accounts.
*
* ==== Operation Lifecycle
* #### Operation Lifecycle
*
* 1. Scheduling: Operations are scheduled via {schedule} with a specified delay period.
* The delay period is set during {onInstall} and can be customized via {setDelay}. Each
Expand All @@ -24,22 +24,24 @@ import {ERC7579Executor} from "./ERC7579Executor.sol";
* executable. If an operation is not executed within the expiration period, it becomes `Expired`
* and can't be executed. Expired operations must be rescheduled with a different salt.
*
* ==== Delay Management
* #### Delay Management
*
* Accounts can set their own delay periods during installation or via {setDelay}.
* The delay period is enforced even between installas and uninstalls to prevent
* immediate downgrades. When setting a new delay period, the new delay takes effect
* after a transition period defined by the current delay or {minSetback}, whichever
* is longer.
*
* ==== Authorization
* #### Authorization
*
* Authorization for scheduling and canceling operations is controlled through the {_validateSchedule}
* and {_validateCancel} functions. These functions can be overridden to implement custom
* authorization logic, such as requiring specific signers or roles.
*
* TIP: Use {_scheduleAt} to schedule operations at a specific points in time. This is
* <Callout type="idea">
* Use {_scheduleAt} to schedule operations at a specific points in time. This is
* useful to pre-schedule operations for non-deployed accounts (e.g. subscriptions).
* </Callout>
*/
abstract contract ERC7579DelayedExecutor is ERC7579Executor {
using Time for *;
Expand Down Expand Up @@ -92,7 +94,9 @@ abstract contract ERC7579DelayedExecutor is ERC7579Executor {
* @dev The current state of a operation is not the expected. The `expectedStates` is a bitmap with the
* bits enabled for each OperationState enum position counting from right to left. See {_encodeStateBitmap}.
*
* NOTE: If `expectedState` is `bytes32(0)`, the operation is expected to not be in any state (i.e. not exist).
* <Callout>
* If `expectedState` is `bytes32(0)`, the operation is expected to not be in any state (i.e. not exist).
* </Callout>
*/
error ERC7579ExecutorUnexpectedOperationState(
bytes32 operationId,
Expand Down Expand Up @@ -250,14 +254,18 @@ abstract contract ERC7579DelayedExecutor is ERC7579Executor {
* @dev Cleans up the {getDelay} and {getExpiration} values by scheduling them to `0`
* and respecting the previous delay and expiration values.
*
* IMPORTANT: This function does not clean up scheduled operations. This means operations
* <Callout type="warn">
* This function does not clean up scheduled operations. This means operations
* could potentially be re-executed if the module is reinstalled later. This is a deliberate
* design choice for efficiency, but module implementations may want to override this behavior
* to clear scheduled operations during uninstallation for their specific use cases.
* </Callout>
*
* NOTE: Calling this function directly will remove the expiration ({getExpiration}) value and
* <Callout>
* Calling this function directly will remove the expiration ({getExpiration}) value and
* will schedule a reset of the delay ({getDelay}) to `0` for the account. Reinstalling the
* module will not immediately reset the delay if the delay reset hasn't taken effect yet.
* </Callout>
*/
function onUninstall(bytes calldata) public virtual {
_config[msg.sender].installed = false;
Expand All @@ -268,9 +276,11 @@ abstract contract ERC7579DelayedExecutor is ERC7579Executor {
/**
* @dev Returns `data` as the execution calldata. See {ERC7579Executor-_execute}.
*
* NOTE: This function relies on the operation state validation in {_execute} for
* <Callout>
* This function relies on the operation state validation in {_execute} for
* authorization. Extensions of this module should override this function to implement
* additional validation logic if needed.
* </Callout>
*/
function _validateExecution(
address /* account */,
Expand Down
8 changes: 6 additions & 2 deletions contracts/account/modules/ERC7579Executor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ import {
* can be executed with custom rules by implementing the {_validateExecution} function in
* derived contracts.
*
* TIP: This is a simplified executor that directly executes operations without delay or expiration
* <Callout type="idea">
* This is a simplified executor that directly executes operations without delay or expiration
* mechanisms. For a more advanced implementation with time-delayed execution patterns and
* security features, see {ERC7579DelayedExecutor}.
* </Callout>
*/
abstract contract ERC7579Executor is IERC7579Module {
/// @dev Emitted when an operation is executed.
Expand Down Expand Up @@ -67,9 +69,11 @@ abstract contract ERC7579Executor is IERC7579Module {
* }
*```
*
* TIP: Pack extra data in the `data` arguments (e.g. a signature) to be used in the
* <Callout type="idea">
* Pack extra data in the `data` arguments (e.g. a signature) to be used in the
* validation process. Calldata can be sliced to extract it and return only the
* execution calldata.
* </Callout>
*/
function _validateExecution(
address account,
Expand Down
12 changes: 9 additions & 3 deletions contracts/account/modules/ERC7579Multisig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ abstract contract ERC7579Multisig is ERC7579Validator {
* If no signers or threshold are provided, the multisignature functionality will be
* disabled until they are added later.
*
* NOTE: An account can only call onInstall once. If called directly by the account,
* <Callout>
* An account can only call onInstall once. If called directly by the account,
* the signer will be set to the provided data. Future installations will behave as a no-op.
* </Callout>
*/
function onInstall(bytes calldata initData) public virtual {
if (initData.length > 32 && getSignerCount(msg.sender) == 0) {
Expand All @@ -80,8 +82,10 @@ abstract contract ERC7579Multisig is ERC7579Validator {
*
* See {ERC7579DelayedExecutor-onUninstall}.
*
* WARNING: This function has unbounded gas costs and may become uncallable if the set grows too large.
* <Callout type="warn">
* This function has unbounded gas costs and may become uncallable if the set grows too large.
* See {EnumerableSet-clear}.
* </Callout>
*/
function onUninstall(bytes calldata /* data */) public virtual {
_signersSetByAccount[msg.sender].clear();
Expand All @@ -93,9 +97,11 @@ abstract contract ERC7579Multisig is ERC7579Validator {
*
* Using `start = 0` and `end = type(uint64).max` will return the entire set of signers.
*
* WARNING: Depending on the `start` and `end`, this operation can copy a large amount of data to memory, which
* <Callout type="warn">
* Depending on the `start` and `end`, this operation can copy a large amount of data to memory, which
* can be expensive. This is designed for view accessors queried without gas fees. Using it in state-changing
* functions may become uncallable if the slice grows too large.
* </Callout>
*/
function getSigners(address account, uint64 start, uint64 end) public view virtual returns (bytes[] memory) {
return _signersSetByAccount[account].values(start, end);
Expand Down
4 changes: 3 additions & 1 deletion contracts/account/modules/ERC7579MultisigConfirmation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ import {ERC7579Multisig} from "./ERC7579Multisig.sol";
* multisig by requiring each new signer to provide a valid signature confirming their
* consent to be added. Each signer must sign an EIP-712 message to confirm their addition.
*
* TIP: Use this module to ensure that all guardians in a social recovery or multisig setup have
* <Callout type="idea">
* Use this module to ensure that all guardians in a social recovery or multisig setup have
* explicitly agreed to their roles.
* </Callout>
*/
abstract contract ERC7579MultisigConfirmation is ERC7579Multisig, EIP712 {
bytes32 private constant MULTISIG_CONFIRMATION =
Expand Down
4 changes: 3 additions & 1 deletion contracts/account/modules/ERC7579MultisigStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ abstract contract ERC7579MultisigStorage is ERC7579Multisig {
* Emits {ERC7579MultisigStoragePresigned} if the signature is valid and the hash is not already
* signed, otherwise acts as a no-op.
*
* NOTE: Does not check if the signer is authorized for the account. Valid signatures from
* <Callout>
* Does not check if the signer is authorized for the account. Valid signatures from
* invalid signers won't be executable. See {_validateSignatures} for more details.
* </Callout>
*/
function presign(address account, bytes calldata signer, bytes32 hash, bytes calldata signature) public virtual {
if (!presigned(account, signer, hash) && signer.isValidSignatureNow(hash, signature)) {
Expand Down
Loading