Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
30e25db
Add ERC20Crosschain in core using unreleased
ericglau Nov 26, 2025
bb07448
Add snapshot tests
ericglau Nov 26, 2025
5828060
Use contract scoped Link
ericglau Nov 26, 2025
dd6d841
Add todo
ericglau Nov 26, 2025
38334ec
Add access controlled setLink
ericglau Nov 26, 2025
fd985af
Require access control for custom bridge, add access controlled bridg…
ericglau Nov 26, 2025
d37b000
Add to UI
ericglau Nov 27, 2025
6d8447c
Rename native to embedded
ericglau Nov 27, 2025
d2609d9
Fix format/lint
ericglau Nov 27, 2025
a43688f
Add embedded to stablecoin/rwa
ericglau Nov 27, 2025
b8b4683
Update AI functions
ericglau Nov 27, 2025
d2d7659
Update descriptions
ericglau Nov 27, 2025
66adab5
Merge remote-tracking branch 'upstream/master' into erc20crosschain
ericglau Dec 1, 2025
9bfda55
Use openzeppelin-contracts master
ericglau Dec 1, 2025
5780d15
Merge branch 'master' into erc20crosschain
ericglau Dec 4, 2025
784650f
Add changesets
ericglau Dec 4, 2025
f65d9b8
temp use master for package lock
ericglau Dec 4, 2025
dbb8ec1
Add option to specify allowOverride
ericglau Dec 4, 2025
8dce592
Rename Embedded to ERC-7786 Native
ericglau Dec 4, 2025
3b8f6d3
Show allow overrides option in stablecoin/rwa
ericglau Dec 4, 2025
ef3f688
Lint/format
ericglau Dec 4, 2025
28553d9
temporarily add remapping for master to fix hooks test
ericglau Dec 4, 2025
b7ee734
Update snapshots, changeset for param order
ericglau Dec 5, 2025
2015fd8
Fix typo in temporary package json changes
ericglau Dec 5, 2025
c708432
Simplify generator for tests
ericglau Dec 5, 2025
6059260
Apply suggestions from code review
ericglau Dec 8, 2025
59529ab
run format:write
Amxx Dec 8, 2025
56e0bb7
Validate token bridge arg
ericglau Dec 8, 2025
f31ab91
Update snapshots
ericglau Dec 8, 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
5 changes: 5 additions & 0 deletions .changeset/ninety-ears-slide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openzeppelin/wizard-common': patch
---

Solidity `erc20`, `stablecoin`, `realWorldAsset`: Support 'erc7786native' option for `crossChainBridging`.
7 changes: 7 additions & 0 deletions .changeset/sad-cases-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@openzeppelin/wizard': patch
'@openzeppelin/contracts-mcp': patch
---

Solidity `erc20`, `stablecoin`, `realWorldAsset`: Support 'erc7786native' option for `crossChainBridging`.
- **Breaking changes**: Solidity `erc20`, `stablecoin`, `realWorldAsset`: 'custom' option for `crossChainBridging` now requires access control, and adds a function to allow updating the token bridge address after deployment. Constructor/initializer parameter order changed due to access control requirement.
4 changes: 3 additions & 1 deletion packages/common/src/ai/descriptions/solidity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export const solidityERC20Descriptions = {
flashmint:
"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, or 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.',
'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".',
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 Down
1 change: 1 addition & 0 deletions packages/core/solidity/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ module.exports = {
enabled: true,
runs: 200,
},
viaIR: true,
},
},
};
4 changes: 2 additions & 2 deletions packages/core/solidity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"devDependencies": {
"@openzeppelin/community-contracts": "git+https://github.com/OpenZeppelin/openzeppelin-community-contracts.git#b0ddd27",
"@openzeppelin/contracts": "^5.5.0",
"@openzeppelin/contracts": "git+https://github.com/OpenZeppelin/openzeppelin-contracts.git#master",
"@openzeppelin/contracts-upgradeable": "^5.5.0",
"@types/node": "^20.0.0",
"@types/semver": "^7.5.7",
Expand All @@ -41,4 +41,4 @@
"ts-node": "^10.4.0",
"typescript": "^5.0.0"
}
}
}
1 change: 1 addition & 0 deletions packages/core/solidity/remappings.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@openzeppelin/community-contracts/=node_modules/@openzeppelin/community-contracts/contracts/
@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/
@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/contracts/
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "ISC",
"devDependencies": {
"@nomicfoundation/hardhat-toolbox": "^6.1.0",
"@openzeppelin/contracts": "^5.5.0",
"@openzeppelin/contracts": "git+https://github.com/OpenZeppelin/openzeppelin-contracts.git#master",
"hardhat": "^2.22.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "ISC",
"devDependencies": {
"@nomicfoundation/hardhat-toolbox": "^6.1.0",
"@openzeppelin/contracts": "^5.5.0",
"@openzeppelin/contracts": "git+https://github.com/OpenZeppelin/openzeppelin-contracts.git#master",
"@openzeppelin/contracts-upgradeable": "^5.5.0",
"@openzeppelin/hardhat-upgrades": "^3.0.0",
"hardhat": "^2.22.0"
Expand Down
36 changes: 36 additions & 0 deletions packages/core/solidity/src/erc20.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,42 @@ testERC20('erc20 crossChainBridging custom managed', {
access: 'managed',
});

testERC20('erc20 crossChainBridging erc7786native', {
crossChainBridging: 'erc7786native',
});

testERC20('erc20 crossChainBridging erc7786native allowOverride', {
crossChainBridging: 'erc7786native',
crossChainLinkAllowOverride: true,
});

testERC20('erc20 crossChainBridging erc7786native ownable', {
crossChainBridging: 'erc7786native',
access: 'ownable',
});

testERC20('erc20 crossChainBridging erc7786native ownable mintable burnable', {
crossChainBridging: 'erc7786native',
access: 'ownable',
mintable: true,
burnable: true,
});

testERC20('erc20 crossChainBridging erc7786native roles', {
crossChainBridging: 'erc7786native',
access: 'roles',
});

testERC20('erc20 crossChainBridging erc7786native managed', {
crossChainBridging: 'erc7786native',
access: 'managed',
});

testERC20('erc20 crossChainBridging erc7786native upgradeable', {
crossChainBridging: 'erc7786native',
upgradeable: 'transparent',
});

testERC20('erc20 crossChainBridging superchain', {
crossChainBridging: 'superchain',
});
Expand Down
Loading
Loading