core-artifacts
Version:
Consist artifacts of the maple protocol
637 lines • 469 kB
JSON
{
"id": "e623c6f3609a72c8ccf53765827cfaa9",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.6.11",
"solcLongVersion": "0.6.11+commit.5ef660b1",
"input": {
"language": "Solidity",
"sources": {
"contracts/core/pool/v1/interfaces/IPool.sol": {
"content": "// SPDX-License-Identifier: AGPL-3.0-or-later // hevm: flattened sources of contracts/core/pool/v1/interfaces/IPool.sol\npragma solidity =0.6.11 >=0.6.0 <0.8.0;\n\n////// lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\n/* pragma solidity >=0.6.0 <0.8.0; */\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n////// contracts/core/funds-distribution-token/v1/interfaces/IBasicFDT.sol\n/* pragma solidity 0.6.11; */\n\n/* import { IERC20 } from \"../../../../../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\"; */\n\n/// @title BasicFDT implements the basic level FDT functionality for accounting for revenues.\ninterface IBasicFDT is IERC20 {\n\n /**\n @dev This event emits when new funds are distributed.\n @param by The address of the sender that distributed funds.\n @param fundsDistributed The amount of funds received for distribution.\n */\n event FundsDistributed(address indexed by, uint256 fundsDistributed);\n\n /**\n @dev This event emits when distributed funds are withdrawn by a token holder.\n @param by The address of the receiver of funds.\n @param fundsWithdrawn The amount of funds that were withdrawn.\n @param totalWithdrawn The total amount of funds that were withdrawn.\n */\n event FundsWithdrawn(address indexed by, uint256 fundsWithdrawn, uint256 totalWithdrawn);\n\n /**\n @dev This event emits when the internal `pointsPerShare` is updated.\n @dev First, and only, parameter is the new value of the internal `pointsPerShare`.\n */\n event PointsPerShareUpdated(uint256);\n\n /**\n @dev This event emits when an account's `pointsCorrection` is updated.\n @dev First parameter is the address of some account.\n @dev Second parameter is the new value of the account's `pointsCorrection`.\n */\n event PointsCorrectionUpdated(address indexed, int256);\n\n /**\n @dev Returns the amount of funds that an account can withdraw.\n @param _owner The address of some FDT holder.\n @return The amount funds that `_owner` can withdraw.\n */\n function withdrawableFundsOf(address _owner) external view returns (uint256);\n\n /**\n @dev Withdraws all available funds for the calling FDT holder.\n */\n function withdrawFunds() external;\n\n /**\n @dev Returns the amount of funds that an account has withdrawn.\n @param _owner The address of a token holder.\n @return The amount of funds that `_owner` has withdrawn.\n */\n function withdrawnFundsOf(address _owner) external view returns (uint256);\n\n /**\n @dev Returns the amount of funds that an account has earned in total. \n @dev accumulativeFundsOf(_owner) = withdrawableFundsOf(_owner) + withdrawnFundsOf(_owner) \n = (pointsPerShare * balanceOf(_owner) + pointsCorrection[_owner]) / pointsMultiplier \n @param _owner The address of a token holder.\n @return The amount of funds that `_owner` has earned in total.\n */\n function accumulativeFundsOf(address _owner) external view returns (uint256);\n\n /**\n @dev Registers a payment of funds in tokens. \n @dev May be called directly after a deposit is made. \n @dev Calls _updateFundsTokenBalance(), whereby the contract computes the delta of the new and previous \n `fundsToken` balance and increments the total received funds (cumulative), by delta, by calling _distributeFunds().\n */\n function updateFundsReceived() external;\n\n}\n\n////// contracts/core/funds-distribution-token/v1/interfaces/IExtendedFDT.sol\n/* pragma solidity 0.6.11; */\n\n/* import { IBasicFDT } from \"./IBasicFDT.sol\"; */\n\n/// @title ExtendedFDT implements the FDT functionality for accounting for losses.\ninterface IExtendedFDT is IBasicFDT {\n\n /**\n @dev This event emits when the internal `lossesPerShare` is updated.\n @dev First, and only, parameter is the new value of the internal `lossesPerShare`.\n */\n event LossesPerShareUpdated(uint256);\n\n /**\n @dev This event emits when an account's `lossesCorrection` is updated.\n @dev First parameter is the address of some account.\n @dev Second parameter is the new value of the account's `lossesCorrection`.\n */\n event LossesCorrectionUpdated(address indexed, int256);\n\n /**\n @dev This event emits when new losses are distributed.\n @dev First parameter is the address of the account that has distributed losses.\n @dev Second parameter is the amount of losses received for distribution.\n */\n event LossesDistributed(address indexed, uint256);\n\n /**\n @dev This event emits when distributed losses are recognized by a token holder.\n @dev First parameter is the address of the receiver of losses.\n @dev Second parameter is the amount of losses that were recognized.\n @dev Third parameter is the total amount of losses that are recognized.\n */\n event LossesRecognized(address indexed, uint256, uint256);\n\n /**\n @dev Returns the amount of losses that an account can withdraw.\n @param _owner The address of a token holder.\n @return The amount of losses that `_owner` can withdraw.\n */\n function recognizableLossesOf(address _owner) external view returns (uint256);\n\n /**\n @dev Returns the amount of losses that an account has recognized.\n @param _owner The address of a token holder.\n @return The amount of losses that `_owner` has recognized.\n */\n function recognizedLossesOf(address _owner) external view returns (uint256);\n\n /**\n @dev Returns the amount of losses that an account has earned in total. \n @dev accumulativeLossesOf(_owner) = recognizableLossesOf(_owner) + recognizedLossesOf(_owner) \n = (lossesPerShare * balanceOf(_owner) + lossesCorrection[_owner]) / pointsMultiplier \n @param _owner The address of a token holder.\n @return The amount of losses that `_owner` has earned in total.\n */\n function accumulativeLossesOf(address _owner) external view returns (uint256);\n\n /**\n @dev Registers a loss. \n @dev May be called directly after a shortfall after BPT burning occurs. \n @dev Calls _updateLossesTokenBalance(), whereby the contract computes the delta of the new and previous \n losses balance and increments the total losses (cumulative), by delta, by calling _distributeLosses(). \n */\n function updateLossesReceived() external;\n\n}\n\n////// contracts/core/pool/v1/interfaces/IPoolFDT.sol\n/* pragma solidity 0.6.11; */\n\n/* import { IExtendedFDT } from \"../../../funds-distribution-token/v1/interfaces/IExtendedFDT.sol\"; */\n\n/// @title PoolFDT inherits ExtendedFDT and accounts for gains/losses for Liquidity Providers.\ninterface IPoolFDT is IExtendedFDT {\n\n /**\n @dev The sum of all withdrawable interest.\n */\n function interestSum() external view returns (uint256);\n\n /**\n @dev The sum of all unrecognized losses.\n */\n function poolLosses() external view returns (uint256);\n\n /**\n @dev The amount of earned interest present and accounted for in this contract.\n */\n function interestBalance() external view returns (uint256);\n\n /**\n @dev The amount of losses present and accounted for in this contract.\n */\n function lossesBalance() external view returns (uint256);\n\n}\n\n////// contracts/core/pool/v1/interfaces/IPool.sol\n/* pragma solidity 0.6.11; */\n\n/* import { IERC20 } from \"../../../../../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\"; */\n\n/* import { IPoolFDT } from \"./IPoolFDT.sol\"; */\n\n/// @title Pool maintains all accounting and functionality related to Pools.\ninterface IPool is IPoolFDT {\n\n /**\n Initialized = The Pool has been initialized and is ready for liquidity.\n Finalized = The Pool has been sufficiently sourced wth liquidity.\n Deactivated = The Pool has been emptied and deactivated.\n */\n enum State { Initialized, Finalized, Deactivated }\n\n /**\n @dev Emits an event indicating a Loan was funded.\n @param loan The funded Loan.\n @param debtLocker The DebtLocker.\n @param amountFunded The amount the Loan was funded for.\n */\n event LoanFunded(address indexed loan, address debtLocker, uint256 amountFunded);\n\n /**\n @dev Emits an event indicating a Loan was claimed.\n @param loan The Loan.\n @param interest The interest.\n @param principal The principal.\n @param fee The total fee.\n @param stakeLockerPortion The portion of the fee for Stakers.\n @param poolDelegatePortion The portion of the fee for the Pool Delegate.\n */\n event Claim(address indexed loan, uint256 interest, uint256 principal, uint256 fee, uint256 stakeLockerPortion, uint256 poolDelegatePortion);\n\n /**\n @dev Emits an event indicating some Balance was updated.\n @param liquidityProvider The address of a Liquidity Provider.\n @param token The address of the token for which the balance of `liquidityProvider` changed.\n @param balance The new balance for `liquidityProvider`.\n */\n event BalanceUpdated(address indexed liquidityProvider, address indexed token, uint256 balance);\n\n /**\n @dev Emits an event indicating a transfer of funds was performed by a custodian.\n @param custodian The address of the custodian.\n @param from The source of funds that were custodied.\n @param to The destination of funds.\n @param amount The amount of custodied tokens transferred.\n */\n event CustodyTransfer(address indexed custodian, address indexed from, address indexed to, uint256 amount);\n\n /**\n @dev Emits an event indicating a change in the total amount in custodianship for an account.\n @param liquidityProvider The address of amount who's funds are being custodied.\n @param custodian The address of the custodian.\n @param oldAllowance The original total amount in custodian by `custodian` for `liquidityProvider`.\n @param newAllowance The updated total amount in custodian by `custodian` for `liquidityProvider`.\n */\n event CustodyAllowanceChanged(address indexed liquidityProvider, address indexed custodian, uint256 oldAllowance, uint256 newAllowance);\n\n /**\n @dev Emits an event indicating a that a Liquidity Provider's status has changed.\n @param liquidityProvider The address of a Liquidity Provider.\n @param status The new status of `liquidityProvider`.\n */\n event LPStatusChanged(address indexed liquidityProvider, bool status);\n\n /**\n @dev Emits an event indicating a that the Liquidity Cap for the Pool was set.\n @param newLiquidityCap The new liquidity cap.\n */\n event LiquidityCapSet(uint256 newLiquidityCap);\n\n /**\n @dev Emits an event indicating a that the lockup period for the Pool was set.\n @param newLockupPeriod The new lockup cap.\n */\n event LockupPeriodSet(uint256 newLockupPeriod);\n\n /**\n @dev Emits an event indicating a that the staking fee for the Pool was set.\n @param newStakingFee The new fee Stakers earn (in basis points).\n */\n event StakingFeeSet(uint256 newStakingFee);\n\n /**\n @dev Emits an event indicating a that the state of the Pool has changed.\n @param state The new state of the Pool.\n */\n event PoolStateChanged(State state);\n\n /**\n @dev Emits an event indicating a that the withdrawal cooldown for a Liquidity Provider of the Pool has updated.\n @param liquidityProvider The address of a Liquidity Provider.\n @param cooldown The new withdrawal cooldown.\n */\n event Cooldown(address indexed liquidityProvider, uint256 cooldown);\n\n /**\n @dev Emits an event indicating a that a Pool's openness to the public has changed.\n @param isOpen Whether the Pool is open to the public to add liquidity.\n */\n event PoolOpenedToPublic(bool isOpen);\n\n /**\n @dev Emits an event indicating a that a PoolAdmin was set.\n @param poolAdmin The address of a PoolAdmin.\n @param allowed Whether `poolAdmin` is an admin of the Pool.\n */\n event PoolAdminSet(address indexed poolAdmin, bool allowed);\n\n /**\n @dev Emits an event indicating a that a Liquidity Provider's effective deposit date has changed.\n @param liquidityProvider The address of a Liquidity Provider.\n @param depositDate The new effective deposit date.\n */\n event DepositDateUpdated(address indexed liquidityProvider, uint256 depositDate);\n\n /**\n @dev Emits an event indicating a that a Liquidity Provider's total amount in custody of custodians has changed.\n @param liquidityProvider The address of a Liquidity Provider.\n @param newTotalAllowance The total amount in custody of custodians for `liquidityProvider`.\n */\n event TotalCustodyAllowanceUpdated(address indexed liquidityProvider, uint256 newTotalAllowance);\n\n /**\n @dev Emits an event indicating the one of the Pool's Loans defaulted.\n @param loan The address of the Loan that defaulted.\n @param defaultSuffered The amount of default suffered.\n @param bptsBurned The amount of BPTs burned to recover funds.\n @param bptsReturned The amount of BPTs returned to Liquidity Provider.\n @param liquidityAssetRecoveredFromBurn The amount of Liquidity Asset recovered from burning BPTs.\n */\n event DefaultSuffered(\n address indexed loan,\n uint256 defaultSuffered,\n uint256 bptsBurned,\n uint256 bptsReturned,\n uint256 liquidityAssetRecoveredFromBurn\n );\n\n /**\n @dev The factory type of `DebtLockerFactory`.\n */\n function DL_FACTORY() external pure returns (uint8);\n\n /**\n @dev The asset deposited by Lenders into the LiquidityLocker, for funding Loans.\n */\n function liquidityAsset() external pure returns (IERC20);\n\n /**\n @dev The Pool Delegate address, maintains full authority over the Pool.\n */\n function poolDelegate() external pure returns (address);\n\n /**\n @dev The address of the asset deposited by Stakers into the StakeLocker (BPTs), for liquidation during default events.\n */\n function liquidityLocker() external pure returns (address);\n\n /**\n @dev The address of the asset deposited by Stakers into the StakeLocker (BPTs), for liquidation during default events.\n */\n function stakeAsset() external pure returns (address);\n\n /**\n @dev The address of the StakeLocker, escrowing `stakeAsset`.\n */\n function stakeLocker() external pure returns (address);\n\n /**\n @dev The factory that deployed this Loan.\n */\n function superFactory() external pure returns (address);\n\n /**\n @dev The fee Stakers earn (in basis points).\n */\n function stakingFee() external view returns (uint256);\n\n /**\n @dev The fee the Pool Delegate earns (in basis points).\n */\n function delegateFee() external pure returns (uint256);\n\n /**\n @dev The sum of all outstanding principal on Loans.\n */\n function principalOut() external view returns (uint256);\n\n /**\n @dev The amount of liquidity tokens accepted by the Pool.\n */\n function liquidityCap() external view returns (uint256);\n\n /**\n @dev The period of time from an account's deposit date during which they cannot withdraw any funds.\n */\n function lockupPeriod() external view returns (uint256);\n\n /**\n @dev Whether the Pool is open to the public for LP deposits.\n */\n function openToPublic() external view returns (bool);\n\n /**\n @dev The state of the Pool.\n */\n function poolState() external view returns (State);\n\n /**\n @dev Used for withdraw penalty calculation.\n @param account The address of an account.\n @return The unix timestamp of the weighted average deposit date of `account`.\n */\n function depositDate(address account) external view returns (uint256);\n\n /**\n @param loan The address of a Loan.\n @param debtLockerFactory The address of a DebtLockerFactory.\n @return The address of the DebtLocker corresponding to `loan` and `debtLockerFactory`.\n */\n function debtLockers(address loan, address debtLockerFactory) external view returns (address);\n\n /**\n @param poolAdmin The address of a PoolAdmin.\n @return Whether `poolAdmin` has permission to do certain operations in case of disaster management.\n */\n function poolAdmins(address poolAdmin) external view returns (bool);\n\n /**\n @param liquidityProvider The address of a LiquidityProvider.\n @return Whether `liquidityProvider` has early access to the Pool.\n */\n function allowedLiquidityProviders(address liquidityProvider) external view returns (bool);\n\n /**\n @param liquidityProvider The address of a LiquidityProvider.\n @return The unix timestamp of when individual LPs have notified of their intent to withdraw.\n */\n function withdrawCooldown(address liquidityProvider) external view returns (uint256);\n\n /**\n @param account The address of an account.\n @param custodian The address of a custodian.\n @return The amount of PoolFDTs of `account` that are \"locked\" at `custodian`.\n */\n function custodyAllowance(address account, address custodian) external view returns (uint256);\n\n /**\n @param account The address of an account.\n @return The total amount of PoolFDTs that are \"locked\" for `account`. Cannot be greater than the account's balance.\n */\n function totalCustodyAllowance(address account) external view returns (uint256);\n\n /**\n @dev Finalizes the Pool, enabling deposits. \n @dev Checks the amount the Pool Delegate deposited to the StakeLocker. \n @dev Only the Pool Delegate can call this function. \n @dev It emits a `PoolStateChanged` event. \n */\n function finalize() external;\n\n /**\n @dev Funds a Loan for an amount, utilizing the supplied DebtLockerFactory for DebtLockers. \n @dev Only the Pool Delegate can call this function. \n @dev It emits a `LoanFunded` event. \n @dev It emits a `BalanceUpdated` event. \n @param loan The address of the Loan to fund.\n @param dlFactory The address of the DebtLockerFactory to utilize.\n @param amt The amount to fund the Loan.\n */\n function fundLoan(address loan, address dlFactory, uint256 amt) external;\n\n /**\n @dev Liquidates a Loan. \n @dev The Pool Delegate could liquidate the Loan only when the Loan completes its grace period. \n @dev The Pool Delegate can claim its proportion of recovered funds from the liquidation using the `claim()` function. \n @dev Only the Pool Delegate can call this function. \n @param loan The address of the Loan to liquidate.\n @param dlFactory The address of the DebtLockerFactory that is used to pull corresponding DebtLocker.\n */\n function triggerDefault(address loan, address dlFactory) external;\n\n /**\n @dev Claims available funds for the Loan through a specified DebtLockerFactory. \n @dev Only the Pool Delegate or a Pool Admin can call this function. \n @dev It emits two `BalanceUpdated` events. \n @dev It emits a `Claim` event. \n @param loan The address of the loan to claim from.\n @param dlFactory The address of the DebtLockerFactory.\n @return claimInfo The claim details. \n [0] => Total amount claimed, \n [1] => Interest portion claimed, \n [2] => Principal portion claimed, \n [3] => Fee portion claimed, \n [4] => Excess portion claimed, \n [5] => Recovered portion claimed (from liquidations), \n [6] => Default suffered. \n */\n function claim(address loan, address dlFactory) external returns (uint256[7] memory claimInfo);\n\n /**\n @dev Triggers deactivation, permanently shutting down the Pool. \n @dev Must have less than 100 USD worth of Liquidity Asset `principalOut`. \n @dev Only the Pool Delegate can call this function. \n @dev It emits a `PoolStateChanged` event. \n */\n function deactivate() external;\n \n /**\n @dev Sets the liquidity cap. \n @dev Only the Pool Delegate or a Pool Admin can call this function. \n @dev It emits a `LiquidityCapSet` event. \n @param newLiquidityCap The new liquidity cap value.\n */\n function setLiquidityCap(uint256 newLiquidityCap) external;\n\n /**\n @dev Sets the lockup period. \n @dev Only the Pool Delegate can call this function. \n @dev It emits a `LockupPeriodSet` event. \n @param newLockupPeriod The new lockup period used to restrict the withdrawals.\n */\n function setLockupPeriod(uint256 newLockupPeriod) external;\n\n /**\n @dev Sets the staking fee. \n @dev Only the Pool Delegate can call this function. \n @dev It emits a `StakingFeeSet` event. \n @param newStakingFee The new staking fee.\n */\n function setStakingFee(uint256 newStakingFee) external;\n\n /**\n @dev Sets the account status in the Pool's allowlist. \n @dev Only the Pool Delegate can call this function. \n @dev It emits an `LPStatusChanged` event. \n @param account The address to set status for.\n @param status The status of an account in the allowlist.\n */\n function setAllowList(address account, bool status) external;\n\n /**\n @dev Sets a Pool Admin. \n @dev Only the Pool Delegate can call this function. \n @dev It emits a `PoolAdminSet` event. \n @param poolAdmin An address being allowed or disallowed as a Pool Admin.\n @param allowed Whether `poolAdmin` is an admin of the Pool.\n */\n function setPoolAdmin(address poolAdmin, bool allowed) external;\n\n /**\n @dev Sets whether the Pool is open to the public. \n @dev Only the Pool Delegate can call this function. \n @dev It emits a `PoolOpenedToPublic` event. \n @param open Whether the Pool is open to liquidity from the public.\n */\n function setOpenToPublic(bool open) external;\n\n /**\n @dev Handles Liquidity Providers depositing of Liquidity Asset into the LiquidityLocker, minting PoolFDTs. \n @dev It emits a `DepositDateUpdated` event. \n @dev It emits a `BalanceUpdated` event. \n @dev It emits a `Cooldown` event. \n @param amt The amount of Liquidity Asset to deposit.\n */\n function deposit(uint256 amt) external;\n\n /**\n @dev Activates the cooldown period to withdraw. \n @dev It can't be called if the account is not providing liquidity. \n @dev It emits a `Cooldown` event. \n */\n function intendToWithdraw() external;\n\n /**\n @dev Cancels an initiated withdrawal by resetting the account's withdraw cooldown. \n @dev It emits a `Cooldown` event. \n */\n function cancelWithdraw() external;\n\n /**\n @dev Handles Liquidity Providers withdrawing of Liquidity Asset from the LiquidityLocker, burning PoolFDTs. \n @dev It emits two `BalanceUpdated` event. \n @param amt The amount of Liquidity Asset to withdraw.\n */\n function withdraw(uint256 amt) external;\n\n /**\n @dev Withdraws all claimable interest from the LiquidityLocker for an account using `interestSum` accounting. \n @dev It emits a `BalanceUpdated` event. \n */\n function withdrawFunds() external override;\n\n /**\n @dev Increases the custody allowance for a given Custodian corresponding to the calling account (`msg.sender`). \n @dev It emits a `CustodyAllowanceChanged` event. \n @dev It emits a `TotalCustodyAllowanceUpdated` event. \n @param custodian The address which will act as Custodian of a given amount for an account.\n @param amount The number of additional FDTs to be custodied by the Custodian.\n */\n function increaseCustodyAllowance(address custodian, uint256 amount) external;\n\n /**\n @dev Transfers custodied PoolFDTs back to the account. \n @dev `from` and `to` should always be equal in this implementation. \n @dev This means that the Custodian can only decrease their own allowance and unlock funds for the original owner. \n @dev It emits a `CustodyTransfer` event. \n @dev It emits a `CustodyAllowanceChanged` event. \n @dev It emits a `TotalCustodyAllowanceUpdated` event. \n @param from The address which holds the PoolFDTs.\n @param to The address which will be the new owner of the amount of PoolFDTs.\n @param amount The amount of PoolFDTs transferred.\n */\n function transferByCustodian(address from, address to, uint256 amount) external;\n\n /**\n @dev Transfers any locked funds to the Governor. \n @dev Only the Governor can call this function. \n @param token The address of the token to be reclaimed.\n */\n function reclaimERC20(address token) external;\n \n /**\n @dev Calculates the value of BPT in units of Liquidity Asset.\n @param _bPool The address of Balancer pool.\n @param _liquidityAsset The asset used by Pool for liquidity to fund Loans.\n @param _staker The address that deposited BPTs to StakeLocker.\n @param _stakeLocker Escrows BPTs deposited by Staker.\n @return USDC value of staker BPTs.\n */\n function BPTVal(\n address _bPool,\n address _liquidityAsset,\n address _staker,\n address _stakeLocker\n ) external view returns (uint256);\n\n /**\n @dev Checks that the given deposit amount is acceptable based on current liquidityCap.\n @param depositAmt The amount of tokens (i.e liquidityAsset type) the account is trying to deposit.\n */\n function isDepositAllowed(uint256 depositAmt) external view returns (bool);\n\n /**\n @dev Returns information on the stake requirements.\n @return The min amount of Liquidity Asset coverage from staking required.\n @return The present amount of Liquidity Asset coverage from the Pool Delegate stake.\n @return Whether enough stake is present from the Pool Delegate for finalization.\n @return The staked BPTs required for minimum Liquidity Asset coverage.\n @return The current staked BPTs.\n */\n function getInitialStakeRequirements() external view returns (uint256, uint256, bool, uint256, uint256);\n\n /**\n @dev Calculates BPTs required if burning BPTs for the Liquidity Asset, given supplied `tokenAmountOutRequired`.\n @param _bPool The Balancer pool that issues the BPTs.\n @param _liquidityAsset Swap out asset (e.g. USDC) to receive when burning BPTs.\n @param _staker The address that deposited BPTs to StakeLocker.\n @param _stakeLocker Escrows BPTs deposited by Staker.\n @param _liquidityAssetAmountRequired The amount of Liquidity Asset required to recover.\n @return The `poolAmountIn` required.\n @return The `poolAmountIn` currently staked.\n */\n function getPoolSharesRequired(\n address _bPool,\n address _liquidityAsset,\n address _staker,\n address _stakeLocker,\n uint256 _liquidityAssetAmountRequired\n ) external view returns (uint256, uint256);\n\n /**\n @dev Checks that the Pool state is `Finalized`.\n @return Whether the Pool is in a Finalized state.\n */\n function isPoolFinalized() external view returns (bool);\n\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers"
],
"": [
"ast"
]
}
}
}
},
"output": {
"contracts": {
"contracts/core/pool/v1/interfaces/IPool.sol": {
"IBasicFDT": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "by",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fundsDistributed",
"type": "uint256"
}
],
"name": "FundsDistributed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "by",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fundsWithdrawn",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "totalWithdrawn",
"type": "uint256"
}
],
"name": "FundsWithdrawn",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "",
"type": "address"
},
{
"indexed": false,
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"name": "PointsCorrectionUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "PointsPerShareUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "accumulativeFundsOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "updateFundsReceived",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "withdrawFunds",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "withdrawableFundsOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "withdrawnFundsOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"accumulativeFundsOf(address)": "4e97415f",
"allowance(address,address)": "dd62ed3e",
"approve(address,uint256)": "095ea7b3",
"balanceOf(address)": "70a08231",
"totalSupply()": "18160ddd",
"transfer(address,uint256)": "a9059cbb",
"transferFrom(address,address,uint256)": "23b872dd",
"updateFundsReceived()": "46c162de",
"withdrawFunds()": "24600fc3",
"withdrawableFundsOf(address)": "443bb293",
"withdrawnFundsOf(address)": "0041c52c"
}
}
},
"IERC20": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"allowance(address,address)": "dd62ed3e",
"approve(address,uint256)": "095ea7b3",
"balanceOf(address)": "70a08231",
"totalSupply()": "18160ddd",
"transfer(address,uint256)": "a9059cbb",
"transferFrom(address,address,uint256)": "23b872dd"
}
}
},
"IExtendedFDT": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs