Overview
ETH Balance
0 ETH
Eth Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 24 from a total of 24 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Toggle Whitelist... | 16284253 | 727 days ago | IN | 0 ETH | 0.00091558 | ||||
Toggle Whitelist... | 16264759 | 730 days ago | IN | 0 ETH | 0.00043561 | ||||
Liquidate NFT | 15076423 | 904 days ago | IN | 0 ETH | 0.00508885 | ||||
Liquidate NFT | 15070956 | 905 days ago | IN | 0 ETH | 0.00210664 | ||||
Liquidate NFT | 15070956 | 905 days ago | IN | 0 ETH | 0.00177582 | ||||
Liquidate NFT | 15070956 | 905 days ago | IN | 0 ETH | 0.00192782 | ||||
Liquidate NFT | 15070956 | 905 days ago | IN | 0 ETH | 0.00192782 | ||||
Liquidate NFT | 15070956 | 905 days ago | IN | 0 ETH | 0.00188711 | ||||
Liquidate NFT | 15070956 | 905 days ago | IN | 0 ETH | 0.00192782 | ||||
Liquidate NFT | 15070956 | 905 days ago | IN | 0 ETH | 0.00177582 | ||||
Liquidate NFT | 15070956 | 905 days ago | IN | 0 ETH | 0.00192782 | ||||
Liquidate NFT | 15070956 | 905 days ago | IN | 0 ETH | 0.00210664 | ||||
Liquidate NFT | 15053407 | 908 days ago | IN | 0 ETH | 0.00979217 | ||||
Liquidate NFT | 15013427 | 915 days ago | IN | 0 ETH | 0.00985347 | ||||
Toggle Whitelist... | 14974756 | 922 days ago | IN | 0 ETH | 0.00271016 | ||||
Liquidate NFT | 14971326 | 923 days ago | IN | 0 ETH | 0.00302667 | ||||
Toggle Whitelist... | 14920835 | 932 days ago | IN | 0 ETH | 0.00151801 | ||||
Toggle Whitelist... | 14632697 | 978 days ago | IN | 0 ETH | 0.00178968 | ||||
Toggle Whitelist... | 14632226 | 978 days ago | IN | 0 ETH | 0.00187187 | ||||
Toggle Whitelist... | 14626297 | 979 days ago | IN | 0 ETH | 0.00175484 | ||||
Withdraw ERC20 | 14609694 | 981 days ago | IN | 0 ETH | 0.00176366 | ||||
Toggle Whitelist... | 14604209 | 982 days ago | IN | 0 ETH | 0.0009542 | ||||
Toggle Whitelist... | 14604185 | 982 days ago | IN | 0 ETH | 0.00095141 | ||||
Set Fee | 14604177 | 982 days ago | IN | 0 ETH | 0.00104219 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
ControlPlane01
Compiler Version
v0.8.3+commit.8d00100c
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2022-07-01 */ // File: contracts/PineLendingLibrary.sol pragma solidity 0.8.3; library PineLendingLibrary { struct LoanTerms { uint256 loanStartBlock; uint256 loanExpireTimestamp; uint32 interestBPS1000000XBlock; uint32 maxLTVBPS; uint256 borrowedWei; uint256 returnedWei; uint256 accuredInterestWei; uint256 repaidInterestWei; address borrower; } function outstanding(LoanTerms calldata loanTerms, uint txSpeedBlocks) public view returns (uint256) { // do not lump the interest if (loanTerms.borrowedWei <= loanTerms.returnedWei) return 0; uint256 newAccuredInterestWei = ((block.number + txSpeedBlocks - loanTerms.loanStartBlock) * (loanTerms.borrowedWei - loanTerms.returnedWei) * loanTerms.interestBPS1000000XBlock) / 10000000000; return (loanTerms.borrowedWei - loanTerms.returnedWei) + (loanTerms.accuredInterestWei - loanTerms.repaidInterestWei) + newAccuredInterestWei; } function outstanding(LoanTerms calldata loanTerms) public view returns (uint256) { return outstanding(loanTerms, 0); } function nftHasLoan(LoanTerms memory loanTerms) public pure returns (bool) { return loanTerms.borrowedWei > loanTerms.returnedWei; } function isUnHealthyLoan(LoanTerms calldata loanTerms) public view returns (bool, uint32) { require(nftHasLoan(loanTerms), "nft does not have active loan"); bool isExpired = block.timestamp > loanTerms.loanExpireTimestamp && outstanding(loanTerms) > 0; return (isExpired, 0); } event LoanInitiated( address indexed user, address indexed erc721, uint256 indexed nftID, LoanTerms loan ); event LoanTermsChanged( address indexed user, address indexed erc721, uint256 indexed nftID, LoanTerms oldTerms, LoanTerms newTerms ); event Liquidation( address indexed user, address indexed erc721, uint256 indexed nftID, uint256 liquidated_at, address liquidator ); } // File: contracts/interfaces/IFlashLoanReceiver.sol pragma solidity 0.8.3; /** * @title IFlashLoanReceiver interface * @notice Interface for the Aave fee IFlashLoanReceiver. * @author Aave * @dev implement this interface to develop a flashloan-compatible flashLoanReceiver contract **/ interface IFlashLoanReceiver { function executeOperation(address _reserve, uint256 _amount, uint256 _fee, bytes calldata _params) external; } // File: contracts/interfaces/ICloneFactory02.sol pragma solidity 0.8.3; /* The MIT License (MIT) Copyright (c) 2018 Murray Software, LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ //solhint-disable max-line-length //solhint-disable no-inline-assembly interface ICloneFactory02 { function createClone(address target) external returns (address result); function targets(address target) external returns (bool result); function genuineClone(address target) external returns (bool result); function toggleWhitelistedTarget(address target) external; } // File: contracts/interfaces/IControlPlane01.sol /** * ControlPlane01.sol * Registers the current global params */ pragma solidity 0.8.3; interface IControlPlane01 { function whitelistedIntermediaries(address target) external returns (bool result); function whitelistedFactory() external returns (address result); function feeBps() external returns (uint32 result); } // File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } // File: @openzeppelin/contracts/token/ERC20/IERC20.sol pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File: @openzeppelin/contracts/utils/introspection/IERC165.sol pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: @openzeppelin/contracts/utils/introspection/ERC165.sol pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File: @openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol pragma solidity ^0.8.0; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); } // File: @openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol pragma solidity ^0.8.0; /** * @dev _Available since v3.1._ */ abstract contract ERC1155Receiver is ERC165, IERC1155Receiver { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); } } // File: @openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol pragma solidity ^0.8.0; /** * @dev _Available since v3.1._ */ contract ERC1155Holder is ERC1155Receiver { function onERC1155Received( address, address, uint256, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] memory, uint256[] memory, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155BatchReceived.selector; } } // File: @openzeppelin/contracts/token/ERC1155/IERC1155.sol pragma solidity ^0.8.0; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; } // File: @openzeppelin/contracts/token/ERC721/IERC721.sol pragma solidity ^0.8.0; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } // File: @openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File: @openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol // OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } } // File: @openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } uint256[49] private __gap; } // File: @openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { __Context_init_unchained(); } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; } // File: @openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; } // File: @openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Context_init_unchained(); __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } uint256[49] private __gap; } // File: contracts/VerifySignaturePool02.sol pragma solidity 0.8.3; /* Signature Verification How to Sign and Verify # Signing 1. Create message to sign 2. Hash the message 3. Sign the hash (off chain, keep your private key secret) # Verify 1. Recreate hash from the original message 2. Recover signer from signature and hash 3. Compare recovered signer to claimed signer */ library VerifySignaturePool02 { /* 1. Unlock MetaMask account ethereum.enable() */ /* 2. Get message hash to sign getMessageHash( 0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C, 123, "coffee and donuts", 1 ) hash = "0xcf36ac4f97dc10d91fc2cbb20d718e94a8cbfe0f82eaedc6a4aa38946fb797cd" */ function getMessageHash( address nft, uint tokenID, uint valuation, uint expireAtBlock ) public pure returns (bytes32) { return keccak256(abi.encodePacked(nft, tokenID, valuation, expireAtBlock)); } /* 3. Sign message hash # using browser account = "copy paste account of signer here" ethereum.request({ method: "personal_sign", params: [account, hash]}).then(console.log) # using web3 web3.personal.sign(hash, web3.eth.defaultAccount, console.log) Signature will be different for different accounts 0x993dab3dd91f5c6dc28e17439be475478f5635c92a56e17e82349d3fb2f166196f466c0b4e0c146f285204f0dcb13e5ae67bc33f4b888ec32dfe0a063e8f3f781b */ function getEthSignedMessageHash(bytes32 _messageHash) public pure returns (bytes32) { /* Signature is produced by signing a keccak256 hash with the following format: "\x19Ethereum Signed Message\n" + len(msg) + msg */ return keccak256( abi.encodePacked("\x19Ethereum Signed Message:\n32", _messageHash) ); } /* 4. Verify signature signer = 0xB273216C05A8c0D4F0a4Dd0d7Bae1D2EfFE636dd to = 0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C amount = 123 message = "coffee and donuts" nonce = 1 signature = 0x993dab3dd91f5c6dc28e17439be475478f5635c92a56e17e82349d3fb2f166196f466c0b4e0c146f285204f0dcb13e5ae67bc33f4b888ec32dfe0a063e8f3f781b */ function verify( address nft, uint tokenID, uint valuation, uint expireAtBlock, address _signer, bytes memory signature ) public pure returns (bool) { bytes32 messageHash = getMessageHash(nft, tokenID, valuation, expireAtBlock); bytes32 ethSignedMessageHash = getEthSignedMessageHash(messageHash); return recoverSigner(ethSignedMessageHash, signature) == _signer; } function recoverSigner(bytes32 _ethSignedMessageHash, bytes memory _signature) internal pure returns (address) { (bytes32 r, bytes32 s, uint8 v) = splitSignature(_signature); return ecrecover(_ethSignedMessageHash, v, r, s); } function splitSignature(bytes memory sig) internal pure returns ( bytes32 r, bytes32 s, uint8 v ) { require(sig.length == 65, "invalid signature length"); assembly { /* First 32 bytes stores the length of the signature add(sig, 32) = pointer of sig + 32 effectively, skips first 32 bytes of signature mload(p) loads next 32 bytes starting at the memory address p into memory */ // first 32 bytes, after the length prefix r := mload(add(sig, 32)) // second 32 bytes s := mload(add(sig, 64)) // final byte (first byte of the next 32 bytes) v := byte(0, mload(add(sig, 96))) } // implicitly return (r, s, v) } } // File: contracts/ERC721LendingPool02.sol pragma solidity 0.8.3; contract ERC721LendingPool02 is OwnableUpgradeable, IERC721Receiver, PausableUpgradeable, ReentrancyGuardUpgradeable, ERC1155Holder { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) public pure override returns (bytes4) { return bytes4( keccak256("onERC721Received(address,address,uint256,bytes)") ); } /** * Pool Constants */ address public _valuationSigner; address public _supportedCollection; address public _controlPlane; address public _fundSource; address public _supportedCurrency; struct PoolParams { uint32 interestBPS1000000XBlock; uint32 collateralFactorBPS; } mapping(uint256 => PoolParams) public durationSeconds_poolParam; mapping(uint256 => uint256) public blockLoanAmount; uint256 public blockLoanLimit; /** * Pool Setup */ function initialize( address supportedCollection, address valuationSigner, address controlPlane, address supportedCurrency, address fundSource ) public initializer { __Ownable_init(); __Pausable_init(); __ReentrancyGuard_init(); _supportedCollection = supportedCollection; _valuationSigner = valuationSigner; _controlPlane = controlPlane; _supportedCurrency = supportedCurrency; _fundSource = fundSource; blockLoanLimit = 200000000000000000000; } function setBlockLoanLimit(uint256 bll) public onlyOwner { blockLoanLimit = bll; } function setDurationParam(uint256 duration, PoolParams calldata ppm) public onlyOwner { durationSeconds_poolParam[duration] = ppm; require(durationSeconds_poolParam[0].collateralFactorBPS == 0); } function pause() public onlyOwner { _pause(); } function unpause() public onlyOwner { _unpause(); } function updateBlockLoanAmount(uint256 loanAmount) internal { blockLoanAmount[block.number] += loanAmount; require( blockLoanAmount[block.number] < blockLoanLimit, "Amount exceed block limit" ); } /** * Storage and Events */ mapping(uint256 => PineLendingLibrary.LoanTerms) public _loans; /** * Loan origination */ function flashLoan( address payable _receiver, address _reserve, uint256 _amount, bytes memory _params ) external nonReentrant { //check that the reserve has enough available liquidity uint256 availableLiquidityBefore = _reserve == address(0) ? address(this).balance : IERC20(_reserve).balanceOf(_fundSource); require( availableLiquidityBefore >= _amount, "There is not enough liquidity available to borrow" ); uint256 lenderFeeBips = durationSeconds_poolParam[0] .interestBPS1000000XBlock; //calculate amount fee uint256 amountFee = (_amount * (lenderFeeBips)) / (10000000000); //get the FlashLoanReceiver instance IFlashLoanReceiver receiver = IFlashLoanReceiver(_receiver); //transfer funds to the receiver if (_reserve == address(0)) { (bool success, ) = _receiver.call{value: _amount}(""); require(success, "Flash loan: cannot send ether"); } else { IERC20(_reserve).transferFrom(_fundSource, _receiver, _amount); } //execute action of the receiver receiver.executeOperation(_reserve, _amount, amountFee, _params); //check that the actual balance of the core contract includes the returned amount uint256 availableLiquidityAfter = _reserve == address(0) ? address(this).balance : IERC20(_reserve).balanceOf(_fundSource); require( availableLiquidityAfter == availableLiquidityBefore + (amountFee), "The actual balance of the protocol is inconsistent" ); } function borrow( uint256[5] calldata x, bytes memory signature, bool proxy, address pineWallet ) external nonReentrant whenNotPaused returns (bool) { //valuation = x[0] //nftID = x[1] //uint256 loanDurationSeconds = x[2]; //uint256 expireAtBlock = x[3]; //uint256 borrowedAmount = x[4]; require( VerifySignaturePool02.verify( _supportedCollection, x[1], x[0], x[3], _valuationSigner, signature ), "SignatureVerifier: fake valuation provided!" ); require( IControlPlane01(_controlPlane).whitelistedIntermediaries( msg.sender ) || msg.sender == tx.origin, "Phishing!" ); address contextUser = proxy ? tx.origin : msg.sender; require( !PineLendingLibrary.nftHasLoan(_loans[x[1]]), "NFT already has loan!" ); uint32 maxLTVBPS = durationSeconds_poolParam[x[2]].collateralFactorBPS; require(maxLTVBPS > 0, "Duration not supported"); uint256 pineMirrorID = uint256( keccak256(abi.encodePacked(_supportedCollection, x[1])) ); if (pineWallet == (address(0))) { require( IERC721(_supportedCollection).ownerOf(x[1]) == contextUser, "Stealer1!" ); } else { require( ICloneFactory02( IControlPlane01(_controlPlane).whitelistedFactory() ).genuineClone(pineWallet), "Scammer!" ); require( IERC721(pineWallet).ownerOf(pineMirrorID) == contextUser, "Stealer2!" ); } require(block.number < x[3], "Valuation expired"); require( x[4] <= (x[0] * maxLTVBPS) / 10_000, "Can't borrow more than max LTV" ); require( x[4] < IERC20(_supportedCurrency).balanceOf(_fundSource), "not enough money" ); uint32 protocolFeeBips = IControlPlane01(_controlPlane).feeBps(); uint256 protocolFee = (x[4] * (protocolFeeBips)) / (10000); updateBlockLoanAmount(x[4]); IERC20(_supportedCurrency).transferFrom( _fundSource, msg.sender, x[4] - protocolFee ); IERC20(_supportedCurrency).transferFrom( _fundSource, _controlPlane, protocolFee ); _loans[x[1]] = PineLendingLibrary.LoanTerms( block.number, block.timestamp + x[2], durationSeconds_poolParam[x[2]].interestBPS1000000XBlock, maxLTVBPS, x[4], 0, 0, 0, contextUser ); if (pineWallet == (address(0))) { IERC721(_supportedCollection).transferFrom( contextUser, address(this), x[1] ); } else { IERC721(pineWallet).transferFrom( contextUser, address(this), pineMirrorID ); } emit PineLendingLibrary.LoanInitiated( contextUser, _supportedCollection, x[1], _loans[x[1]] ); return true; } /** * Repay */ // repay change loan terms, renew loan start, fix interest to borrowed amount, dont renew loan expiry function repay( uint256 nftID, uint256 repayAmount, address pineWallet ) external nonReentrant whenNotPaused returns (bool) { uint256 pineMirrorID = uint256( keccak256(abi.encodePacked(_supportedCollection, nftID)) ); require( PineLendingLibrary.nftHasLoan(_loans[nftID]), "NFT does not have active loan" ); require( IERC20(_supportedCurrency).transferFrom( msg.sender, address(this), repayAmount ), "fund transfer unsuccessful" ); PineLendingLibrary.LoanTerms memory oldLoanTerms = _loans[nftID]; if (repayAmount >= PineLendingLibrary.outstanding(_loans[nftID])) { require( IERC20(_supportedCurrency).transfer( msg.sender, repayAmount - PineLendingLibrary.outstanding(_loans[nftID]) ), "exceed amount transfer unsuccessful" ); repayAmount = PineLendingLibrary.outstanding(_loans[nftID]); _loans[nftID].returnedWei = _loans[nftID].borrowedWei; if (pineWallet == address(0)) { IERC721(_supportedCollection).transferFrom( address(this), _loans[nftID].borrower, nftID ); } else { require( ICloneFactory02( IControlPlane01(_controlPlane).whitelistedFactory() ).genuineClone(pineWallet), "Scammer!" ); IERC721(pineWallet).transferFrom( address(this), _loans[nftID].borrower, pineMirrorID ); } clearLoanTerms(nftID); } else { // lump in interest _loans[nftID].accuredInterestWei += ((block.number - _loans[nftID].loanStartBlock) * (_loans[nftID].borrowedWei - _loans[nftID].returnedWei) * _loans[nftID].interestBPS1000000XBlock) / 10000000000; uint256 outstandingInterest = _loans[nftID].accuredInterestWei - _loans[nftID].repaidInterestWei; if (repayAmount > outstandingInterest) { _loans[nftID].repaidInterestWei = _loans[nftID] .accuredInterestWei; _loans[nftID].returnedWei += (repayAmount - outstandingInterest); } else { _loans[nftID].repaidInterestWei += repayAmount; } // restart interest calculation _loans[nftID].loanStartBlock = block.number; } require( IERC20(_supportedCurrency).transferFrom( address(this), _fundSource, IERC20(_supportedCurrency).balanceOf(address(this)) ), "fund transfer unsuccessful" ); emit PineLendingLibrary.LoanTermsChanged( _loans[nftID].borrower, _supportedCollection, nftID, oldLoanTerms, _loans[nftID] ); return true; } /** * Admin functions */ function withdraw(uint256 amount) external onlyOwner { (bool success, ) = owner().call{value: amount}(""); require(success, "cannot send ether"); } function withdrawERC20(address currency, uint256 amount) external onlyOwner { IERC20(currency).transfer(owner(), amount); } function withdrawERC1155(address currency, uint256 id, uint256 amount) external onlyOwner { IERC1155(currency).safeTransferFrom(address(this), owner(), id, amount, ""); } function withdrawERC721( address collection, uint256 nftID, address target, bool liquidation ) external { require(msg.sender == _controlPlane, "not control plane"); if ((target == _supportedCollection) && liquidation) { PineLendingLibrary.LoanTerms memory lt = _loans[nftID]; emit PineLendingLibrary.Liquidation( lt.borrower, _supportedCollection, nftID, block.timestamp, tx.origin ); clearLoanTerms(nftID); } IERC721(collection).transferFrom(address(this), target, nftID); } function clearLoanTerms(uint256 nftID) internal { _loans[nftID] = PineLendingLibrary.LoanTerms( 0, 0, 0, 0, 0, 0, 0, 0, address(0) ); } } // File: @openzeppelin/contracts/utils/Context.sol pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File: @openzeppelin/contracts/access/Ownable.sol pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File: contracts/CloneFactory02.sol pragma solidity 0.8.3; /* The MIT License (MIT) Copyright (c) 2018 Murray Software, LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ //solhint-disable max-line-length //solhint-disable no-inline-assembly contract CloneFactory02 is Ownable { mapping (address => bool) public targets; mapping (address => bool) public genuineClone; event Cloned( address indexed target, address result ); function createClone(address target) public returns (address result) { require(targets[target]); bytes20 targetBytes = bytes20(target); assembly { let clone := mload(0x40) mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(clone, 0x14), targetBytes) mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) result := create(0, clone, 0x37) } genuineClone[result] = true; emit Cloned(target, result); } function toggleWhitelistedTarget(address target) public onlyOwner { targets[target] = !targets[target]; } } // File: contracts/ControlPlane01.sol /** * ControlPlane01.sol * Registers the current global params */ pragma solidity 0.8.3; contract ControlPlane01 is Ownable { mapping (address => bool) public whitelistedIntermediaries; address public whitelistedFactory; uint32 public feeBps = 0; uint constant PRECISION = 1000000000000; function toggleWhitelistedIntermediaries(address target) external onlyOwner { whitelistedIntermediaries[target] = !whitelistedIntermediaries[target]; } function setWhitelistedFactory(address target) external onlyOwner { whitelistedFactory = target; } function setFee(uint32 f) external onlyOwner { feeBps = f; } function ceil(uint a, uint m) public pure returns (uint ) { return ((a + m - 1) / m) * m; } function outstanding(PineLendingLibrary.LoanTerms calldata loanTerms, uint txSpeedBlocks) external view returns (uint256) { uint adjustedO = PineLendingLibrary.outstanding(loanTerms, txSpeedBlocks); uint ogO = PineLendingLibrary.outstanding(loanTerms); if (adjustedO != ogO) { return ceil(adjustedO, PRECISION); } else { return ogO; } } function outstanding(PineLendingLibrary.LoanTerms calldata loanTerms) external view returns (uint256) { return PineLendingLibrary.outstanding(loanTerms); } function withdraw(uint256 amount) external onlyOwner { (bool success, ) = owner().call{value: amount}(""); require(success, "cannot send ether"); } function withdrawERC20(address currency, uint256 amount) external onlyOwner { IERC20(currency).transfer(owner(), amount); } // function callLoan() public { // } function liquidateNFT(address payable target, uint256 loanID) external { ERC721LendingPool02 pool = ERC721LendingPool02(target); // TODO: check unhealthy (uint256 a, uint256 b, uint32 c, , uint256 e, uint256 f, uint256 g, uint256 h, ) = pool._loans(loanID); PineLendingLibrary.LoanTerms memory lt = PineLendingLibrary.LoanTerms(a,b,c,0,e,f,g,h,address(0)); (bool unhealthy, ) = PineLendingLibrary.isUnHealthyLoan(lt); require(unhealthy, "Loan is not liquidable"); require((pool.owner() == msg.sender), "wrong operator"); pool.withdrawERC721(pool._supportedCollection(), loanID, pool.owner(), true); } function withdrawNFT(address payable target, address nft, uint256 id) external { ERC721LendingPool02 pool = ERC721LendingPool02(target); // TODO: check unhealthy (uint256 a, uint256 b, uint32 c, , uint256 e, uint256 f, uint256 g, uint256 h, ) = pool._loans(id); PineLendingLibrary.LoanTerms memory lt = PineLendingLibrary.LoanTerms(a,b,c,0,e,f,g,h,address(0)); (bool has) = PineLendingLibrary.nftHasLoan(lt); require(!has, "Loan is active"); require((pool.owner() == msg.sender), "wrong operator"); pool.withdrawERC721(nft, id, pool.owner(), false); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"m","type":"uint256"}],"name":"ceil","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"feeBps","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"target","type":"address"},{"internalType":"uint256","name":"loanID","type":"uint256"}],"name":"liquidateNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"loanStartBlock","type":"uint256"},{"internalType":"uint256","name":"loanExpireTimestamp","type":"uint256"},{"internalType":"uint32","name":"interestBPS1000000XBlock","type":"uint32"},{"internalType":"uint32","name":"maxLTVBPS","type":"uint32"},{"internalType":"uint256","name":"borrowedWei","type":"uint256"},{"internalType":"uint256","name":"returnedWei","type":"uint256"},{"internalType":"uint256","name":"accuredInterestWei","type":"uint256"},{"internalType":"uint256","name":"repaidInterestWei","type":"uint256"},{"internalType":"address","name":"borrower","type":"address"}],"internalType":"struct PineLendingLibrary.LoanTerms","name":"loanTerms","type":"tuple"},{"internalType":"uint256","name":"txSpeedBlocks","type":"uint256"}],"name":"outstanding","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"loanStartBlock","type":"uint256"},{"internalType":"uint256","name":"loanExpireTimestamp","type":"uint256"},{"internalType":"uint32","name":"interestBPS1000000XBlock","type":"uint32"},{"internalType":"uint32","name":"maxLTVBPS","type":"uint32"},{"internalType":"uint256","name":"borrowedWei","type":"uint256"},{"internalType":"uint256","name":"returnedWei","type":"uint256"},{"internalType":"uint256","name":"accuredInterestWei","type":"uint256"},{"internalType":"uint256","name":"repaidInterestWei","type":"uint256"},{"internalType":"address","name":"borrower","type":"address"}],"internalType":"struct PineLendingLibrary.LoanTerms","name":"loanTerms","type":"tuple"}],"name":"outstanding","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"f","type":"uint32"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"setWhitelistedFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"toggleWhitelistedIntermediaries","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistedFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedIntermediaries","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"target","type":"address"},{"internalType":"address","name":"nft","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"withdrawNFT","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526002805463ffffffff60a01b1916905534801561002057600080fd5b5061002a3361002f565b61007f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6114768061008e6000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063e59694e711610066578063e59694e71461021e578063ee5ea74b14610231578063f2fde38b14610264578063fc3380971461027757610100565b80638da5cb5b146101c0578063a1db9782146101e5578063bff863ec146101f8578063c215dbf41461020b57610100565b80633a7b7356116100d35780633a7b73561461017f578063715018a6146101925780638587be6e1461019a57806389fb05ab146101ad57610100565b80630242958e146101055780631ab971ab1461012b57806324a9d853146101405780632e1a7d4d1461016c575b600080fd5b61011861011336600461110f565b61028a565b6040519081526020015b60405180910390f35b61013e610139366004611214565b6103d4565b005b60025461015790600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610122565b61013e61017a36600461113b565b61042d565b61013e61018d366004611078565b6104f2565b61013e6108ef565b6101186101a836600461116b565b610925565b61013e6101bb366004611000565b61095a565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610122565b61013e6101f3366004611078565b6109ad565b61013e610206366004611038565b610a7d565b6002546101cd906001600160a01b031681565b61011861022c3660046110f3565b610e04565b61025461023f366004611000565b60016020526000908152604090205460ff1681565b6040519015158152602001610122565b61013e610272366004611000565b610e96565b61013e610285366004611000565b610f31565b600080731a4c2ac5d97f4f4dda2b880342b298ea58f2b80863a3d24fe485856040518363ffffffff1660e01b81526004016102c69291906112fe565b60206040518083038186803b1580156102de57600080fd5b505af41580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103169190611153565b90506000731a4c2ac5d97f4f4dda2b880342b298ea58f2b80863df9a33b7866040518263ffffffff1660e01b815260040161035191906112ef565b60206040518083038186803b15801561036957600080fd5b505af415801561037d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a19190611153565b90508082146103c2576103b98264e8d4a51000610925565b925050506103ce565b91506103ce9050565b50505b92915050565b6000546001600160a01b031633146104075760405162461bcd60e51b81526004016103fe906112ba565b60405180910390fd5b6002805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b6000546001600160a01b031633146104575760405162461bcd60e51b81526004016103fe906112ba565b600080546040516001600160a01b039091169083908381818185875af1925050503d80600081146104a4576040519150601f19603f3d011682016040523d82523d6000602084013e6104a9565b606091505b50509050806104ee5760405162461bcd60e51b815260206004820152601160248201527031b0b73737ba1039b2b7321032ba3432b960791b60448201526064016103fe565b5050565b60008290506000806000806000806000876001600160a01b031663bd5c569b8a6040518263ffffffff1660e01b815260040161053091815260200190565b6101206040518083038186803b15801561054957600080fd5b505afa15801561055d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610581919061118c565b5097509750975097505096509650965060006040518061012001604052808981526020018881526020018763ffffffff168152602001600063ffffffff16815260200186815260200185815260200184815260200183815260200160006001600160a01b031681525090506000731a4c2ac5d97f4f4dda2b880342b298ea58f2b80863d359b976836040518263ffffffff1660e01b8152600401610625919061131b565b604080518083038186803b15801561063c57600080fd5b505af4158015610650573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067491906110bd565b509050806106bd5760405162461bcd60e51b81526020600482015260166024820152754c6f616e206973206e6f74206c697175696461626c6560501b60448201526064016103fe565b336001600160a01b03168a6001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561070057600080fd5b505afa158015610714573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610738919061101c565b6001600160a01b03161461077f5760405162461bcd60e51b815260206004820152600e60248201526d3bb937b7339037b832b930ba37b960911b60448201526064016103fe565b896001600160a01b031663d7087bc18b6001600160a01b03166394bfd7b06040518163ffffffff1660e01b815260040160206040518083038186803b1580156107c757600080fd5b505afa1580156107db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ff919061101c565b8d8d6001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561083957600080fd5b505afa15801561084d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610871919061101c565b60405160e085901b6001600160e01b03191681526001600160a01b0393841660048201526024810192909252909116604482015260016064820152608401600060405180830381600087803b1580156108c957600080fd5b505af11580156108dd573d6000803e3d6000fd5b50505050505050505050505050505050565b6000546001600160a01b031633146109195760405162461bcd60e51b81526004016103fe906112ba565b6109236000610f7d565b565b6000818060016109358287611395565b61093f91906113ec565b61094991906113ad565b61095391906113cd565b9392505050565b6000546001600160a01b031633146109845760405162461bcd60e51b81526004016103fe906112ba565b6001600160a01b03166000908152600160205260409020805460ff19811660ff90911615179055565b6000546001600160a01b031633146109d75760405162461bcd60e51b81526004016103fe906112ba565b816001600160a01b031663a9059cbb6109f86000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b158015610a4057600080fd5b505af1158015610a54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7891906110a3565b505050565b60008390506000806000806000806000876001600160a01b031663bd5c569b8a6040518263ffffffff1660e01b8152600401610abb91815260200190565b6101206040518083038186803b158015610ad457600080fd5b505afa158015610ae8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0c919061118c565b5097509750975097505096509650965060006040518061012001604052808981526020018881526020018763ffffffff168152602001600063ffffffff16815260200186815260200185815260200184815260200183815260200160006001600160a01b031681525090506000731a4c2ac5d97f4f4dda2b880342b298ea58f2b80863d4d30063836040518263ffffffff1660e01b8152600401610bb0919061131b565b60206040518083038186803b158015610bc857600080fd5b505af4158015610bdc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0091906110a3565b90508015610c415760405162461bcd60e51b815260206004820152600e60248201526d4c6f616e2069732061637469766560901b60448201526064016103fe565b336001600160a01b03168a6001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8457600080fd5b505afa158015610c98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbc919061101c565b6001600160a01b031614610d035760405162461bcd60e51b815260206004820152600e60248201526d3bb937b7339037b832b930ba37b960911b60448201526064016103fe565b896001600160a01b031663d7087bc18d8d8d6001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4d57600080fd5b505afa158015610d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d85919061101c565b60405160e085901b6001600160e01b03191681526001600160a01b0393841660048201526024810192909252909116604482015260006064820152608401600060405180830381600087803b158015610ddd57600080fd5b505af1158015610df1573d6000803e3d6000fd5b5050505050505050505050505050505050565b60405163df9a33b760e01b8152600090731a4c2ac5d97f4f4dda2b880342b298ea58f2b8089063df9a33b790610e3e9085906004016112ef565b60206040518083038186803b158015610e5657600080fd5b505af4158015610e6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8e9190611153565b90505b919050565b6000546001600160a01b03163314610ec05760405162461bcd60e51b81526004016103fe906112ba565b6001600160a01b038116610f255760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103fe565b610f2e81610f7d565b50565b6000546001600160a01b03163314610f5b5760405162461bcd60e51b81526004016103fe906112ba565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8035610e9181611419565b80518015158114610e9157600080fd5b60006101208284031215610ffa578081fd5b50919050565b600060208284031215611011578081fd5b813561095381611419565b60006020828403121561102d578081fd5b815161095381611419565b60008060006060848603121561104c578182fd5b833561105781611419565b9250602084013561106781611419565b929592945050506040919091013590565b6000806040838503121561108a578182fd5b823561109581611419565b946020939093013593505050565b6000602082840312156110b4578081fd5b61095382610fd8565b600080604083850312156110cf578182fd5b6110d883610fd8565b915060208301516110e88161142e565b809150509250929050565b60006101208284031215611105578081fd5b6109538383610fe8565b6000806101408385031215611122578182fd5b61112c8484610fe8565b94610120939093013593505050565b60006020828403121561114c578081fd5b5035919050565b600060208284031215611164578081fd5b5051919050565b6000806040838503121561117d578182fd5b50508035926020909101359150565b60008060008060008060008060006101208a8c0312156111aa578485fd5b8951985060208a0151975060408a01516111c38161142e565b60608b01519097506111d48161142e565b8096505060808a0151945060a08a0151935060c08a0151925060e08a015191506101008a015161120381611419565b809150509295985092959850929598565b600060208284031215611225578081fd5b81356109538161142e565b8035825260208101356020830152604081013561124c8161142e565b63ffffffff16604083015260608101356112658161142e565b63ffffffff81166060840152506080810135608083015260a081013560a083015260c081013560c083015260e081013560e08301526101006112a8818301610fcd565b6001600160a01b031692019190915250565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b61012081016103ce8284611230565b610140810161130d8285611230565b826101208301529392505050565b6000610120820190508251825260208301516020830152604083015163ffffffff808216604085015280606086015116606085015250506080830151608083015260a083015160a083015260c083015160c083015260e083015160e0830152610100808401516103cb828501826001600160a01b03169052565b600082198211156113a8576113a8611403565b500190565b6000826113c857634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156113e7576113e7611403565b500290565b6000828210156113fe576113fe611403565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610f2e57600080fd5b63ffffffff81168114610f2e57600080fdfea2646970667358221220d794e0dfc22f328fd9f18cb71fb50e537175316cc3e8e9a080e19ab4a7ff637c64736f6c63430008030033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063e59694e711610066578063e59694e71461021e578063ee5ea74b14610231578063f2fde38b14610264578063fc3380971461027757610100565b80638da5cb5b146101c0578063a1db9782146101e5578063bff863ec146101f8578063c215dbf41461020b57610100565b80633a7b7356116100d35780633a7b73561461017f578063715018a6146101925780638587be6e1461019a57806389fb05ab146101ad57610100565b80630242958e146101055780631ab971ab1461012b57806324a9d853146101405780632e1a7d4d1461016c575b600080fd5b61011861011336600461110f565b61028a565b6040519081526020015b60405180910390f35b61013e610139366004611214565b6103d4565b005b60025461015790600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610122565b61013e61017a36600461113b565b61042d565b61013e61018d366004611078565b6104f2565b61013e6108ef565b6101186101a836600461116b565b610925565b61013e6101bb366004611000565b61095a565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610122565b61013e6101f3366004611078565b6109ad565b61013e610206366004611038565b610a7d565b6002546101cd906001600160a01b031681565b61011861022c3660046110f3565b610e04565b61025461023f366004611000565b60016020526000908152604090205460ff1681565b6040519015158152602001610122565b61013e610272366004611000565b610e96565b61013e610285366004611000565b610f31565b600080731a4c2ac5d97f4f4dda2b880342b298ea58f2b80863a3d24fe485856040518363ffffffff1660e01b81526004016102c69291906112fe565b60206040518083038186803b1580156102de57600080fd5b505af41580156102f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103169190611153565b90506000731a4c2ac5d97f4f4dda2b880342b298ea58f2b80863df9a33b7866040518263ffffffff1660e01b815260040161035191906112ef565b60206040518083038186803b15801561036957600080fd5b505af415801561037d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a19190611153565b90508082146103c2576103b98264e8d4a51000610925565b925050506103ce565b91506103ce9050565b50505b92915050565b6000546001600160a01b031633146104075760405162461bcd60e51b81526004016103fe906112ba565b60405180910390fd5b6002805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b6000546001600160a01b031633146104575760405162461bcd60e51b81526004016103fe906112ba565b600080546040516001600160a01b039091169083908381818185875af1925050503d80600081146104a4576040519150601f19603f3d011682016040523d82523d6000602084013e6104a9565b606091505b50509050806104ee5760405162461bcd60e51b815260206004820152601160248201527031b0b73737ba1039b2b7321032ba3432b960791b60448201526064016103fe565b5050565b60008290506000806000806000806000876001600160a01b031663bd5c569b8a6040518263ffffffff1660e01b815260040161053091815260200190565b6101206040518083038186803b15801561054957600080fd5b505afa15801561055d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610581919061118c565b5097509750975097505096509650965060006040518061012001604052808981526020018881526020018763ffffffff168152602001600063ffffffff16815260200186815260200185815260200184815260200183815260200160006001600160a01b031681525090506000731a4c2ac5d97f4f4dda2b880342b298ea58f2b80863d359b976836040518263ffffffff1660e01b8152600401610625919061131b565b604080518083038186803b15801561063c57600080fd5b505af4158015610650573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067491906110bd565b509050806106bd5760405162461bcd60e51b81526020600482015260166024820152754c6f616e206973206e6f74206c697175696461626c6560501b60448201526064016103fe565b336001600160a01b03168a6001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561070057600080fd5b505afa158015610714573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610738919061101c565b6001600160a01b03161461077f5760405162461bcd60e51b815260206004820152600e60248201526d3bb937b7339037b832b930ba37b960911b60448201526064016103fe565b896001600160a01b031663d7087bc18b6001600160a01b03166394bfd7b06040518163ffffffff1660e01b815260040160206040518083038186803b1580156107c757600080fd5b505afa1580156107db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ff919061101c565b8d8d6001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561083957600080fd5b505afa15801561084d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610871919061101c565b60405160e085901b6001600160e01b03191681526001600160a01b0393841660048201526024810192909252909116604482015260016064820152608401600060405180830381600087803b1580156108c957600080fd5b505af11580156108dd573d6000803e3d6000fd5b50505050505050505050505050505050565b6000546001600160a01b031633146109195760405162461bcd60e51b81526004016103fe906112ba565b6109236000610f7d565b565b6000818060016109358287611395565b61093f91906113ec565b61094991906113ad565b61095391906113cd565b9392505050565b6000546001600160a01b031633146109845760405162461bcd60e51b81526004016103fe906112ba565b6001600160a01b03166000908152600160205260409020805460ff19811660ff90911615179055565b6000546001600160a01b031633146109d75760405162461bcd60e51b81526004016103fe906112ba565b816001600160a01b031663a9059cbb6109f86000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b158015610a4057600080fd5b505af1158015610a54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7891906110a3565b505050565b60008390506000806000806000806000876001600160a01b031663bd5c569b8a6040518263ffffffff1660e01b8152600401610abb91815260200190565b6101206040518083038186803b158015610ad457600080fd5b505afa158015610ae8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0c919061118c565b5097509750975097505096509650965060006040518061012001604052808981526020018881526020018763ffffffff168152602001600063ffffffff16815260200186815260200185815260200184815260200183815260200160006001600160a01b031681525090506000731a4c2ac5d97f4f4dda2b880342b298ea58f2b80863d4d30063836040518263ffffffff1660e01b8152600401610bb0919061131b565b60206040518083038186803b158015610bc857600080fd5b505af4158015610bdc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0091906110a3565b90508015610c415760405162461bcd60e51b815260206004820152600e60248201526d4c6f616e2069732061637469766560901b60448201526064016103fe565b336001600160a01b03168a6001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8457600080fd5b505afa158015610c98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbc919061101c565b6001600160a01b031614610d035760405162461bcd60e51b815260206004820152600e60248201526d3bb937b7339037b832b930ba37b960911b60448201526064016103fe565b896001600160a01b031663d7087bc18d8d8d6001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4d57600080fd5b505afa158015610d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d85919061101c565b60405160e085901b6001600160e01b03191681526001600160a01b0393841660048201526024810192909252909116604482015260006064820152608401600060405180830381600087803b158015610ddd57600080fd5b505af1158015610df1573d6000803e3d6000fd5b5050505050505050505050505050505050565b60405163df9a33b760e01b8152600090731a4c2ac5d97f4f4dda2b880342b298ea58f2b8089063df9a33b790610e3e9085906004016112ef565b60206040518083038186803b158015610e5657600080fd5b505af4158015610e6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8e9190611153565b90505b919050565b6000546001600160a01b03163314610ec05760405162461bcd60e51b81526004016103fe906112ba565b6001600160a01b038116610f255760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103fe565b610f2e81610f7d565b50565b6000546001600160a01b03163314610f5b5760405162461bcd60e51b81526004016103fe906112ba565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8035610e9181611419565b80518015158114610e9157600080fd5b60006101208284031215610ffa578081fd5b50919050565b600060208284031215611011578081fd5b813561095381611419565b60006020828403121561102d578081fd5b815161095381611419565b60008060006060848603121561104c578182fd5b833561105781611419565b9250602084013561106781611419565b929592945050506040919091013590565b6000806040838503121561108a578182fd5b823561109581611419565b946020939093013593505050565b6000602082840312156110b4578081fd5b61095382610fd8565b600080604083850312156110cf578182fd5b6110d883610fd8565b915060208301516110e88161142e565b809150509250929050565b60006101208284031215611105578081fd5b6109538383610fe8565b6000806101408385031215611122578182fd5b61112c8484610fe8565b94610120939093013593505050565b60006020828403121561114c578081fd5b5035919050565b600060208284031215611164578081fd5b5051919050565b6000806040838503121561117d578182fd5b50508035926020909101359150565b60008060008060008060008060006101208a8c0312156111aa578485fd5b8951985060208a0151975060408a01516111c38161142e565b60608b01519097506111d48161142e565b8096505060808a0151945060a08a0151935060c08a0151925060e08a015191506101008a015161120381611419565b809150509295985092959850929598565b600060208284031215611225578081fd5b81356109538161142e565b8035825260208101356020830152604081013561124c8161142e565b63ffffffff16604083015260608101356112658161142e565b63ffffffff81166060840152506080810135608083015260a081013560a083015260c081013560c083015260e081013560e08301526101006112a8818301610fcd565b6001600160a01b031692019190915250565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b61012081016103ce8284611230565b610140810161130d8285611230565b826101208301529392505050565b6000610120820190508251825260208301516020830152604083015163ffffffff808216604085015280606086015116606085015250506080830151608083015260a083015160a083015260c083015160c083015260e083015160e0830152610100808401516103cb828501826001600160a01b03169052565b600082198211156113a8576113a8611403565b500190565b6000826113c857634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156113e7576113e7611403565b500290565b6000828210156113fe576113fe611403565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610f2e57600080fd5b63ffffffff81168114610f2e57600080fdfea2646970667358221220d794e0dfc22f328fd9f18cb71fb50e537175316cc3e8e9a080e19ab4a7ff637c64736f6c63430008030033
Deployed Bytecode Sourcemap
65354:2919:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66030:378;;;;;;:::i;:::-;;:::i;:::-;;;11381:25:1;;;11369:2;11354:18;66030:378:0;;;;;;;;65847:68;;;;;;:::i;:::-;;:::i;:::-;;65495:24;;;;;-1:-1:-1;;;65495:24:0;;;;;;;;;11591:10:1;11579:23;;;11561:42;;11549:2;11534:18;65495:24:0;11516:93:1;66583:170:0;;;;;;:::i;:::-;;:::i;66947:683::-;;;;;;:::i;:::-;;:::i;62427:94::-;;;:::i;65921:101::-;;;;;;:::i;:::-;;:::i;65570:159::-;;;;;;:::i;:::-;;:::i;61776:87::-;61822:7;61849:6;-1:-1:-1;;;;;61849:6:0;61776:87;;;-1:-1:-1;;;;;6571:32:1;;;6553:51;;6541:2;6526:18;61776:87:0;6508:102:1;66759:133:0;;;;;;:::i;:::-;;:::i;67636:634::-;;;;;;:::i;:::-;;:::i;65457:33::-;;;;;-1:-1:-1;;;;;65457:33:0;;;66414:163;;;;;;:::i;:::-;;:::i;65394:58::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;7521:14:1;;7514:22;7496:41;;7484:2;7469:18;65394:58:0;7451:92:1;62676:192:0;;;;;;:::i;:::-;;:::i;65735:106::-;;;;;;:::i;:::-;;:::i;66030:378::-;66143:7;66159:14;66176:18;:30;66207:9;66218:13;66176:56;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;66159:73;;66239:8;66250:18;:30;66281:9;66250:41;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;66239:52;;66315:3;66302:9;:16;66298:105;;66336:26;66341:9;65550:13;66336:4;:26::i;:::-;66329:33;;;;;;66298:105;66392:3;-1:-1:-1;66385:10:0;;-1:-1:-1;66385:10:0;66298:105;66030:378;;;;;;;:::o;65847:68::-;61822:7;61849:6;-1:-1:-1;;;;;61849:6:0;60644:10;61996:23;61988:68;;;;-1:-1:-1;;;61988:68:0;;;;;;;:::i;:::-;;;;;;;;;65899:6:::1;:10:::0;;::::1;::::0;;::::1;-1:-1:-1::0;;;65899:10:0::1;-1:-1:-1::0;;;;65899:10:0;;::::1;::::0;;;::::1;::::0;;65847:68::o;66583:170::-;61822:7;61849:6;-1:-1:-1;;;;;61849:6:0;60644:10;61996:23;61988:68;;;;-1:-1:-1;;;61988:68:0;;;;;;;:::i;:::-;66648:12:::1;61849:6:::0;;66666:31:::1;::::0;-1:-1:-1;;;;;61849:6:0;;;;66686;;66648:12;66666:31;66648:12;66666:31;66686:6;61849;66666:31:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66647:50;;;66716:7;66708:37;;;::::0;-1:-1:-1;;;66708:37:0;;8851:2:1;66708:37:0::1;::::0;::::1;8833:21:1::0;8890:2;8870:18;;;8863:30;-1:-1:-1;;;8909:18:1;;;8902:47;8966:18;;66708:37:0::1;8823:167:1::0;66708:37:0::1;62067:1;66583:170:::0;:::o;66947:683::-;67025:24;67072:6;67025:54;;67117:9;67133;67149:8;67171:9;67187;67203;67219;67239:4;-1:-1:-1;;;;;67239:11:0;;67251:6;67239:19;;;;;;;;;;;;;11381:25:1;;11369:2;11354:18;;11336:76;67239:19:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;67116:142;;;;;;;;;;;;;;;;67265:38;67306:56;;;;;;;;67335:1;67306:56;;;;67337:1;67306:56;;;;67339:1;67306:56;;;;;;67341:1;67306:56;;;;;;67343:1;67306:56;;;;67345:1;67306:56;;;;67347:1;67306:56;;;;67349:1;67306:56;;;;67359:1;-1:-1:-1;;;;;67306:56:0;;;;67265:97;;67370:14;67390:18;:34;67425:2;67390:38;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;67369:59;;;67443:9;67435:44;;;;-1:-1:-1;;;67435:44:0;;8500:2:1;67435:44:0;;;8482:21:1;8539:2;8519:18;;;8512:30;-1:-1:-1;;;8558:18:1;;;8551:52;8620:18;;67435:44:0;8472:172:1;67435:44:0;67511:10;-1:-1:-1;;;;;67495:26:0;:4;-1:-1:-1;;;;;67495:10:0;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;67495:26:0;;67486:55;;;;-1:-1:-1;;;67486:55:0;;7750:2:1;67486:55:0;;;7732:21:1;7789:2;7769:18;;;7762:30;-1:-1:-1;;;7808:18:1;;;7801:44;7862:18;;67486:55:0;7722:164:1;67486:55:0;67548:4;-1:-1:-1;;;;;67548:19:0;;67568:4;-1:-1:-1;;;;;67568:25:0;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;67597:6;67605:4;-1:-1:-1;;;;;67605:10:0;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;67548:76;;;;;;-1:-1:-1;;;;;;67548:76:0;;;-1:-1:-1;;;;;7175:15:1;;;67548:76:0;;;7157:34:1;7207:18;;;7200:34;;;;7270:15;;;7250:18;;;7243:43;67619:4:0;7302:18:1;;;7295:50;7091:19;;67548:76:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66947:683;;;;;;;;;;;;:::o;62427:94::-;61822:7;61849:6;-1:-1:-1;;;;;61849:6:0;60644:10;61996:23;61988:68;;;;-1:-1:-1;;;61988:68:0;;;;;;;:::i;:::-;62492:21:::1;62510:1;62492:9;:21::i;:::-;62427:94::o:0;65921:101::-;65972:4;66015:1;;66005;65997:5;66015:1;65997;:5;:::i;:::-;:9;;;;:::i;:::-;65996:15;;;;:::i;:::-;65995:21;;;;:::i;:::-;65988:28;65921:101;-1:-1:-1;;;65921:101:0:o;65570:159::-;61822:7;61849:6;-1:-1:-1;;;;;61849:6:0;60644:10;61996:23;61988:68;;;;-1:-1:-1;;;61988:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;65690:33:0::1;;::::0;;;:25:::1;:33;::::0;;;;;;-1:-1:-1;;65653:70:0;::::1;65690:33;::::0;;::::1;65689:34;65653:70;::::0;;65570:159::o;66759:133::-;61822:7;61849:6;-1:-1:-1;;;;;61849:6:0;60644:10;61996:23;61988:68;;;;-1:-1:-1;;;61988:68:0;;;;;;;:::i;:::-;66851:8:::1;-1:-1:-1::0;;;;;66844:25:0::1;;66870:7;61822::::0;61849:6;-1:-1:-1;;;;;61849:6:0;61776:87;;66870:7:::1;66844:42;::::0;-1:-1:-1;;;;;;66844:42:0::1;::::0;;;;;;-1:-1:-1;;;;;6807:32:1;;;66844:42:0::1;::::0;::::1;6789:51:1::0;6856:18;;;6849:34;;;6762:18;;66844:42:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;66759:133:::0;;:::o;67636:634::-;67722:24;67769:6;67722:54;;67814:9;67830;67846:8;67868:9;67884;67900;67916;67936:4;-1:-1:-1;;;;;67936:11:0;;67948:2;67936:15;;;;;;;;;;;;;11381:25:1;;11369:2;11354:18;;11336:76;67936:15:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;67813:138;;;;;;;;;;;;;;;;67958:38;67999:56;;;;;;;;68028:1;67999:56;;;;68030:1;67999:56;;;;68032:1;67999:56;;;;;;68034:1;67999:56;;;;;;68036:1;67999:56;;;;68038:1;67999:56;;;;68040:1;67999:56;;;;68042:1;67999:56;;;;68052:1;-1:-1:-1;;;;;67999:56:0;;;;67958:97;;68063:8;68075:18;:29;68105:2;68075:33;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;68062:46;;68124:3;68123:4;68115:31;;;;-1:-1:-1;;;68115:31:0;;9558:2:1;68115:31:0;;;9540:21:1;9597:2;9577:18;;;9570:30;-1:-1:-1;;;9616:18:1;;;9609:44;9670:18;;68115:31:0;9530:164:1;68115:31:0;68178:10;-1:-1:-1;;;;;68162:26:0;:4;-1:-1:-1;;;;;68162:10:0;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;68162:26:0;;68153:55;;;;-1:-1:-1;;;68153:55:0;;7750:2:1;68153:55:0;;;7732:21:1;7789:2;7769:18;;;7762:30;-1:-1:-1;;;7808:18:1;;;7801:44;7862:18;;68153:55:0;7722:164:1;68153:55:0;68215:4;-1:-1:-1;;;;;68215:19:0;;68235:3;68240:2;68244:4;-1:-1:-1;;;;;68244:10:0;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;68215:49;;;;;;-1:-1:-1;;;;;;68215:49:0;;;-1:-1:-1;;;;;7175:15:1;;;68215:49:0;;;7157:34:1;7207:18;;;7200:34;;;;7270:15;;;7250:18;;;7243:43;-1:-1:-1;7302:18:1;;;7295:50;7091:19;;68215:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;67636:634;;;;;;;;;;;;;:::o;66414:163::-;66530:41;;-1:-1:-1;;;66530:41:0;;66507:7;;66530:18;;:30;;:41;;66561:9;;66530:41;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;66523:48;;66414:163;;;;:::o;62676:192::-;61822:7;61849:6;-1:-1:-1;;;;;61849:6:0;60644:10;61996:23;61988:68;;;;-1:-1:-1;;;61988:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;62765:22:0;::::1;62757:73;;;::::0;-1:-1:-1;;;62757:73:0;;8093:2:1;62757:73:0::1;::::0;::::1;8075:21:1::0;8132:2;8112:18;;;8105:30;8171:34;8151:18;;;8144:62;-1:-1:-1;;;8222:18:1;;;8215:36;8268:19;;62757:73:0::1;8065:228:1::0;62757:73:0::1;62841:19;62851:8;62841:9;:19::i;:::-;62676:192:::0;:::o;65735:106::-;61822:7;61849:6;-1:-1:-1;;;;;61849:6:0;60644:10;61996:23;61988:68;;;;-1:-1:-1;;;61988:68:0;;;;;;;:::i;:::-;65808:18:::1;:27:::0;;-1:-1:-1;;;;;;65808:27:0::1;-1:-1:-1::0;;;;;65808:27:0;;;::::1;::::0;;;::::1;::::0;;65735:106::o;62876:173::-;62932:16;62951:6;;-1:-1:-1;;;;;62968:17:0;;;-1:-1:-1;;;;;;62968:17:0;;;;;;63001:40;;62951:6;;;;;;;63001:40;;62932:16;63001:40;62876:173;;:::o;14:134:1:-;82:20;;111:31;82:20;111:31;:::i;153:164::-;229:13;;278;;271:21;261:32;;251:2;;307:1;304;297:12;322:166;;429:3;420:6;415:3;411:16;407:26;404:2;;;450:5;443;436:20;404:2;-1:-1:-1;476:6:1;394:94;-1:-1:-1;394:94:1:o;493:257::-;;605:2;593:9;584:7;580:23;576:32;573:2;;;626:6;618;611:22;573:2;670:9;657:23;689:31;714:5;689:31;:::i;755:261::-;;878:2;866:9;857:7;853:23;849:32;846:2;;;899:6;891;884:22;846:2;936:9;930:16;955:31;980:5;955:31;:::i;1021:474::-;;;;1175:2;1163:9;1154:7;1150:23;1146:32;1143:2;;;1196:6;1188;1181:22;1143:2;1240:9;1227:23;1259:31;1284:5;1259:31;:::i;:::-;1309:5;-1:-1:-1;1366:2:1;1351:18;;1338:32;1379:33;1338:32;1379:33;:::i;:::-;1133:362;;1431:7;;-1:-1:-1;;;1485:2:1;1470:18;;;;1457:32;;1133:362::o;1500:333::-;;;1637:2;1625:9;1616:7;1612:23;1608:32;1605:2;;;1658:6;1650;1643:22;1605:2;1702:9;1689:23;1721:31;1746:5;1721:31;:::i;:::-;1771:5;1823:2;1808:18;;;;1795:32;;-1:-1:-1;;;1595:238:1:o;2168:212::-;;2288:2;2276:9;2267:7;2263:23;2259:32;2256:2;;;2309:6;2301;2294:22;2256:2;2337:37;2364:9;2337:37;:::i;2385:338::-;;;2521:2;2509:9;2500:7;2496:23;2492:32;2489:2;;;2542:6;2534;2527:22;2489:2;2570:37;2597:9;2570:37;:::i;:::-;2560:47;;2650:2;2639:9;2635:18;2629:25;2663:30;2687:5;2663:30;:::i;:::-;2712:5;2702:15;;;2479:244;;;;;:::o;2728:251::-;;2867:3;2855:9;2846:7;2842:23;2838:33;2835:2;;;2889:6;2881;2874:22;2835:2;2917:56;2965:7;2954:9;2917:56;:::i;2984:320::-;;;3140:3;3128:9;3119:7;3115:23;3111:33;3108:2;;;3162:6;3154;3147:22;3108:2;3190:56;3238:7;3227:9;3190:56;:::i;:::-;3180:66;3293:3;3278:19;;;;3265:33;;-1:-1:-1;;;3098:206:1:o;3309:190::-;;3421:2;3409:9;3400:7;3396:23;3392:32;3389:2;;;3442:6;3434;3427:22;3389:2;-1:-1:-1;3470:23:1;;3379:120;-1:-1:-1;3379:120:1:o;3504:194::-;;3627:2;3615:9;3606:7;3602:23;3598:32;3595:2;;;3648:6;3640;3633:22;3595:2;-1:-1:-1;3676:16:1;;3585:113;-1:-1:-1;3585:113:1:o;3703:258::-;;;3832:2;3820:9;3811:7;3807:23;3803:32;3800:2;;;3853:6;3845;3838:22;3800:2;-1:-1:-1;;3881:23:1;;;3951:2;3936:18;;;3923:32;;-1:-1:-1;3790:171:1:o;3966:897::-;;;;;;;;;;4223:3;4211:9;4202:7;4198:23;4194:33;4191:2;;;4245:6;4237;4230:22;4191:2;4279:9;4273:16;4263:26;;4329:2;4318:9;4314:18;4308:25;4298:35;;4376:2;4365:9;4361:18;4355:25;4389:30;4413:5;4389:30;:::i;:::-;4488:2;4473:18;;4467:25;4438:5;;-1:-1:-1;4501:32:1;4467:25;4501:32;:::i;:::-;4552:7;4542:17;;;4599:3;4588:9;4584:19;4578:26;4568:36;;4644:3;4633:9;4629:19;4623:26;4613:36;;4689:3;4678:9;4674:19;4668:26;4658:36;;4734:3;4723:9;4719:19;4713:26;4703:36;;4784:3;4773:9;4769:19;4763:26;4798:33;4823:7;4798:33;:::i;:::-;4850:7;4840:17;;;4181:682;;;;;;;;;;;:::o;4868:255::-;;4979:2;4967:9;4958:7;4954:23;4950:32;4947:2;;;5000:6;4992;4985:22;4947:2;5044:9;5031:23;5063:30;5087:5;5063:30;:::i;5237:856::-;5334:5;5321:19;5316:3;5309:32;5397:4;5390:5;5386:16;5373:30;5366:4;5361:3;5357:14;5350:54;5452:4;5445:5;5441:16;5428:30;5467:32;5491:7;5467:32;:::i;:::-;5544:10;5531:24;5524:4;5515:14;;5508:48;5604:4;5593:16;;5580:30;5619:32;5580:30;5619:32;:::i;:::-;6174:10;6163:22;;5696:4;5687:14;;6151:35;5660:42;5758:4;5751:5;5747:16;5734:30;5727:4;5722:3;5718:14;5711:54;5821:4;5814:5;5810:16;5797:30;5790:4;5785:3;5781:14;5774:54;5884:4;5877:5;5873:16;5860:30;5853:4;5848:3;5844:14;5837:54;5947:4;5940:5;5936:16;5923:30;5916:4;5911:3;5907:14;5900:54;5973:6;6003:34;6033:2;6026:5;6022:14;6003:34;:::i;:::-;-1:-1:-1;;;;;5194:31:1;6074:12;;5182:44;;;;-1:-1:-1;5299:794:1:o;8995:356::-;9197:2;9179:21;;;9216:18;;;9209:30;9275:34;9270:2;9255:18;;9248:62;9342:2;9327:18;;9169:182::o;9699:268::-;9893:3;9878:19;;9906:55;9882:9;9943:6;9906:55;:::i;9972:340::-;10194:3;10179:19;;10207:55;10183:9;10244:6;10207:55;:::i;:::-;10299:6;10293:3;10282:9;10278:19;10271:35;10161:151;;;;;:::o;10317:913::-;;10509:3;10498:9;10494:19;10486:27;;10546:6;10540:13;10529:9;10522:32;10610:4;10602:6;10598:17;10592:24;10585:4;10574:9;10570:20;10563:54;10664:4;10656:6;10652:17;10646:24;10689:10;10755:2;10741:12;10737:21;10730:4;10719:9;10715:20;10708:51;10827:2;10819:4;10811:6;10807:17;10801:24;10797:33;10790:4;10779:9;10775:20;10768:63;;;10887:4;10879:6;10875:17;10869:24;10862:4;10851:9;10847:20;10840:54;10950:4;10942:6;10938:17;10932:24;10925:4;10914:9;10910:20;10903:54;11013:4;11005:6;11001:17;10995:24;10988:4;10977:9;10973:20;10966:54;11076:4;11068:6;11064:17;11058:24;11051:4;11040:9;11036:20;11029:54;11102:6;11157:2;11149:6;11145:15;11139:22;11170:54;11220:2;11209:9;11205:18;11189:14;-1:-1:-1;;;;;5194:31:1;5182:44;;5172:60;11614:128;;11685:1;11681:6;11678:1;11675:13;11672:2;;;11691:18;;:::i;:::-;-1:-1:-1;11727:9:1;;11662:80::o;11747:217::-;;11813:1;11803:2;;-1:-1:-1;;;11838:31:1;;11892:4;11889:1;11882:15;11920:4;11845:1;11910:15;11803:2;-1:-1:-1;11949:9:1;;11793:171::o;11969:168::-;;12075:1;12071;12067:6;12063:14;12060:1;12057:21;12052:1;12045:9;12038:17;12034:45;12031:2;;;12082:18;;:::i;:::-;-1:-1:-1;12122:9:1;;12021:116::o;12142:125::-;;12210:1;12207;12204:8;12201:2;;;12215:18;;:::i;:::-;-1:-1:-1;12252:9:1;;12191:76::o;12272:127::-;12333:10;12328:3;12324:20;12321:1;12314:31;12364:4;12361:1;12354:15;12388:4;12385:1;12378:15;12404:131;-1:-1:-1;;;;;12479:31:1;;12469:42;;12459:2;;12525:1;12522;12515:12;12540:121;12625:10;12618:5;12614:22;12607:5;12604:33;12594:2;;12651:1;12648;12641:12
Swarm Source
ipfs://d794e0dfc22f328fd9f18cb71fb50e537175316cc3e8e9a080e19ab4a7ff637c
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $3,474.74 | 7.0151 | $24,375.71 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.