Retrieving DVP Data

To retrieve all the DVPs available, you have to call registry.getDVPs() in the Registry.

This call returns the addresses of all the DVPs, each characterized by a baseToken, a sideToken and a frequency (for example USDC, WETH, 1 week).

To retrieve the Registry you can call ap.registry() in the AddressProvider, which returns an address.

// Instantiate the AddressProvider
AddressProvider addressProvider = AddressProvider(0x);
// Instantiate the registry by obtaining the address from the Address Provider.
Registry registry = Registry(addressProvider.registry());
// Get all the DVP addresses available (registered).
address[] memory dvps = registry.getDVPs();

Last updated