UNPKG

core-artifacts

Version:

Consist artifacts of the maple protocol

774 lines (773 loc) 383 kB
{ "id": "425ed6f6a444e5094f5b65349930a00b", "_format": "hh-sol-build-info-1", "solcVersion": "0.6.11", "solcLongVersion": "0.6.11+commit.5ef660b1", "input": { "language": "Solidity", "sources": { "contracts/core/loan/v1/interfaces/ILoanFactory.sol": { "content": "// SPDX-License-Identifier: AGPL-3.0-or-later // hevm: flattened sources of contracts/core/loan/v1/interfaces/ILoanFactory.sol\npragma solidity =0.6.11;\n\n////// contracts/core/globals/v1/interfaces/IMapleGlobals.sol\n/* pragma solidity 0.6.11; */\n\n/// @title MapleGlobals maintains a central source of parameters and allowlists for the Maple protocol.\ninterface IMapleGlobals {\n\n /**\n @dev Emits an event indicating the MapleGlobals contract was created.\n */\n event Initialized();\n\n /**\n @dev Emits an event indicating the validity of a Collateral Asset was set.\n @param asset The Collateral Asset to assign validity to.\n @param decimals The number of decimal places of `asset`.\n @param symbol The symbol of `asset`.\n @param valid The new validity status of `asset`.\n */\n event CollateralAssetSet(address asset, uint256 decimals, string symbol, bool valid);\n\n /**\n @dev Emits an event indicating the validity of a Liquidity Asset was set.\n @param asset The Liquidity Asset to assign validity to.\n @param decimals The number of decimal places of `asset`.\n @param symbol The symbol of `asset`.\n @param valid The new validity status of `asset`.\n */\n event LiquidityAssetSet(address asset, uint256 decimals, string symbol, bool valid);\n\n /**\n @dev Emits an event indicating the Oracle for an asset was set.\n @param asset The asset to update price for.\n @param oracle The new Oracle to use.\n */\n event OracleSet(address asset, address oracle);\n\n /**\n @dev This is unused.\n */\n event TransferRestrictionExemptionSet(address indexed exemptedContract, bool valid);\n\n /**\n @dev Emits an event indicating the validity of a Balancer Pool was set.\n @param balancerPool The address of Balancer Pool contract.\n @param valid The new validity status of a Balancer Pool.\n */\n event BalancerPoolSet(address balancerPool, bool valid);\n\n /**\n @dev Emits an event indicating a PendingGovernor was set.\n @param pendingGovernor The address of the new Pending Governor.\n */\n event PendingGovernorSet(address indexed pendingGovernor);\n\n /**\n @dev Emits an event indicating Governorship was accepted by a new account.\n @param governor The account that has accepted Governorship.\n */\n event GovernorAccepted(address indexed governor);\n\n /**\n @dev Emits an event indicating that some Governor controlled parameter was set.\n @param which The identifier of the parameter that was set.\n @param value The value the parameter was set to.\n */\n event GlobalsParamSet(bytes32 indexed which, uint256 value);\n\n /**\n @dev Emits an event indicating that some Governor controlled address was set.\n @param which The identifier of the address that was set.\n @param addr The address that was set.\n */\n event GlobalsAddressSet(bytes32 indexed which, address addr);\n\n /**\n @dev Emits an event indicating the protocol's paused state has been set.\n @param pause Whether the protocol was paused.\n */\n event ProtocolPaused(bool pause);\n\n /**\n @dev Emits an event indicating the GlobalAdmin was set.\n @param newGlobalAdmin The address of the new GlobalAdmin.\n */\n event GlobalAdminSet(address indexed newGlobalAdmin);\n\n /**\n @dev Emits an event indicating the validity of a Pool Delegate was set.\n @param poolDelegate The address of a Pool Delegate.\n @param valid Whether `poolDelegate` is a valid Pool Delegate.\n */\n event PoolDelegateSet(address indexed poolDelegate, bool valid);\n\n /**\n @dev The ERC-2222 Maple Token for the Maple protocol.\n */\n function mpl() external pure returns (address);\n\n /**\n @dev The Governor that is declared for governorship transfer. \n @dev Must be accepted for transfer to take effect. \n */\n function pendingGovernor() external view returns (address);\n\n /**\n @dev The Governor responsible for management of global Maple variables.\n */\n function governor() external view returns (address);\n\n /**\n @dev The MapleTreasury is the Treasury where all fees pass through for conversion, prior to distribution.\n */\n function mapleTreasury() external view returns (address);\n\n /**\n @dev The Global Admin of the whole network. \n @dev Has the power to switch off/on the functionality of entire protocol. \n */\n function globalAdmin() external view returns (address);\n\n /**\n @dev The amount of time a Borrower has to make a missed payment before a default can be triggered. \n */\n function defaultGracePeriod() external view returns (uint256);\n\n /**\n @dev The minimum amount of Pool cover that a Pool Delegate has to provide before they can finalize a Pool.\n */\n function swapOutRequired() external view returns (uint256);\n\n /**\n @dev The amount of time to allow a Borrower to drawdown on their Loan after funding period ends.\n */\n function fundingPeriod() external view returns (uint256);\n\n /**\n @dev The portion of drawdown that goes to the Pool Delegates and individual Lenders.\n */\n function investorFee() external view returns (uint256);\n\n /**\n @dev The portion of drawdown that goes to the MapleTreasury.\n */\n function treasuryFee() external view returns (uint256);\n\n /**\n @dev The maximum amount of slippage for Uniswap transactions.\n */\n function maxSwapSlippage() external view returns (uint256);\n\n /**\n @dev The minimum amount of LoanFDTs required to trigger liquidations (basis points percentage of totalSupply).\n */\n function minLoanEquity() external view returns (uint256);\n\n /**\n @dev The period (in secs) after which Stakers are allowed to unstake their BPTs from a StakeLocker.\n */\n function stakerCooldownPeriod() external view returns (uint256);\n\n /**\n @dev The period (in secs) after which LPs are allowed to withdraw their funds from a Pool.\n */\n function lpCooldownPeriod() external view returns (uint256);\n\n /**\n @dev The window of time (in secs) after `stakerCooldownPeriod` that an account has to withdraw before their intent to unstake is invalidated.\n */\n function stakerUnstakeWindow() external view returns (uint256);\n\n /**\n @dev The window of time (in secs) after `lpCooldownPeriod` that an account has to withdraw before their intent to withdraw is invalidated.\n */\n function lpWithdrawWindow() external view returns (uint256);\n\n /**\n @dev Whether the functionality of the entire protocol is paused.\n */\n function protocolPaused() external view returns (bool);\n\n /**\n @param liquidityAsset The address of a Liquidity Asset.\n @return Whether `liquidityAsset` is valid.\n */\n function isValidLiquidityAsset(address liquidityAsset) external view returns (bool);\n\n /**\n @param collateralAsset The address of a Collateral Asset.\n @return Whether `collateralAsset` is valid.\n */\n function isValidCollateralAsset(address collateralAsset) external view returns (bool);\n\n /**\n @param calc The address of a Calculator.\n @return Whether `calc` is valid.\n */\n function validCalcs(address calc) external view returns (bool);\n\n /**\n @dev Prevents unauthorized/unknown addresses from creating Pools.\n @param poolDelegate The address of a Pool Delegate.\n @return Whether `poolDelegate` is valid.\n */\n function isValidPoolDelegate(address poolDelegate) external view returns (bool);\n\n /**\n @param balancerPool The address of a Balancer Pool.\n @return Whether Maple has approved `balancerPool` for BPT staking.\n */\n function isValidBalancerPool(address balancerPool) external view returns (bool);\n\n /**\n @dev Determines the liquidation path of various assets in Loans and the Treasury. \n @dev The value provided will determine whether or not to perform a bilateral or triangular swap on Uniswap. \n @dev For example, `defaultUniswapPath[WBTC][USDC]` value would indicate what asset to convert WBTC into before conversion to USDC. \n @dev If `defaultUniswapPath[WBTC][USDC] == USDC`, then the swap is bilateral and no middle asset is swapped. \n @dev If `defaultUniswapPath[WBTC][USDC] == WETH`, then swap WBTC for WETH, then WETH for USDC. \n @param tokenA The address of the asset being swapped.\n @param tokenB The address of the final asset to receive.\n @return The intermediary asset for swaps, if any.\n */\n function defaultUniswapPath(address tokenA, address tokenB) external view returns (address);\n\n /**\n @param asset The address of some token.\n @return The Chainlink Oracle for the price of `asset`.\n */\n function oracleFor(address asset) external view returns (address);\n \n /**\n @param poolFactory The address of a Pool Factory.\n @return Whether `poolFactory` is valid.\n */\n function isValidPoolFactory(address poolFactory) external view returns (bool);\n\n /**\n @param loanFactory The address of a Loan Factory.\n @return Whether `loanFactory` is valid.\n */\n function isValidLoanFactory(address loanFactory) external view returns (bool);\n \n /**\n @param superFactory The core factory (e.g. PoolFactory, LoanFactory).\n @param subFactory The sub factory used by core factory (e.g. LiquidityLockerFactory).\n @return Whether `subFactory` is valid as it relates to `superFactory`.\n */\n function validSubFactories(address superFactory, address subFactory) external view returns (bool);\n \n /**\n @dev Sets the Staker cooldown period. \n @dev This change will affect the existing cool down period for the Stakers that already intended to unstake. \n @dev Only the Governor can call this function. \n @dev It emits a `GlobalsParamSet` event. \n @param newCooldownPeriod The new value for the cool down period.\n */\n function setStakerCooldownPeriod(uint256 newCooldownPeriod) external;\n\n /**\n @dev Sets the Liquidity Pool cooldown period. \n @dev This change will affect the existing cool down period for the LPs that already intended to withdraw. \n @dev Only the Governor can call this function. \n @dev It emits a `GlobalsParamSet` event. \n @param newCooldownPeriod The new value for the cool down period.\n */\n function setLpCooldownPeriod(uint256 newCooldownPeriod) external;\n\n /**\n @dev Sets the Staker unstake window. \n @dev This change will affect the existing window for the Stakers that already intended to unstake. \n @dev Only the Governor can call this function. \n @dev It emits a `GlobalsParamSet` event. \n @param newUnstakeWindow The new value for the unstake window.\n */\n function setStakerUnstakeWindow(uint256 newUnstakeWindow) external;\n\n /**\n @dev Sets the Liquidity Pool withdraw window. \n @dev This change will affect the existing window for the LPs that already intended to withdraw. \n @dev Only the Governor can call this function. \n @dev It emits a `GlobalsParamSet` event. \n @param newLpWithdrawWindow The new value for the withdraw window.\n */\n function setLpWithdrawWindow(uint256 newLpWithdrawWindow) external;\n\n /**\n @dev Sets the allowed Uniswap slippage percentage, in basis points. \n @dev Only the Governor can call this function. \n @dev It emits a `GlobalsParamSet` event. \n @param newMaxSlippage The new max slippage percentage (in basis points)\n */\n function setMaxSwapSlippage(uint256 newMaxSlippage) external;\n\n /**\n @dev Sets the Global Admin. \n @dev Only the Governor can call this function. \n @dev It emits a `GlobalAdminSet` event. \n @param newGlobalAdmin The new global admin address.\n */\n function setGlobalAdmin(address newGlobalAdmin) external;\n\n /**\n @dev Sets the validity of a Balancer Pool. \n @dev Only the Governor can call this function. \n @dev It emits a `BalancerPoolSet` event. \n @param balancerPool The address of Balancer Pool contract.\n @param valid The new validity status of a Balancer Pool.\n */\n function setValidBalancerPool(address balancerPool, bool valid) external;\n\n /**\n @dev Sets the paused/unpaused state of the protocol. \n @dev Only the Global Admin can call this function. \n @dev It emits a `ProtocolPaused` event. \n @param pause A boolean flag to switch externally facing functionality in the protocol on/off.\n */\n function setProtocolPause(bool pause) external;\n\n /**\n @dev Sets the validity of a PoolFactory. \n @dev Only the Governor can call this function. \n @param poolFactory The address of a PoolFactory.\n @param valid The new validity status of `poolFactory`.\n */\n function setValidPoolFactory(address poolFactory, bool valid) external;\n\n /**\n @dev Sets the validity of a LoanFactory. \n @dev Only the Governor can call this function. \n @param loanFactory The address of a LoanFactory.\n @param valid The new validity status of `loanFactory`.\n */\n function setValidLoanFactory(address loanFactory, bool valid) external;\n\n /**\n @dev Sets the validity of `subFactory` as it relates to `superFactory`. \n @dev Only the Governor can call this function. \n @param superFactory The core factory (e.g. PoolFactory, LoanFactory).\n @param subFactory The sub factory used by core factory (e.g. LiquidityLockerFactory).\n @param valid The new validity status of `subFactory` within context of `superFactory`.\n */\n function setValidSubFactory(address superFactory, address subFactory, bool valid) external;\n\n /**\n @dev Sets the path to swap an asset through Uniswap. \n @dev Only the Governor can call this function. \n @dev Set to == mid to enable a bilateral swap (single path swap). \n @dev Set to != mid to enable a triangular swap (multi path swap). \n @param from The address of the asset being swapped.\n @param to The address of the final asset to receive.\n @param mid The intermediary asset for swaps, if any.\n */\n function setDefaultUniswapPath(address from, address to, address mid) external;\n\n /**\n @dev Sets the validity of a Pool Delegate (those allowed to create Pools). \n @dev Only the Governor can call this function. \n @dev It emits a `PoolDelegateSet` event. \n @param poolDelegate The address to manage permissions for.\n @param valid The new validity status of a Pool Delegate.\n */\n function setPoolDelegateAllowlist(address poolDelegate, bool valid) external;\n\n /**\n @dev Sets the validity of an asset for collateral. \n @dev Only the Governor can call this function. \n @dev It emits a `CollateralAssetSet` event. \n @param asset The asset to assign validity to.\n @param valid The new validity status of a Collateral Asset.\n */\n function setCollateralAsset(address asset, bool valid) external;\n\n /**\n @dev Sets the validity of an asset for liquidity in Pools. \n @dev Only the Governor can call this function. \n @dev It emits a `LiquidityAssetSet` event. \n @param asset The asset to assign validity to.\n @param valid The new validity status a Liquidity Asset in Pools.\n */\n function setLiquidityAsset(address asset, bool valid) external;\n\n /**\n @dev Sets the validity of a calculator contract. \n @dev Only the Governor can call this function. \n @param calc The Calculator address.\n @param valid The new validity status of a Calculator.\n */\n function setCalc(address calc, bool valid) external;\n\n /**\n @dev Sets the investor fee (in basis points). \n @dev Only the Governor can call this function. \n @dev It emits a `GlobalsParamSet` event. \n @param _fee The fee, e.g., 50 = 0.50%.\n */\n function setInvestorFee(uint256 _fee) external;\n\n /**\n @dev Sets the treasury fee (in basis points). \n @dev Only the Governor can call this function. \n @dev It emits a `GlobalsParamSet` event. \n @param _fee The fee, e.g., 50 = 0.50%.\n */\n function setTreasuryFee(uint256 _fee) external;\n\n /**\n @dev Sets the MapleTreasury. \n @dev Only the Governor can call this function. \n @dev It emits a `GlobalsParamSet` event. \n @param _mapleTreasury A new MapleTreasury address.\n */\n function setMapleTreasury(address _mapleTreasury) external;\n\n /**\n @dev Sets the default grace period. \n @dev Only the Governor can call this function. \n @dev It emits a `GlobalsParamSet` event. \n @param _defaultGracePeriod The new number of seconds to set the grace period to.\n */\n function setDefaultGracePeriod(uint256 _defaultGracePeriod) external;\n\n /**\n @dev Sets the minimum Loan equity. \n @dev Only the Governor can call this function. \n @dev It emits a `GlobalsParamSet` event. \n @param _minLoanEquity The new minimum percentage of Loan equity an account must have to trigger liquidations.\n */\n function setMinLoanEquity(uint256 _minLoanEquity) external;\n\n /**\n @dev Sets the funding period. \n @dev Only the Governor can call this function. \n @dev It emits a `GlobalsParamSet` event. \n @param _fundingPeriod The number of seconds to set the drawdown grace period to.\n */\n function setFundingPeriod(uint256 _fundingPeriod) external;\n\n /**\n @dev Sets the the minimum Pool cover required to finalize a Pool. \n @dev Only the Governor can call this function. \n @dev It emits a `GlobalsParamSet` event. \n @param amt The new minimum swap out required.\n */\n function setSwapOutRequired(uint256 amt) external;\n\n /**\n @dev Sets a price feed's oracle. \n @dev Only the Governor can call this function. \n @dev It emits a `OracleSet` event. \n @param asset The asset to update price for.\n @param oracle The new Oracle to use for the price of `asset`.\n */\n function setPriceOracle(address asset, address oracle) external;\n\n /**\n @dev Sets a new Pending Governor. \n @dev This address can become Governor if they accept. \n @dev Only the Governor can call this function. \n @dev It emits a `PendingGovernorSet` event. \n @param _pendingGovernor The address of a new Pending Governor.\n */\n function setPendingGovernor(address _pendingGovernor) external;\n\n /**\n @dev Accept the Governor position. \n @dev Only the Pending Governor can call this function. \n @dev It emits a `GovernorAccepted` event. \n */\n function acceptGovernor() external;\n\n /**\n @dev Fetch price for asset from Chainlink oracles.\n @param asset The asset to fetch the price of.\n @return The price of asset in USD.\n */\n function getLatestPrice(address asset) external view returns (uint256);\n\n /**\n @dev Checks that a `subFactory` is valid as it relates to `superFactory`.\n @param superFactory The core factory (e.g. PoolFactory, LoanFactory).\n @param subFactory The sub factory used by core factory (e.g. LiquidityLockerFactory).\n @param factoryType The type expected for the subFactory. \n 0 = COLLATERAL_LOCKER_FACTORY, \n 1 = DEBT_LOCKER_FACTORY, \n 2 = FUNDING_LOCKER_FACTORY, \n 3 = LIQUIDITY_LOCKER_FACTORY, \n 4 = STAKE_LOCKER_FACTORY. \n */\n function isValidSubFactory(address superFactory, address subFactory, uint8 factoryType) external view returns (bool);\n\n /**\n @dev Checks that a Calculator is valid.\n @param calc The Calculator address.\n @param calcType The Calculator type.\n */\n function isValidCalc(address calc, uint8 calcType) external view returns (bool);\n\n /**\n @dev Returns the `lpCooldownPeriod` and `lpWithdrawWindow` as a tuple, for convenience.\n @return The value of `lpCooldownPeriod`.\n @return The value of `lpWithdrawWindow`.\n */\n function getLpCooldownParams() external view returns (uint256, uint256);\n\n}\n\n////// contracts/core/loan/v1/interfaces/ILoanFactory.sol\n/* pragma solidity 0.6.11; */\n\n/* import { IMapleGlobals } from \"../../../globals/v1/interfaces/IMapleGlobals.sol\"; */\n\n/// @title LoanFactory instantiates Loans.\ninterface ILoanFactory {\n\n /**\n @dev Emits an event indicating a LoanFactoryAdmin was allowed.\n @param loanFactoryAdmin The address of a LoanFactoryAdmin.\n @param allowed Whether `loanFactoryAdmin` is allowed as an admin of the LoanFactory.\n */\n event LoanFactoryAdminSet(address indexed loanFactoryAdmin, bool allowed);\n\n /**\n @dev Emits an event indicating a Loan was created.\n @param loan The address of the Loan.\n @param borrower The Borrower.\n @param liquidityAsset The asset the Loan will raise funding in.\n @param collateralAsset The asset the Loan will use as collateral.\n @param collateralLocker The address of the Collateral Locker.\n @param fundingLocker The address of the Funding Locker.\n @param specs The specifications for the Loan. \n [0] => apr, \n [1] => termDays, \n [2] => paymentIntervalDays, \n [3] => requestAmount, \n [4] => collateralRatio. \n @param calcs The calculators used for the Loan. \n [0] => repaymentCalc, \n [1] => lateFeeCalc, \n [2] => premiumCalc. \n @param name The name of the Loan FDTs.\n @param symbol The symbol of the Loan FDTs.\n */\n event LoanCreated(\n address loan,\n address indexed borrower,\n address indexed liquidityAsset,\n address collateralAsset,\n address collateralLocker,\n address fundingLocker,\n uint256[5] specs,\n address[3] calcs,\n string name,\n string symbol\n );\n\n /**\n @dev The Factory type of `CollateralLockerFactory`.\n */\n function CL_FACTORY() external view returns (uint8);\n\n /**\n @dev The Factory type of `FundingLockerFactory`.\n */\n function FL_FACTORY() external view returns (uint8);\n\n /**\n @dev The Calc type of `RepaymentCalc`.\n */\n function INTEREST_CALC_TYPE() external view returns (uint8);\n\n /**\n @dev The Calc type of `LateFeeCalc`.\n */\n function LATEFEE_CALC_TYPE() external view returns (uint8);\n\n /**\n @dev The Calc type of `PremiumCalc`.\n */\n function PREMIUM_CALC_TYPE() external view returns (uint8);\n\n /**\n @dev The instance of the MapleGlobals.\n */\n function globals() external view returns (IMapleGlobals);\n\n /**\n @dev The incrementor for number of Loans created.\n */\n function loansCreated() external view returns (uint256);\n\n /**\n @param index The index of a Loan.\n @return The address of the Loan at `index`.\n */\n function loans(uint256 index) external view returns (address);\n\n /**\n @param loan The address of a Loan.\n @return Whether `loan` is a Loan.\n */\n function isLoan(address loan) external view returns (bool);\n\n /**\n @param admin The address of a LoanFactoryAdmin.\n @return Whether `admin` has permission to do certain operations in case of disaster management.\n */\n function loanFactoryAdmins(address admin) external view returns (bool);\n\n /**\n @dev Sets MapleGlobals. \n @dev Only the Governor can call this function. \n @param newGlobals Address of new MapleGlobals.\n */\n function setGlobals(address newGlobals) external;\n\n /**\n @dev Create a new Loan. \n @dev It emits a `LoanCreated` event. \n @param liquidityAsset The asset the Loan will raise funding in.\n @param collateralAsset The asset the Loan will use as collateral.\n @param flFactory The factory to instantiate a FundingLocker from.\n @param clFactory The factory to instantiate a CollateralLocker from.\n @param specs The specifications for the Loan. \n [0] => apr, \n [1] => termDays, \n [2] => paymentIntervalDays, \n [3] => requestAmount, \n [4] => collateralRatio. \n @param calcs The calculators used for the Loan. \n [0] => repaymentCalc, \n [1] => lateFeeCalc, \n [2] => premiumCalc. \n @return loanAddress Address of the instantiated Loan.\n */\n function createLoan(\n address liquidityAsset,\n address collateralAsset,\n address flFactory,\n address clFactory,\n uint256[5] memory specs,\n address[3] memory calcs\n ) external returns (address);\n\n /**\n @dev Sets a LoanFactory Admin. Only the Governor can call this function.\n @dev It emits a `LoanFactoryAdminSet` event.\n @param loanFactoryAdmin An address being allowed or disallowed as a LoanFactory Admin.\n @param allowed The status of `loanFactoryAdmin` as an Admin.\n */\n function setLoanFactoryAdmin(address loanFactoryAdmin, bool allowed) external;\n\n /**\n @dev Triggers paused state. \n @dev Halts functionality for certain functions. \n @dev Only the Governor or a LoanFactory Admin can call this function.\n */\n function pause() external;\n\n /**\n @dev Triggers unpaused state. \n @dev Restores functionality for certain functions. \n @dev Only the Governor or a LoanFactory Admin can call this function.\n */\n function unpause() external;\n\n}\n" } }, "settings": { "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "abi", "evm.bytecode", "evm.deployedBytecode", "evm.methodIdentifiers" ], "": [ "ast" ] } } } }, "output": { "contracts": { "contracts/core/loan/v1/interfaces/ILoanFactory.sol": { "ILoanFactory": { "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "loan", "type": "address" }, { "indexed": true, "internalType": "address", "name": "borrower", "type": "address" }, { "indexed": true, "internalType": "address", "name": "liquidityAsset", "type": "address" }, { "indexed": false, "internalType": "address", "name": "collateralAsset", "type": "address" }, { "indexed": false, "internalType": "address", "name": "collateralLocker", "type": "address" }, { "indexed": false, "internalType": "address", "name": "fundingLocker", "type": "address" }, { "indexed": false, "internalType": "uint256[5]", "name": "specs", "type": "uint256[5]" }, { "indexed": false, "internalType": "address[3]", "name": "calcs", "type": "address[3]" }, { "indexed": false, "internalType": "string", "name": "name", "type": "string" }, { "indexed": false, "internalType": "string", "name": "symbol", "type": "string" } ], "name": "LoanCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "loanFactoryAdmin", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "allowed", "type": "bool" } ], "name": "LoanFactoryAdminSet", "type": "event" }, { "inputs": [], "name": "CL_FACTORY", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "FL_FACTORY", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "INTEREST_CALC_TYPE", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "LATEFEE_CALC_TYPE", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "PREMIUM_CALC_TYPE", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "liquidityAsset", "type": "address" }, { "internalType": "address", "name": "collateralAsset", "type": "address" }, { "internalType": "address", "name": "flFactory", "type": "address" }, { "internalType": "address", "name": "clFactory", "type": "address" }, { "internalType": "uint256[5]", "name": "specs", "type": "uint256[5]" }, { "internalType": "address[3]", "name": "calcs", "type": "address[3]" } ], "name": "createLoan", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "globals", "outputs": [ { "internalType": "contract IMapleGlobals", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "loan", "type": "address" } ], "name": "isLoan", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "admin", "type": "address" } ], "name": "loanFactoryAdmins", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "index", "type": "uint256" } ], "name": "loans", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "loansCreated", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newGlobals", "type": "address" } ], "name": "setGlobals", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "loanFactoryAdmin", "type": "address" }, { "internalType": "bool", "name": "allowed", "type": "bool" } ], "name": "setLoanFactoryAdmin", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "unpause", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "evm": { "bytecode": { "linkReferences": {}, "object": "", "opcodes": "", "sourceMap": "" }, "deployedBytecode": { "immutableReferences": {}, "linkReferences": {}, "object": "", "opcodes": "", "sourceMap": "" }, "methodIdentifiers": { "CL_FACTORY()": "e70dd6cf", "FL_FACTORY()": "38505fb0", "INTEREST_CALC_TYPE()": "8c38922f", "LATEFEE_CALC_TYPE()": "3493f4ca", "PREMIUM_CALC_TYPE()": "7a8fe3c0", "createLoan(address,address,address,address,uint256[5],address[3])": "d5ab2074", "globals()": "c3124525", "isLoan(address)": "2819cbc2", "loanFactoryAdmins(address)": "a620e0ac", "loans(uint256)": "e1ec3c68", "loansCreated()": "ee9b75b5", "pause()": "8456cb59", "setGlobals(address)": "cc2e0a26", "setLoanFactoryAdmin(address,bool)": "2cd0aca0", "unpause()": "3f4ba83a" } } }, "IMapleGlobals": { "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "balancerPool", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "valid", "type": "bool" } ], "name": "BalancerPoolSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "asset", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "symbol", "type": "string" }, { "indexed": false, "internalType": "bool", "name": "valid", "type": "bool" } ], "name": "CollateralAssetSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "newGlobalAdmin", "type": "address" } ], "name": "GlobalAdminSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "bytes32", "name": "which", "type": "bytes32" }, { "indexed": false, "internalType": "address", "name": "addr", "type": "address" } ], "name": "GlobalsAddressSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "bytes32", "name": "which", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "GlobalsParamSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "governor", "type": "address" } ], "name": "GovernorAccepted", "type": "event" }, { "anonymous": false, "inputs": [], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "asset", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "symbol", "type": "string" }, { "indexed": false, "internalType": "bool", "name": "valid", "type": "bool" } ], "name": "LiquidityAssetSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "asset", "type": "address" }, { "indexed": false, "internalType": "address", "name": "oracle", "type": "address" } ], "name": "OracleSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "pendingGovernor", "type": "address" } ], "name": "PendingGovernorSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "poolDelegate", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "valid", "type": "bool" } ], "name": "PoolDelegateSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bool", "name": "pause", "type": "bool" } ], "name": "ProtocolPaused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "exemptedContract", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "valid", "type": "bool" } ], "name": "TransferRestrictionExemptionSet", "type": "event" }, { "inputs": [], "name": "acceptGovernor", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "defaultGracePeriod", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "tokenA", "type": "address" }, { "internalType": "address", "name": "tokenB", "type": "address" } ], "name": "defaultUniswapPath", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "fundingPeriod", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "asset", "type": "address" } ], "name": "getLatestPrice", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getLpCooldownParams", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "globalAdmin", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "governor", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "investorFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "balancerPool", "type": "address" } ], "name": "isValidBalancerPool", "outputs": [