Skip to content
Lattice

AggregatorExecAdapterInit

Git Source

Title: AggregatorExecAdapterInit

Author: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80)

One-shot initializer for a generic swap/bridge execution diamond — seeds AccessControl (so the (aggregator, selector) allow-list setter is DEFAULT_ADMIN_ROLE-gated), the reentrancy guard (the exec path is nonReentrant), and registers the IAggregatorExecAdapter interface 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). Reverts AggregatorExecZeroAdmin if admin is the zero address.

Functions

init

Runs the access-control + reentrancy-guard + adapter initializers. MUST be invoked via the diamond's initialize _init delegatecall.

function init(address admin) external;

Parameters

NameTypeDescription
adminaddressThe address granted DEFAULT_ADMIN_ROLE (controls the allow-list setter).