BridgeERC7802Init
Title: BridgeERC7802Init
Author: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80)
One-shot initializer for a mint/burn-bridge diamond over an ERC-7802 token — seeds AccessControl, the
reentrancy guard (the burn/mint path is nonReentrant), the CrosschainLink messaging registry, and
configures the bridged token. Delegatecalled by Diamond.initialize inside the initializing window
(so it must NOT open its own pre/postInitializer; each __*_init guard passes because the window is
already open). Reverts BridgeZeroToken if token is the zero address.
Functions
init
Runs the access-control + reentrancy-guard + crosschain-link + bridge initializers. MUST be
invoked via the diamond's initialize _init delegatecall.
function init(address admin, address token) external;Parameters
| Name | Type | Description |
|---|---|---|
| admin | address | The address granted DEFAULT_ADMIN_ROLE (controls the link/handler registry). |
| token | address | The ERC-7802 token minted/burned by the bridge. |