Registry

Introduction

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.

Get pToken address

The Registry contract has a mapping called pTokens. It maps underlying asset addresses to pToken addresses.

Registry

mapping (address => address) public pTokens;

Solidity

Registry registry = Registry(0x123...);
address asset = 0xabc...;
address pool = registry.pTokens(asset);

Web3 1.0

const asset = '0xabc...';
const registry = new web3.eth.Contract(registryAbi, registryAddress);
const pool = await registry.methods.pTokens(asset).call();

Last updated