BandAdapterInit
Title: BandAdapterInit
Author: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80)
One-shot initializer for a Band price-feed adapter diamond — seeds AccessControl (so the feed registry
setters are admin-gated), registers the IBandAdapter interface (ERC-165), and wires the Band
StdReference the adapter reads rates from. 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). Unlike the registry-only adapters, Band's __BandAdapter_init
takes the external StdReference address and reverts BandReferenceIsZero if it is the zero address.
Functions
init
Runs the Band adapter + access-control module initializers. MUST be invoked via the diamond's
initialize _init delegatecall.
function init(address admin, address reference_) external;Parameters
| Name | Type | Description |
|---|---|---|
| admin | address | The address granted DEFAULT_ADMIN_ROLE (controls the feed registry and setReference). |
| reference_ | address | The Band StdReference contract the adapter reads rates from. |