Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up environment
uses: ./.github/actions/setup
- name: Build MCP Apps
run: yarn build:apps
working-directory: packages/mcp
- name: Run tests
run: yarn test
working-directory: packages/mcp
Expand Down
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ build/
public/
remappings.txt
*.cairo
*.sh
*.sh
# Generated single-file MCP App documents with an inlined bundle (yarn build:apps)
packages/mcp/apps/
12 changes: 12 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 0.1.4 (2026-07-31)

- Add Solidity cross-chain options for ERC721, ERC1155, and Governor using OpenZeppelin Contracts 5.7. ([#825](https://github.com/OpenZeppelin/contracts-wizard/pull/825)) ([`89e9fab`](https://github.com/OpenZeppelin/contracts-wizard/commit/89e9fabcd6e76128e2935f43a5f8c00ad8ed6e1a))
- ERC721/ERC1155: Add `crossChainBridging` and `crossChainLinkAllowOverride` options, using `ERC721Crosschain`/`ERC1155Crosschain`.
- Governor: Add `crossChainExecution` option, using `GovernorCrosschain`.
- Account: Update the `IERC4337` import path, which dropped its `draft-` prefix in Contracts 5.7.
- Fix compile errors in upgradeable ERC20 `crossChainBridging` variants.
- **Potentially breaking change**: Update to OpenZeppelin Contracts 5.7.0.
- Updated dependencies [[`89e9fab`](https://github.com/OpenZeppelin/contracts-wizard/commit/89e9fabcd6e76128e2935f43a5f8c00ad8ed6e1a)]:
- @openzeppelin/wizard@0.10.12
- @openzeppelin/wizard-common@0.5.4

## 0.1.3 (2026-06-26)

- Add Stellar tokenized `Vault` contract type, a Fungible Token that issues shares for an underlying asset (ERC-4626-style), with support for pausable, upgradeable, and access control options. ([#821](https://github.com/OpenZeppelin/contracts-wizard/pull/821)) ([`c8a2962`](https://github.com/OpenZeppelin/contracts-wizard/commit/c8a29629c5c486fd5204b4b51e08c913b05f3379))
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openzeppelin/contracts-cli",
"version": "0.1.3",
"version": "0.1.4",
"description": "CLI for generating smart contracts using OpenZeppelin Contracts Wizard",
"license": "AGPL-3.0-only",
"repository": "https://github.com/OpenZeppelin/contracts-wizard",
Expand All @@ -27,8 +27,8 @@
},
"dependencies": {
"zod": "^4.0",
"@openzeppelin/wizard-common": "^0.5.3",
"@openzeppelin/wizard": "^0.10.10",
"@openzeppelin/wizard-common": "^0.5.4",
"@openzeppelin/wizard": "^0.10.12",
"@openzeppelin/wizard-cairo": "^3.0.0",
"@openzeppelin/wizard-stellar": "^0.6.3",
"@openzeppelin/wizard-stylus": "^0.3.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/src/cli.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ Generated by [AVA](https://avajs.dev).
--mintable Whether privileged accounts will be able to create more supply or emit more tokens␊
--incremental Whether new tokens will be automatically assigned an incremental id␊
--votes <blocknumber|timestamp> Whether to keep track of individual units for voting in on-chain governance. Voting durations can be expressed as block numbers or timestamps (defaulting to block number if not specified).␊
--crossChainBridging <erc7786native> Whether to embed an ERC-7786 based bridge directly in the token contract, making it natively crosschain. Cross-chain transfers with registered counterparts burn the token on the source chain and mint it on the destination chain. If also using incremental token ids, mint only on a single chain and link counterparts without minting, otherwise colliding ids can strand bridged tokens.␊
--crossChainLinkAllowOverride Whether to allow replacing a crosschain link that has already been registered. Only used if crossChainBridging is set to "erc7786native".␊
--access <ownable|roles|managed> The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts. Managed enables a central contract to define a policy that allows certain callers to access certain functions.␊
--upgradeable <transparent|uups> Whether the smart contract is upgradeable. Transparent uses more complex proxy with higher overhead, requires less changes in your contract. Can also be used with beacons. UUPS uses simpler proxy with less overhead, requires including extra code in your contract. Allows flexibility for authorizing upgrades.␊
--info.securityContact <string> Email where people can contact you to report security issues. Will only be visible if contract source code is verified.␊
Expand All @@ -104,6 +106,8 @@ Generated by [AVA](https://avajs.dev).
--mintable Whether privileged accounts will be able to create more supply or emit more tokens␊
--supply Whether to keep track of total supply of tokens␊
--updatableUri Whether privileged accounts will be able to set a new URI for all token types␊
--crossChainBridging <erc7786native> Whether to embed an ERC-7786 based bridge directly in the token contract, making it natively crosschain. Cross-chain transfers with registered counterparts burn the tokens on the source chain and mint them on the destination chain.␊
--crossChainLinkAllowOverride Whether to allow replacing a crosschain link that has already been registered. Only used if crossChainBridging is set to "erc7786native".␊
--access <ownable|roles|managed> The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts. Managed enables a central contract to define a policy that allows certain callers to access certain functions.␊
--upgradeable <transparent|uups> Whether the smart contract is upgradeable. Transparent uses more complex proxy with higher overhead, requires less changes in your contract. Can also be used with beacons. UUPS uses simpler proxy with less overhead, requires including extra code in your contract. Allows flexibility for authorizing upgrades.␊
--info.securityContact <string> Email where people can contact you to report security issues. Will only be visible if contract source code is verified.␊
Expand Down Expand Up @@ -223,6 +227,7 @@ Generated by [AVA](https://avajs.dev).
--quorumAbsolute <string> The absolute quorum required, in cases of quorumMode equals absolute␊
--storage Enable storage of proposal details and enumerability of proposals␊
--settings Allow governance to update voting settings (delay, period, proposal threshold)␊
--crossChainExecution Whether passed proposals can relay execution to other chains through ERC-7786 gateways. Requires a CrosschainRemoteExecutor contract, controlled by this governor, deployed on each target chain. The gateway and executor are chosen per proposal as arguments to the relayCrosschain function.␊
--upgradeable <transparent|uups> Whether the smart contract is upgradeable. Transparent uses more complex proxy with higher overhead, requires less changes in your contract. Can also be used with beacons. UUPS uses simpler proxy with less overhead, requires including extra code in your contract. Allows flexibility for authorizing upgrades.␊
--info.securityContact <string> Email where people can contact you to report security issues. Will only be visible if contract source code is verified.␊
--info.license <string> The license used by the contract, default is "MIT"␊
Expand Down
Binary file modified packages/cli/src/cli.test.ts.snap
Binary file not shown.
9 changes: 9 additions & 0 deletions packages/common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Changelog


## 0.5.4 (2026-07-31)

- Add Solidity cross-chain options for ERC721, ERC1155, and Governor using OpenZeppelin Contracts 5.7. ([#825](https://github.com/OpenZeppelin/contracts-wizard/pull/825))
- ERC721/ERC1155: Add `crossChainBridging` and `crossChainLinkAllowOverride` options, using `ERC721Crosschain`/`ERC1155Crosschain`.
- Governor: Add `crossChainExecution` option, using `GovernorCrosschain`.
- Account: Update the `IERC4337` import path, which dropped its `draft-` prefix in Contracts 5.7.
- Fix compile errors in upgradeable ERC20 `crossChainBridging` variants.
- **Potentially breaking change**: Update to OpenZeppelin Contracts 5.7.0.

## 0.5.3 (2026-06-26)

- Add Stellar tokenized `Vault` contract type, a Fungible Token that issues shares for an underlying asset (ERC-4626-style), with support for pausable, upgradeable, and access control options. ([#821](https://github.com/OpenZeppelin/contracts-wizard/pull/821))
Expand Down
4 changes: 2 additions & 2 deletions packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openzeppelin/wizard-common",
"version": "0.5.3",
"version": "0.5.4",
"description": "Common library for OpenZeppelin Contracts Wizard components. Used internally.",
"license": "AGPL-3.0-only",
"repository": "https://github.com/OpenZeppelin/contracts-wizard",
Expand Down Expand Up @@ -34,7 +34,7 @@
"zod": "^4.0"
},
"devDependencies": {
"@openzeppelin/wizard": "^0.10.10",
"@openzeppelin/wizard": "^0.10.12",
"@openzeppelin/wizard-cairo": "^3.0.0",
"@openzeppelin/wizard-stellar": "^0.6.3",
"@openzeppelin/wizard-stylus": "^0.3.0",
Expand Down
15 changes: 13 additions & 2 deletions packages/common/src/ai/descriptions/solidity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export const solidityPrompts = {
Custom: 'Make a custom smart contract.',
};

// Shared by every token kind that supports ERC-7786 native bridging.
const crossChainLinkAllowOverrideDescription =
'Whether to allow replacing a crosschain link that has already been registered. Only used if crossChainBridging is set to "erc7786native".';

export const solidityCommonDescriptions = {
access:
'The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts. Managed enables a central contract to define a policy that allows certain callers to access certain functions.',
Expand All @@ -33,8 +37,7 @@ export const solidityERC20Descriptions = {
"Whether to include built-in flash loans to allow lending tokens without requiring collateral as long as they're returned in the same transaction.",
crossChainBridging:
'Whether to allow authorized bridge contracts to mint and burn tokens for cross-chain transfers. Options are to use custom bridges on any chain, to embed an ERC-7786 based bridge directly in the token contract, or to use the SuperchainERC20 standard with the predeployed SuperchainTokenBridge. The SuperchainERC20 feature is only available on chains in the Superchain, and requires deploying your contract to the same address on every chain in the Superchain.',
crossChainLinkAllowOverride:
'Whether to allow replacing a crosschain link that has already been registered. Only used if crossChainBridging is set to "erc7786native".',
crossChainLinkAllowOverride: crossChainLinkAllowOverrideDescription,
premintChainId: 'The chain ID of the network on which to premint tokens.',
callback:
'Whether to include support for code execution after transfers and approvals on recipient contracts in a single transaction.',
Expand All @@ -48,12 +51,18 @@ export const solidityERC721Descriptions = {
incremental: 'Whether new tokens will be automatically assigned an incremental id',
votes:
'Whether to keep track of individual units for voting in on-chain governance. Voting durations can be expressed as block numbers or timestamps (defaulting to block number if not specified).',
crossChainBridging:
'Whether to embed an ERC-7786 based bridge directly in the token contract, making it natively crosschain. Cross-chain transfers with registered counterparts burn the token on the source chain and mint it on the destination chain. If also using incremental token ids, mint only on a single chain and link counterparts without minting, otherwise colliding ids can strand bridged tokens.',
crossChainLinkAllowOverride: crossChainLinkAllowOverrideDescription,
};

export const solidityERC1155Descriptions = {
uri: 'The location of the metadata for the token. Clients will replace any instance of {id} in this string with the tokenId.',
supply: 'Whether to keep track of total supply of tokens',
updatableUri: 'Whether privileged accounts will be able to set a new URI for all token types',
crossChainBridging:
'Whether to embed an ERC-7786 based bridge directly in the token contract, making it natively crosschain. Cross-chain transfers with registered counterparts burn the tokens on the source chain and mint them on the destination chain.',
crossChainLinkAllowOverride: crossChainLinkAllowOverrideDescription,
};

export const solidityStablecoinDescriptions = {
Expand Down Expand Up @@ -99,4 +108,6 @@ export const solidityGovernorDescriptions = {
timelock: 'The type of timelock to use',
storage: 'Enable storage of proposal details and enumerability of proposals',
settings: 'Allow governance to update voting settings (delay, period, proposal threshold)',
crossChainExecution:
'Whether passed proposals can relay execution to other chains through ERC-7786 gateways. Requires a CrosschainRemoteExecutor contract, controlled by this governor, deployed on each target chain. The gateway and executor are chosen per proposal as arguments to the relayCrosschain function.',
};
5 changes: 5 additions & 0 deletions packages/common/src/ai/schemas/solidity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ export const solidityERC721Schema = {
mintable: z.boolean().optional().describe(commonDescriptions.mintable),
incremental: z.boolean().optional().describe(solidityERC721Descriptions.incremental),
votes: z.literal('blocknumber').or(z.literal('timestamp')).optional().describe(solidityERC721Descriptions.votes),
crossChainBridging: z.literal('erc7786native').optional().describe(solidityERC721Descriptions.crossChainBridging),
crossChainLinkAllowOverride: z.boolean().optional().describe(solidityERC721Descriptions.crossChainLinkAllowOverride),
...solidityCommonSchema,
namespacePrefix: z.string().optional().describe(solidityCommonDescriptions.namespacePrefix),
} as const satisfies z.ZodRawShape;
Expand All @@ -79,6 +81,8 @@ export const solidityERC1155Schema = {
mintable: z.boolean().optional().describe(commonDescriptions.mintable),
supply: z.boolean().optional().describe(solidityERC1155Descriptions.supply),
updatableUri: z.boolean().optional().describe(solidityERC1155Descriptions.updatableUri),
crossChainBridging: z.literal('erc7786native').optional().describe(solidityERC1155Descriptions.crossChainBridging),
crossChainLinkAllowOverride: z.boolean().optional().describe(solidityERC1155Descriptions.crossChainLinkAllowOverride),
...solidityCommonSchema,
} as const satisfies z.ZodRawShape;

Expand Down Expand Up @@ -157,6 +161,7 @@ export const solidityGovernorSchema = {
quorumAbsolute: z.string().optional().describe(solidityGovernorDescriptions.quorumAbsolute),
storage: z.boolean().optional().describe(solidityGovernorDescriptions.storage),
settings: z.boolean().optional().describe(solidityGovernorDescriptions.settings),
crossChainExecution: z.boolean().optional().describe(solidityGovernorDescriptions.crossChainExecution),
upgradeable: solidityCommonSchema.upgradeable,
info: solidityCommonSchema.info,
} as const satisfies z.ZodRawShape;
Expand Down
20 changes: 10 additions & 10 deletions packages/core/confidential/src/erc7984.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.6.0 and Confidential Contracts ^0.3.1␊
// Compatible with OpenZeppelin Contracts ^5.7.0 and Confidential Contracts ^0.3.1␊
pragma solidity ^0.8.27;␊
import {ZamaEthereumConfig} from "@fhevm/solidity/config/ZamaConfig.sol";␊
Expand Down Expand Up @@ -120,7 +120,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.6.0 and Confidential Contracts ^0.3.1␊
// Compatible with OpenZeppelin Contracts ^5.7.0 and Confidential Contracts ^0.3.1␊
pragma solidity ^0.8.27;␊
import {ZamaEthereumConfig} from "@fhevm/solidity/config/ZamaConfig.sol";␊
Expand All @@ -146,7 +146,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.6.0 and Confidential Contracts ^0.3.1␊
// Compatible with OpenZeppelin Contracts ^5.7.0 and Confidential Contracts ^0.3.1␊
pragma solidity ^0.8.27;␊
import {ZamaEthereumConfig} from "@fhevm/solidity/config/ZamaConfig.sol";␊
Expand All @@ -168,7 +168,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.6.0 and Confidential Contracts ^0.3.1␊
// Compatible with OpenZeppelin Contracts ^5.7.0 and Confidential Contracts ^0.3.1␊
pragma solidity ^0.8.27;␊
import {ZamaEthereumConfig} from "@fhevm/solidity/config/ZamaConfig.sol";␊
Expand All @@ -190,7 +190,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.6.0 and Confidential Contracts ^0.3.1␊
// Compatible with OpenZeppelin Contracts ^5.7.0 and Confidential Contracts ^0.3.1␊
pragma solidity ^0.8.27;␊
import {ZamaEthereumConfig} from "@fhevm/solidity/config/ZamaConfig.sol";␊
Expand All @@ -212,7 +212,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.6.0 and Confidential Contracts ^0.3.1␊
// Compatible with OpenZeppelin Contracts ^5.7.0 and Confidential Contracts ^0.3.1␊
pragma solidity ^0.8.27;␊
import {ZamaEthereumConfig} from "@fhevm/solidity/config/ZamaConfig.sol";␊
Expand Down Expand Up @@ -253,7 +253,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.6.0 and Confidential Contracts ^0.3.1␊
// Compatible with OpenZeppelin Contracts ^5.7.0 and Confidential Contracts ^0.3.1␊
pragma solidity ^0.8.27;␊
import {ZamaEthereumConfig} from "@fhevm/solidity/config/ZamaConfig.sol";␊
Expand Down Expand Up @@ -316,7 +316,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.6.0 and Confidential Contracts ^0.3.1␊
// Compatible with OpenZeppelin Contracts ^5.7.0 and Confidential Contracts ^0.3.1␊
pragma solidity ^0.8.27;␊
import {ZamaEthereumConfig} from "@fhevm/solidity/config/ZamaConfig.sol";␊
Expand Down Expand Up @@ -388,7 +388,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.6.0 and Confidential Contracts ^0.3.1␊
// Compatible with OpenZeppelin Contracts ^5.7.0 and Confidential Contracts ^0.3.1␊
pragma solidity ^0.8.27;␊
import {ZamaEthereumConfig} from "@fhevm/solidity/config/ZamaConfig.sol";␊
Expand Down Expand Up @@ -463,7 +463,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.6.0 and Confidential Contracts ^0.3.1␊
// Compatible with OpenZeppelin Contracts ^5.7.0 and Confidential Contracts ^0.3.1␊
pragma solidity ^0.8.27;␊
import {ZamaEthereumConfig} from "@fhevm/solidity/config/ZamaConfig.sol";␊
Expand Down
Binary file modified packages/core/confidential/src/erc7984.test.ts.snap
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

[
'@openzeppelin/contracts/=@openzeppelin/contracts@5.6.0/',
'@openzeppelin/contracts/=@openzeppelin/contracts@5.7.0/',
'@openzeppelin/confidential-contracts/=@openzeppelin/confidential-contracts@0.3.1/',
'@fhevm/solidity/=@fhevm/solidity@0.9.1/',
]
Binary file not shown.
Loading
Loading