Add ERC-20 option for embedding ERC-7786 based crosschain bridge
Overview
In Solidity ERC-20's Cross-Chain Bridging section, adds an ERC-7866 Native option to use ERC20Crosschain. When this is selected, it also shows a sub-option Allow Link Overrides which defaults to false.
Both the ERC-7866 Native (ERC20Crosschain) and Custom (ERC20Bridgeable) bridging options will require access control.
Breaking Changes
Custom bridging option now requires access control to allow privileged roles to update the token bridge address after deployment.
Rationale: Tokens may want to update their bridge address to use a BridgeERC7802, which requires the token address as a constructor argument to set an immutable variable. This implies the token must be deployed before the bridge.
New Features
ERC-7786 Native (ERC20Crosschain) embeds an ERC-7786 based bridge directly in the token contract. This option requires access control to manage crosschain links.
- Allow Link Overrides: When enabled, privileged roles can replace previously registered crosschain links. Defaults to
false.
To do
- [x] Update to use openzeppelin-contracts master when https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5914 is merged.
- [x] Add changeset, note breaking changes requiring access control
- [ ] When the next release of openzeppelin-contracts is available:
- [ ] Update packages in
- [ ]
packages/core/solidity/package.json - [ ]
packages/core/solidity/src/environments/hardhat/package.json - [ ]
packages/core/solidity/src/environments/hardhat/upgradeable/package.json - [ ]
yarn.lock
- [ ]
- [ ] revert temporary remappings in:
- [ ]
packages/core/solidity/remappings.txt - [ ]
packages/core/uniswap-hooks/remappings.txt
- [ ]
- [ ] ensure tests pass after performing the above
- [ ] Update packages in