Primary Index Token

Methods

DEFAULT_ADMIN_ROLE

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

Returns

NameTypeDescription

_0

bytes32

undefined

MODERATOR_ROLE

function MODERATOR_ROLE() external view returns (bytes32)

Returns

NameTypeDescription

_0

bytes32

undefined

addLendingToken

function addLendingToken(address _lendingToken, address _bLendingToken, bool _isPaused) external nonpayable

Parameters

NameTypeDescription

_lendingToken

address

undefined

_bLendingToken

address

undefined

_isPaused

bool

undefined

addProjectToken

function addProjectToken(address _projectToken, uint8 _loanToValueRatioNumerator, uint8 _loanToValueRatioDenominator, uint8 _liquidationThresholdFactorNumerator, uint8 _liquidationThresholdFactorDenominator, uint8 _liquidationIncentiveNumerator, uint8 _liquidationIncentiveDenominator) external nonpayable

Parameters

NameTypeDescription

_projectToken

address

undefined

_loanToValueRatioNumerator

uint8

undefined

_loanToValueRatioDenominator

uint8

undefined

_liquidationThresholdFactorNumerator

uint8

undefined

_liquidationThresholdFactorDenominator

uint8

undefined

_liquidationIncentiveNumerator

uint8

undefined

_liquidationIncentiveDenominator

uint8

undefined

borrow

function borrow(address projectToken, address lendingToken, uint256 lendingTokenAmount) external nonpayable

Parameters

NameTypeDescription

projectToken

address

undefined

lendingToken

address

undefined

lendingTokenAmount

uint256

undefined

borrowLimit

function borrowLimit(address, address) external view returns (uint256)

Parameters

NameTypeDescription

_0

address

undefined

_1

address

undefined

Returns

NameTypeDescription

_0

uint256

undefined

borrowPosition

function borrowPosition(address, address, address) external view returns (uint256 loanBody, uint256 accrual)

Parameters

NameTypeDescription

_0

address

undefined

_1

address

undefined

_2

address

undefined

Returns

NameTypeDescription

loanBody

uint256

undefined

accrual

uint256

undefined

decimals

function decimals() external pure returns (uint8)

Returns

NameTypeDescription

_0

uint8

undefined

deposit

function deposit(address projectToken, address lendingToken, uint256 projectTokenAmount) external nonpayable

Parameters

NameTypeDescription

projectToken

address

undefined

lendingToken

address

undefined

projectTokenAmount

uint256

undefined

depositPosition

function depositPosition(address, address, address) external view returns (uint256 depositedProjectTokenAmount)

Parameters

NameTypeDescription

_0

address

undefined

_1

address

undefined

_2

address

undefined

Returns

NameTypeDescription

depositedProjectTokenAmount

uint256

undefined

getPosition

function getPosition(address account, address projectToken, address lendingToken) external view returns (uint256 depositedProjectTokenAmount, uint256 loanBody, uint256 accrual, uint256 healthFactorNumerator, uint256 healthFactorDenominator)

Parameters

NameTypeDescription

account

address

undefined

projectToken

address

undefined

lendingToken

address

undefined

Returns

NameTypeDescription

depositedProjectTokenAmount

uint256

undefined

loanBody

uint256

undefined

accrual

uint256

undefined

healthFactorNumerator

uint256

undefined

healthFactorDenominator

uint256

undefined

getProjectTokenEvaluation

function getProjectTokenEvaluation(address projectToken, uint256 projectTokenAmount) external view returns (uint256)

Parameters

NameTypeDescription

projectToken

address

undefined

projectTokenAmount

uint256

undefined

Returns

NameTypeDescription

_0

uint256

undefined

getRoleAdmin

function getRoleAdmin(bytes32 role) external view returns (bytes32)

Returns the admin role that controls role. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.

Parameters

NameTypeDescription

role

bytes32

undefined

Returns

NameTypeDescription

_0

bytes32

undefined

grandModerator

function grandModerator(address newModerator) external nonpayable

Parameters

NameTypeDescription

newModerator

address

undefined

grantRole

function grantRole(bytes32 role, address account) external nonpayable

Grants role to account. If account had not been already granted role, emits a {RoleGranted} event. Requirements: - the caller must have role's admin role.

Parameters

NameTypeDescription

role

bytes32

undefined

account

address

undefined

hasRole

function hasRole(bytes32 role, address account) external view returns (bool)

Returns true if account has been granted role.

Parameters

NameTypeDescription

role

bytes32

undefined

account

address

undefined

Returns

NameTypeDescription

_0

bool

undefined

healthFactor

function healthFactor(address account, address projectToken, address lendingToken) external view returns (uint256 numerator, uint256 denominator)

Parameters

NameTypeDescription

account

address

undefined

projectToken

address

undefined

lendingToken

address

undefined

Returns

NameTypeDescription

numerator

uint256

undefined

denominator

uint256

undefined

initialize

function initialize() external nonpayable

lendingTokenInfo

function lendingTokenInfo(address) external view returns (bool isListed, bool isPaused, contract BLendingToken bLendingToken)

Parameters

NameTypeDescription

_0

address

undefined

Returns

NameTypeDescription

isListed

bool

undefined

isPaused

bool

undefined

bLendingToken

contract BLendingToken

undefined

lendingTokens

function lendingTokens(uint256) external view returns (address)

Parameters

NameTypeDescription

_0

uint256

undefined

Returns

NameTypeDescription

_0

address

undefined

lendingTokensLength

function lendingTokensLength() external view returns (uint256)

Returns

NameTypeDescription

_0

uint256

undefined

liquidate

function liquidate(address account, address projectToken, address lendingToken) external nonpayable

Parameters

NameTypeDescription

account

address

undefined

projectToken

address

undefined

lendingToken

address

undefined

liquidationThreshold

function liquidationThreshold(address account, address projectToken, address lendingToken) external view returns (uint256)

Parameters

NameTypeDescription

account

address

undefined

projectToken

address

undefined

lendingToken

address

undefined

Returns

NameTypeDescription

_0

uint256

undefined

name

function name() external view returns (string)

Returns

NameTypeDescription

_0

string

undefined

pit

function pit(address account, address projectToken, address lendingToken) external view returns (uint256)

Parameters

NameTypeDescription

account

address

undefined

projectToken

address

undefined

lendingToken

address

undefined

Returns

NameTypeDescription

_0

uint256

undefined

pitRemaining

function pitRemaining(address account, address projectToken, address lendingToken) external view returns (uint256)

Parameters

NameTypeDescription

account

address

undefined

projectToken

address

undefined

lendingToken

address

undefined

Returns

NameTypeDescription

_0

uint256

undefined

priceOracle

function priceOracle() external view returns (contract IPriceProviderAggregator)

Returns

NameTypeDescription

_0

contract IPriceProviderAggregator

undefined

projectTokenInfo

function projectTokenInfo(address) external view returns (bool isListed, bool isDepositPaused, bool isWithdrawPaused, struct PrimaryIndexToken.Ratio loanToValueRatio, struct PrimaryIndexToken.Ratio liquidationThresholdFactor, struct PrimaryIndexToken.Ratio liquidationIncentive)

Parameters

NameTypeDescription

_0

address

undefined

Returns

NameTypeDescription

isListed

bool

undefined

isDepositPaused

bool

undefined

isWithdrawPaused

bool

undefined

loanToValueRatio

PrimaryIndexToken.Ratio

undefined

liquidationThresholdFactor

PrimaryIndexToken.Ratio

undefined

liquidationIncentive

PrimaryIndexToken.Ratio

undefined

projectTokens

function projectTokens(uint256) external view returns (address)

Parameters

NameTypeDescription

_0

uint256

undefined

Returns

NameTypeDescription

_0

address

undefined

projectTokensLength

function projectTokensLength() external view returns (uint256)

Returns

NameTypeDescription

_0

uint256

undefined

redeem

function redeem(address lendingToken, uint256 bLendingTokenAmount) external nonpayable

Parameters

NameTypeDescription

lendingToken

address

undefined

bLendingTokenAmount

uint256

undefined

redeemUnderlying

function redeemUnderlying(address lendingToken, uint256 lendingTokenAmount) external nonpayable

Parameters

NameTypeDescription

lendingToken

address

undefined

lendingTokenAmount

uint256

undefined

removeLendingToken

function removeLendingToken(uint256 _lendingTokenId) external nonpayable

Parameters

NameTypeDescription

_lendingTokenId

uint256

undefined

removeProjectToken

function removeProjectToken(uint256 _projectTokenId) external nonpayable

Parameters

NameTypeDescription

_projectTokenId

uint256

undefined

renounceRole

function renounceRole(bytes32 role, address account) external nonpayable

Revokes role from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted role, emits a {RoleRevoked} event. Requirements: - the caller must be account.

Parameters

NameTypeDescription

role

bytes32

undefined

account

address

undefined

repay

function repay(address projectToken, address lendingToken, uint256 lendingTokenAmount) external nonpayable returns (uint256)

Parameters

NameTypeDescription

projectToken

address

undefined

lendingToken

address

undefined

lendingTokenAmount

uint256

undefined

Returns

NameTypeDescription

_0

uint256

undefined

revokeModerator

function revokeModerator(address moderator) external nonpayable

Parameters

NameTypeDescription

moderator

address

undefined

revokeRole

function revokeRole(bytes32 role, address account) external nonpayable

Revokes role from account. If account had been granted role, emits a {RoleRevoked} event. Requirements: - the caller must have role's admin role.

Parameters

NameTypeDescription

role

bytes32

undefined

account

address

undefined

setBorrowLimit

function setBorrowLimit(address projectToken, address lendingToken, uint256 _borrowLimit) external nonpayable

Parameters

NameTypeDescription

projectToken

address

undefined

lendingToken

address

undefined

_borrowLimit

uint256

undefined

setLendingTokenInfo

function setLendingTokenInfo(address _lendingToken, address _bLendingToken, bool _isPaused) external nonpayable

Parameters

NameTypeDescription

_lendingToken

address

undefined

_bLendingToken

address

undefined

_isPaused

bool

undefined

setPausedLendingToken

function setPausedLendingToken(address _lendingToken, bool _isPaused) external nonpayable

Parameters

NameTypeDescription

_lendingToken

address

undefined

_isPaused

bool

undefined

setPausedProjectToken

function setPausedProjectToken(address _projectToken, bool _isDepositPaused, bool _isWithdrawPaused) external nonpayable

Parameters

NameTypeDescription

_projectToken

address

undefined

_isDepositPaused

bool

undefined

_isWithdrawPaused

bool

undefined

setPriceOracle

function setPriceOracle(address _priceOracle) external nonpayable

Parameters

NameTypeDescription

_priceOracle

address

undefined

setProjectTokenInfo

function setProjectTokenInfo(address _projectToken, uint8 _loanToValueRatioNumerator, uint8 _loanToValueRatioDenominator, uint8 _liquidationThresholdFactorNumerator, uint8 _liquidationThresholdFactorDenominator, uint8 _liquidationIncentiveNumerator, uint8 _liquidationIncentiveDenominator) external nonpayable

Parameters

NameTypeDescription

_projectToken

address

undefined

_loanToValueRatioNumerator

uint8

undefined

_loanToValueRatioDenominator

uint8

undefined

_liquidationThresholdFactorNumerator

uint8

undefined

_liquidationThresholdFactorDenominator

uint8

undefined

_liquidationIncentiveNumerator

uint8

undefined

_liquidationIncentiveDenominator

uint8

undefined

supply

function supply(address lendingToken, uint256 lendingTokenAmount) external nonpayable

Parameters

NameTypeDescription

lendingToken

address

undefined

lendingTokenAmount

uint256

undefined

supportsInterface

function supportsInterface(bytes4 interfaceId) external view returns (bool)

See {IERC165-supportsInterface}.

Parameters

NameTypeDescription

interfaceId

bytes4

undefined

Returns

NameTypeDescription

_0

bool

undefined

symbol

function symbol() external view returns (string)

Returns

NameTypeDescription

_0

string

undefined

totalBorrow

function totalBorrow(address, address) external view returns (uint256)

Parameters

NameTypeDescription

_0

address

undefined

_1

address

undefined

Returns

NameTypeDescription

_0

uint256

undefined

totalDepositedProjectToken

function totalDepositedProjectToken(address) external view returns (uint256)

Parameters

NameTypeDescription

_0

address

undefined

Returns

NameTypeDescription

_0

uint256

undefined

totalOutstanding

function totalOutstanding(address account, address projectToken, address lendingToken) external view returns (uint256)

Parameters

NameTypeDescription

account

address

undefined

projectToken

address

undefined

lendingToken

address

undefined

Returns

NameTypeDescription

_0

uint256

undefined

updateInterestInBorrowPositions

function updateInterestInBorrowPositions(address account, address lendingToken) external nonpayable

Parameters

NameTypeDescription

account

address

undefined

lendingToken

address

undefined

withdraw

function withdraw(address projectToken, address lendingToken, uint256 projectTokenAmount) external nonpayable

Parameters

NameTypeDescription

projectToken

address

undefined

lendingToken

address

undefined

projectTokenAmount

uint256

undefined

Events

AddPrjToken

event AddPrjToken(address indexed tokenPrj)

Parameters

NameTypeDescription

tokenPrj indexed

address

undefined

Borrow

event Borrow(address indexed who, address indexed borrowToken, uint256 borrowAmount, address indexed prjAddress, uint256 prjAmount)

Parameters

NameTypeDescription

who indexed

address

undefined

borrowToken indexed

address

undefined

borrowAmount

uint256

undefined

prjAddress indexed

address

undefined

prjAmount

uint256

undefined

Deposit

event Deposit(address indexed who, address indexed tokenPrj, address lendingToken, uint256 prjDepositAmount, address indexed beneficiary)

Parameters

NameTypeDescription

who indexed

address

undefined

tokenPrj indexed

address

undefined

lendingToken

address

undefined

prjDepositAmount

uint256

undefined

beneficiary indexed

address

undefined

Liquidate

event Liquidate(address indexed liquidator, address indexed borrower, address lendingToken, address indexed prjAddress, uint256 amountPrjLiquidated)

Parameters

NameTypeDescription

liquidator indexed

address

undefined

borrower indexed

address

undefined

lendingToken

address

undefined

prjAddress indexed

address

undefined

amountPrjLiquidated

uint256

undefined

LiquidationIncentiveSet

event LiquidationIncentiveSet(address indexed tokenPrj, uint8 ltfNumerator, uint8 ltfDenominator)

Parameters

NameTypeDescription

tokenPrj indexed

address

undefined

ltfNumerator

uint8

undefined

ltfDenominator

uint8

undefined

LiquidationThresholdFactorSet

event LiquidationThresholdFactorSet(address indexed tokenPrj, uint8 ltfNumerator, uint8 ltfDenominator)

Parameters

NameTypeDescription

tokenPrj indexed

address

undefined

ltfNumerator

uint8

undefined

ltfDenominator

uint8

undefined

LoanToValueRatioSet

event LoanToValueRatioSet(address indexed tokenPrj, uint8 lvrNumerator, uint8 lvrDenominator)

Parameters

NameTypeDescription

tokenPrj indexed

address

undefined

lvrNumerator

uint8

undefined

lvrDenominator

uint8

undefined

Redeem

event Redeem(address indexed who, address indexed redeemToken, address indexed redeemBToken, uint256 redeemAmount)

Parameters

NameTypeDescription

who indexed

address

undefined

redeemToken indexed

address

undefined

redeemBToken indexed

address

undefined

redeemAmount

uint256

undefined

RedeemUnderlying

event RedeemUnderlying(address indexed who, address indexed redeemToken, address indexed redeemBToken, uint256 redeemAmountUnderlying)

Parameters

NameTypeDescription

who indexed

address

undefined

redeemToken indexed

address

undefined

redeemBToken indexed

address

undefined

redeemAmountUnderlying

uint256

undefined

RepayBorrow

event RepayBorrow(address indexed who, address indexed borrowToken, uint256 borrowAmount, address indexed prjAddress, bool isPositionFullyRepaid)

Parameters

NameTypeDescription

who indexed

address

undefined

borrowToken indexed

address

undefined

borrowAmount

uint256

undefined

prjAddress indexed

address

undefined

isPositionFullyRepaid

bool

undefined

RoleAdminChanged

event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)

Parameters

NameTypeDescription

role indexed

bytes32

undefined

previousAdminRole indexed

bytes32

undefined

newAdminRole indexed

bytes32

undefined

RoleGranted

event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)

Parameters

NameTypeDescription

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

RoleRevoked

event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)

Parameters

NameTypeDescription

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

Supply

event Supply(address indexed who, address indexed supplyToken, uint256 supplyAmount, address indexed supplyBToken, uint256 amountSupplyBTokenReceived)

Parameters

NameTypeDescription

who indexed

address

undefined

supplyToken indexed

address

undefined

supplyAmount

uint256

undefined

supplyBToken indexed

address

undefined

amountSupplyBTokenReceived

uint256

undefined

Withdraw

event Withdraw(address indexed who, address indexed tokenPrj, address lendingToken, uint256 prjWithdrawAmount, address indexed beneficiary)

Parameters

NameTypeDescription

who indexed

address

undefined

tokenPrj indexed

address

undefined

lendingToken

address

undefined

prjWithdrawAmount

uint256

undefined

beneficiary indexed

address

undefined

Last updated