PrimaryLendingPlatformWrappedTokenGatewayCore
Overview
License: MIT
Core contract for the Primary Lending Platform Wrapped Token Gateway Core
Abstract contract that defines the core functionality of the primary lending platform wrapped token gateway.
Events info
SetPrimaryLendingPlatform
Emitted when the PrimaryLendingPlatform contract address is updated.
Parameters:
newPrimaryLendingPlatform
address
The new address of the PrimaryLendingPlatform contract.
SetPITLiquidation
Emitted when the PIT liquidation address is set.
SetPITLeverage
Emitted when the PIT (Pool Interest Token) leverage is set to a new address.
Parameters:
newPITLeverage
address
The address of the new PIT leverage contract.
SetWETH
Emitted when the WETH address is set.
Parameters:
newWETH
address
The address of the new WETH contract.
Constants info
MODERATOR_ROLE (0x797669c9)
State variables info
primaryLendingPlatform (0x92641a7c)
WETH (0xad5c4648)
pitLiquidation (0xf8514cae)
pitLeverage (0x22c7ddee)
Modifiers info
onlyModerator
Modifier that allows only the moderator to execute the function.
isProjectTokenListed
Modifier that checks if the project token is listed.
Parameters:
projectToken
address
Address of the project token.
isLendingTokenListed
Modifier that checks if the lending token is listed.
Parameters:
lendingToken
address
Address of the lending token.
Functions info
initialize (0xf8c8765e)
Initializes the PrimaryLendingPlatformWrappedTokenGateway contract.
Parameters:
pit
address
Address of the primary index token contract.
weth
address
Address of the wrapped Ether (WETH) token contract.
pitLiquidationAddress
address
Address of the primary index token liquidation contract.
pitLeverageAddress
address
Address of the primary index token leverage contract.
setWETH (0x5b769f3c)
Sets the address of the WETH contract.
Requirements:
newWETH
cannot be the zero address.Caller must be a moderator.
Parameters:
_weth
address
The address of the new WETH contract.
setPrimaryLendingPlatform (0xe801734a)
Sets the address of the primary lending platform contract.
Requirements:
newPit
cannot be the zero address.Caller must be a moderator.
Parameters:
newPit
address
The address of the new primary lending platform contract.
setPITLiquidation (0x6ccf9e23)
Only the moderator can call this function.
Sets the address of the PrimaryLendingPlatformLiquidation contract for PIT liquidation.
Requirements:
newLiquidation
cannot be the zero address.Caller must be a moderator.
Parameters:
newLiquidation
address
The address of the new PrimaryLendingPlatformLiquidation contract.
setPITLeverage (0x1a58ed4a)
Sets the Primary Lending Platform Leverage contract address.
Requirements:
newLeverage
cannot be the zero address.Caller must be a moderator.
Parameters:
newLeverage
address
The address of the new Primary Lending Platform Leverage contract.
getTotalOutstanding (0x75efd575)
Returns the total outstanding balance of a user for a specific project token.
Parameters:
user
address
The address of the user.
projectToken
address
The address of the project token.
Return values:
outstanding
uint256
The total outstanding balance of the user.
deposit (0xd0e30db0)
Deposits Ether into the PrimaryLendingPlatformWrappedTokenGatewayCore contract and wraps it into WETH.
repay (0x22867d78)
Repays the specified amount of the project token's Ether outstanding debt using the lending token.
Parameters:
projectToken
address
The address of the project token.
lendingTokenAmount
uint256
The amount of the lending token to be used for repayment.
receive
Only WETH contract is allowed to transfer ETH here. Prevent other addresses to send Ether to this contract.
fallback
Reverts any fallback calls to the contract.
Last updated