Docs
Search…
Controller
The Controller allows users to get the list of deployed PalPools & PalTokens, and also to check if a Withdraw or a Borrow is possible on a given Pool without asking the Pool directly. It also handles some PalPool’s exclusive method to verify that an action (Deposit, Withdraw, Borrow, …) executed correctly.
The Controller can be later upgraded, and updated for the PalPool, to add more functionalities.

Events :

NewPalPool
event NewPalPool(address palPool);
When a new Pool is added to the Controller List
NewAdmin
event NewAdmin(address oldAdmin, address newAdmin);
When the Controller admin is updated

Useful methods :

isPalPool
function isPalPool(address _pool) external view returns(bool);
Returns 'true' if the given address is a PalPool listed in the Controller
getPalTokens
function getPalTokens() external view returns(address[] memory);
Returns the list of PalTokens stored by the Controller
getPalPools
function getPalPools() external view returns(address[] memory);
Returns the list of PalPools stored by the Controller
withdrawPossible
function withdrawPossible(address palPool, uint amount) external view returns(bool);
Check if a withdraw is possible on a given PalPool

Parameters :

name
type
desc
palPool
address
the Pool to withdraw from
amount
uint
the amount to withdraw
borrowPossible
function borrowPossible(address palPool, uint amount) external view returns(bool);
Check if a borrow is possible on a given PalPool

Parameters :

name
type
desc
palPool
address
the Pool to borrow from
amount
uint
the amount to withdraw
Last modified 5mo ago