ERC7786OpenBridgeInit
Title: ERC7786OpenBridgeInit
Author: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80)
One-shot initializer for an ERC-7786 open-bridge diamond — seeds AccessControl so the gateway-set,
threshold and remote-bridge setters are admin-gated, and registers the ERC-7786 gateway-source /
recipient interfaces via ERC-165. 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). Companion to the ERC2981Init and ChainlinkAdapterInit patterns — a first-class
production deploy artifact. The bridge starts at threshold 0 and executes nothing until configured;
the admin must then call addGateway (each gateway), setThreshold, and only then
registerRemoteBridge (which reverts while the threshold is 0).
Functions
init
Runs the access-control + open-bridge module initializers. MUST be invoked via the diamond's
initialize _init delegatecall.
function init(address admin) external;Parameters
| Name | Type | Description |
|---|---|---|
| admin | address | The address granted DEFAULT_ADMIN_ROLE (controls the gateway set, threshold and remotes). |