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

1
mapping (address => address) public pTokens;
Copied!

Solidity

1
Registry registry = Registry(0x123...);
2
address asset = 0xabc...;
3
address pool = registry.pTokens(asset);
Copied!

Web3 1.0

1
const asset = '0xabc...';
2
const registry = new web3.eth.Contract(registryAbi, registryAddress);
3
const pool = await registry.methods.pTokens(asset).call();
Copied!
​
Last modified 5mo ago