PythAdapterInit
Title: PythAdapterInit
Author: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80)
One-shot initializer for a Pyth price-feed adapter diamond — seeds AccessControl (so the feed registry
setters are admin-gated), registers the IPythAdapter interface (ERC-165), and wires the Pyth contract
reference the adapter pulls prices 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, Pyth's __PythAdapter_init takes the
external Pyth address because reads and the update path both dispatch through it.
Functions
init
Runs the Pyth adapter + access-control module initializers. MUST be invoked via the diamond's
initialize _init delegatecall.
function init(address admin, address pyth) external;Parameters
| Name | Type | Description |
|---|---|---|
| admin | address | The address granted DEFAULT_ADMIN_ROLE (controls the feed registry and setPyth). |
| pyth | address | The Pyth contract the adapter reads prices from and forwards update fees to. |