The Registry contract contains mapping with all pToken addresses, it allows get the pToken address by the underlying asset address. The Registry also contains the address of the current implementation of the pToken, which is used by all proxy pools.
The Registry contract has a mapping called
pTokens. It maps underlying asset addresses to pToken addresses.
mapping (address => address) public pTokens;
Registry registry = Registry(0x123...);address asset = 0xabc...;address pool = registry.pTokens(asset);
const asset = '0xabc...';const registry = new web3.eth.Contract(registryAbi, registryAddress);const pool = await registry.methods.pTokens(asset).call();