Contract 0x2de50836c96ce280958e290675e0a52bb1834712 13
Contract Overview
My Name Tag:
Not Available
[ Download CSV Export ]
Contract Name:
AssetManager
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {IBalanceSheet} from "./interfaces/IBalanceSheet.sol"; import {IAssetManager} from "./interfaces/IAssetManager.sol"; // /$$$$$$$ /$$$$$$$$ // | $$__ $$ | $$_____/ // | $$ \ $$ /$$$$$$ | $$ /$$$$$$ /$$$$$$ /$$$$$$ // | $$ | $$ /$$__ $$| $$$$$ /$$__ $$|____ $$ /$$__ $$ // | $$ | $$| $$$$$$$$| $$__/| $$ \__/ /$$$$$$$| $$ \ $$ // | $$ | $$| $$_____/| $$ | $$ /$$__ $$| $$ | $$ // | $$$$$$$/| $$$$$$$| $$ | $$ | $$$$$$$| $$$$$$$ // |_______/ \_______/|__/ |__/ \_______/ \____ $$ // /$$ \ $$ // | $$$$$$/ // \______/ // // ASSISTANT TO THE ASSET MANAGER // // `/+o/. // .+sso+/:oydyo/:-:+shdys/ `-:. `-/+o+/` // `/sdh+/::/::ss:`ymdhyso//hmMNyhNNms+ososys+/-:/shms/` // .+hNNy++oo+/.`.--/osyhdmNNMMMMMMMMMNdsssssoso+hhhhsoo+ymdo. // -smNy/+ymmmmmNNNNMNMMMMMNNNmmNMMMMMMMMMho:///:--shydNMMNdo-sNs` // -hNd+-sNMNdmNMMMNNNMNNNMMMddNMMNNmNMMMMMMNmy+///::/:-:/++ymNNdmMN: // `sNMs`+NMNNNMMMMNNNMMMMMMNmhyso///+ohMmoNMmoo+/::/-:oymNNmsosshdhmMM/ // +NMMy`hMMMhyNMNMMNNNMds:-.`-:syddmNMMmyo`+yMMho:..-+//++omMNNNNNNNmdNMs // :mMMMh`yMNdodNNNMNMMMs.+sdmmmmmdhNMMMNhy/..`-syhNmdyssso+/.`:yNMMMMNMNMMMy // :NMNh:-+MMh+mdNNNNNMd.+NNMMMMMMMMmho:-......:--::ohNMMMMMMNmNy/.oNMNmNMNMMMs // :NMm+/dmmMNydyhNdhMMN.yMMNmhysso+:-`` ```.--:/+sdMMMMMNNNm:-mMNNNNMMMMy // :NMy/hNMMMMmNddsh/NmMy-Mms:..`.--.` ``..-.:yNMMMMNMNs:NMMMNNNNMMy // :NNy/mMMMMMMmNMMshsNdMo/d-...`` ```...-yMMMNNMd`NMMNMdmoNMM- // /mMm+NMNNMMNMNNNNNNNNMMmom/ ```..`+NMMMMh`NMMMMNNdhNMh // +NMMmmMNyNMNMMMMMNmmmNMdNNyh+. ``````/NMMM::MMMMNMNNmNMN // +MNNMMMNymMNNMMMNNNNNMh+:+dNmddhyoo+` ````.`sMMN`sMNNMNNMNNNNN // dNNNMNNddMNNNNNNmymMN+---::/shdhyyy: `````..hMo.NMNMNMMMNmMMd // dNNNMMNmNNNmmNMNdNMM+.-..----.-:::. ````...:mh/NMMMNMMMNNMMh // sMNNMMNMNNmyNMNdmNMo--..... ``...---:dNMNMMNMMNNNMMN. // :NNNMMMNNNsmMNmMNMy...`.-.` `.-----:odNmmNMMMMMNMMo // .NMMMmMMMNmMNNNNMm:-.```.. ``-----:/o//dMMMNMMMm // .NMMMNMMNMMNMNNNNs--.``... `....---..dMNMMMMM` // .NNMMNNNNNMMMNNNN:-...`... ```.....`+MMMMMMM. // .MNNNNNNNMMMMMNNy.......-.` ``..---.`.NMMMMMM` // `NMNMMNNNMMNMMMm-...`.-----.` ``.-----.`yMMMMMd // dMMMNNNNMMNNMMo`-....----..` `` `.`` ```.------`:MMMMM- // /MMNMNNNMMNMMN-`.`..-.--.` `--..-:-.-.``..`` ```.-......--.----..NMMMd // `mMNMNNMMMNNMN.``...-.-../hddyysyhysyyso+--/::-..--...----:::+syyyyhhdddy+:-.-.hMMM: // :NNNNNNMMMMMN.`....--.:dy/:-.-/+++ososss+/:+shyo/::/:+os+:+syosyoso+/://ss//.`+MMm // +MdmNNMNMMMN+.--....:+-.-:+ooymdddmdhyo++ss+/yMo.`..oNsyhdhmdmmmmNmdo:-.--:+-:MM/ // `y/..-+dNNMMMo-shhyo++--+sso-`dsymoso.smyso+//.od+/:/ho+yyhd/ymsNhyy./yy/``.-hhmm` // .s+md+- oMMMm``.-/sy//-.+/s. odys+s- /shyso+.sm+:::yd/hh+:`.hyyhy- `/y/.` `hs/s` // -oyMNyhs:NMMo `.-` .---` ``.`/::+s/ms````-mo+:`````.--` ```` `sNm` // `hsMh`.hymMM: `- ` .:+:hy` od:-` .+sM-`` // o+o/``-/mMM- .- ``.```hy` s.`.` -/+M+`` // .s `./NMMMM- -- ```` `:ho` .s` ``` ./.+My` // /: `+MMdMM/ -. ` ` ..+++- :d/. ``:o-`oMy // o. .sdNMMm` `--:://+//.`-///:. `.ohooo:-.`` `.-:+//:..`hMy // `s```.yMMMs ``` .y+ `::.:----.-``o:-::/:::--:::-----..mMo // :s` `oMNMN- :N+ -NNhy/:/sds./:..----------------`/MN // +o``-NMNMd` `-syyoo++/.++:so/+yN+..--....-..-....--`dM+ // +:.`oMNNN` .:-` `.::.` `--..---/+/---.```........-.:d: // ./++Ny::` `--` .--..-----::-..```......---.s. // `:os.--` .` `.. ``.------.`.```..-----.:o // `h-..` `` .:syy/-/ydho-.--...`````.------.+. // +o`.` ./ymNNNNNNNmmNNNh:....``.```.-----:s // `h-`. -/+oyo/:----:---.--:+sso:........--::-+: // /d... `.++: -:--/+:/oo+o++-.``--.....-----:-:y // `Md:.` `` `-:/+ooooo+/-........-----------yo // mNNs-` `..-/oo+://:/oo:......----------os // h:+md:. ...``.` `------.---------++ // `h..-+ddo.` ``.----------------s: // h` .--/ydy:` `...--------------------+y. // h` ..--+yds+.` `....----------------:+dN` // `y `.-.-:sdhs:.` `...````..----------------:smsdm // `h .--..-+ymdy+/:----:----------------.-/shs+.`os // `h `..--..:sdmmhyo/::----------::/+syhy/....`+- // -y `..--..--/oosyyyhhhyyyssoooo/:.`...`.` /- // `. `..--.......................```` +` // `...------..-.........`` // ``..-.--........`` // ```..``` /// @title Asset Manager is in charge of moving and holding assets such as ERC20s and ERC721s /// @author DeFragDAO /// @custom:experimental This is an experimental contract contract AssetManager is IAssetManager, IERC721Receiver, ReentrancyGuard, Pausable, AccessControl { address public immutable nftCollectionAddress; address public immutable usdcAddress; address public immutable balanceSheetAddress; address public treasuryAddress; bytes32 public constant DEFRAG_SYSTEM_ADMIN_ROLE = keccak256("DEFRAG_SYSTEM_ADMIN_ROLE"); bytes32 public constant LIQUIDATOR_ROLE = keccak256("LIQUIDATOR_ROLE"); bytes32 public constant ULP_ROLE = keccak256("ULP_ROLE"); event DepositedCollateral( address indexed _from, address _to, uint256 _tokenID, bytes _data ); event WithdrewCollateral( address indexed _to, address _from, uint256 _tokenID ); event Borrowed( address indexed _user, uint256[] _collateralTokenIds, uint256 _borrowedAmount ); event PaidAmount( address indexed _payer, address indexed _userWithLoan, uint256 _paymentAmount ); event WithdrewETH( address indexed _operator, address indexed _to, uint256 _withdrewAmount ); event WithdrewERC20( address indexed _operator, address indexed _to, uint256 _withdrewAmount, address _interactedWithTokenContract ); event WithdrewERC721( address indexed _operator, address indexed _to, uint256 _withdrewTokenId, address _interactedWithTokenContract ); event Liquidated(address indexed _user, address _to, uint256 _tokenId); event SentToTreasuryAmount(address indexed _to, uint256 _amount); event Redeemed(address indexed _user, uint256 _amount); event SetTreasuryAddress( address indexed _operator, address _new, address _old ); constructor( address _nftCollectionAddress, address _usdcAddress, address _balanceSheetAddress, address _treasuryAddress ) { nftCollectionAddress = _nftCollectionAddress; usdcAddress = _usdcAddress; balanceSheetAddress = _balanceSheetAddress; treasuryAddress = _treasuryAddress; _pause(); _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); } /** * @notice borrow and deposit collateral * @dev user must approve the ERC721 asset for transfer before * @param _tokenIds - token ID array * @param _amount - amount */ function borrow( uint256[] memory _tokenIds, uint256 _amount ) public nonReentrant whenNotPaused { // make sure msg.sender is the owner of the token for (uint256 i = 0; i < _tokenIds.length; i++) { try IERC721(nftCollectionAddress).ownerOf(_tokenIds[i]) { require( IERC721(nftCollectionAddress).ownerOf(_tokenIds[i]) == msg.sender, "AssetManager: not an owner of token" ); } catch { revert("AssetManager: can't verify ownership"); } } // check if there are enough stable coins to lend require( IERC20Metadata(usdcAddress).balanceOf(address(this)) >= amountInUSDC(_amount), "AssetManager: not enough USDC" ); for (uint256 i = 0; i < _tokenIds.length; i++) { _depositNFT(_tokenIds[i]); } IERC20Metadata(usdcAddress).transfer(msg.sender, amountInUSDC(_amount)); IBalanceSheet(balanceSheetAddress).setLoan( msg.sender, _tokenIds, _amount ); emit Borrowed(msg.sender, _tokenIds, _amount); } /** * @notice make a payment for the loan * @dev user must approve the ERC20 asset for transfer before * @param _amount amount of USDC */ function makePayment( uint256 _amount, address _userAddress ) public nonReentrant whenNotPaused { require( IERC20Metadata(usdcAddress).balanceOf(address(msg.sender)) >= amountInUSDC(_amount), "AssetManager: not enough owned" ); uint256 protocolFees = IBalanceSheet(balanceSheetAddress).setPayment( _userAddress, _amount ); if (protocolFees > 0) { // move funds into AssetManager _transferUSDC( msg.sender, address(this), (amountInUSDC(_amount) - amountInUSDC(protocolFees)) ); // move protocol fee to treasury _transferUSDC( msg.sender, treasuryAddress, amountInUSDC(protocolFees) ); emit SentToTreasuryAmount(treasuryAddress, protocolFees); } else { // move funds into AssetManager _transferUSDC(msg.sender, address(this), amountInUSDC(_amount)); } emit PaidAmount(msg.sender, _userAddress, _amount); } /** * @notice withdraw collateral * @param _tokenIds - array of token ids */ function withdrawCollateral( uint256[] memory _tokenIds ) public nonReentrant whenNotPaused { address user = msg.sender; IBalanceSheet(balanceSheetAddress).removeCollateral( msg.sender, _tokenIds ); for (uint256 i = 0; i < _tokenIds.length; i++) { IERC721(nftCollectionAddress).safeTransferFrom( address(this), user, _tokenIds[i] ); emit WithdrewCollateral(user, address(this), _tokenIds[i]); } } /** * @notice liqudate the user - move tokens to treasury and null out the loan in balance sheet * @param _userAddress - address of the user */ function liquidate(address _userAddress) public onlyLiquidator { // move the collateral to treasury uint256[] memory tokenIds = IBalanceSheet(balanceSheetAddress) .getTokenIds(_userAddress); for (uint256 i = 0; i < tokenIds.length; i++) { IERC721(nftCollectionAddress).safeTransferFrom( address(this), treasuryAddress, tokenIds[i] ); emit Liquidated(_userAddress, treasuryAddress, tokenIds[i]); } // set liquidation in balance sheet IBalanceSheet(balanceSheetAddress).setLiquidation(_userAddress); } /** * @notice redeem ERC20 * @param _user - address * @param _amount - amount */ function redeemERC20(address _user, uint256 _amount) public onlyULP { IERC20Metadata(usdcAddress).transfer(_user, _amount); emit Redeemed(_user, _amount); } /** * @dev override for IERC721Receiver */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) public override returns (bytes4) { emit DepositedCollateral(from, operator, tokenId, data); return this.onERC721Received.selector; } /** * @notice pause borrowing */ function pauseLoans() public onlyAdmin { _pause(); } /** * @notice unpause borrowing */ function unpauseLoans() public onlyAdmin { _unpause(); } /** * @notice withdraw eth * @param _to - address * @param _amount - amount */ function withdrawEth(address _to, uint256 _amount) public onlyAdmin { (bool sent, ) = _to.call{value: _amount}(""); require(sent, "Failed to send Ether"); emit WithdrewETH(msg.sender, _to, _amount); } /** * @notice withdraw erc20 * @param _to - address * @param _amount - amount * @param _tokenAddress - token address */ function withdrawERC20( address _to, uint256 _amount, address _tokenAddress ) public onlyAdmin { IERC20Metadata(_tokenAddress).transfer(_to, _amount); emit WithdrewERC20(msg.sender, _to, _amount, _tokenAddress); } /** * @notice withdraw erc721 * @param _tokenId - token ID * @param _tokenAddress - token address */ function withdrawERC721( address _to, uint256 _tokenId, address _tokenAddress ) public onlyAdmin { IERC721(_tokenAddress).safeTransferFrom(address(this), _to, _tokenId); emit WithdrewERC721(msg.sender, _to, _tokenId, _tokenAddress); } /** * @notice set treasury address * @param _treasuryAddress - address */ function setTreasuryAddress(address _treasuryAddress) public onlyAdmin { emit SetTreasuryAddress(msg.sender, _treasuryAddress, treasuryAddress); treasuryAddress = _treasuryAddress; } /** * @notice helper to convert wei into USDC * @param _amount - 18 decimal amount * @return uint256 - USDC decimal compliant amount */ function amountInUSDC(uint256 _amount) public view returns (uint256) { // because USDC is 6 decimals, we need to fix the decimals // https://docs.openzeppelin.com/contracts/4.x/erc20#a-note-on-decimals uint8 decimals = IERC20Metadata(usdcAddress).decimals(); return (_amount / 10 ** (18 - decimals)); } /** * @notice transfer the NFT to Asset Manager * @param _tokenId - token ID array */ function _depositNFT(uint256 _tokenId) internal { IERC721(nftCollectionAddress).safeTransferFrom( msg.sender, address(this), _tokenId ); } /** * @notice transfer the USDC * @param _from - address * @param _to - address * @param _amount - amount */ function _transferUSDC( address _from, address _to, uint256 _amount ) internal { IERC20Metadata(usdcAddress).transferFrom(_from, _to, _amount); } modifier onlyAdmin() { require( hasRole(DEFRAG_SYSTEM_ADMIN_ROLE, msg.sender), "AssetManager: only DefragSystemAdmin" ); _; } modifier onlyLiquidator() { require( hasRole(LIQUIDATOR_ROLE, msg.sender), "AssetManager: only Liquidator" ); _; } modifier onlyULP() { require(hasRole(ULP_ROLE, msg.sender), "AssetManager: only ULP"); _; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; // /$$$$$$$ /$$$$$$$$ // | $$__ $$ | $$_____/ // | $$ \ $$ /$$$$$$ | $$ /$$$$$$ /$$$$$$ /$$$$$$ // | $$ | $$ /$$__ $$| $$$$$ /$$__ $$|____ $$ /$$__ $$ // | $$ | $$| $$$$$$$$| $$__/| $$ \__/ /$$$$$$$| $$ \ $$ // | $$ | $$| $$_____/| $$ | $$ /$$__ $$| $$ | $$ // | $$$$$$$/| $$$$$$$| $$ | $$ | $$$$$$$| $$$$$$$ // |_______/ \_______/|__/ |__/ \_______/ \____ $$ // /$$ \ $$ // | $$$$$$/ // \______/ /// @author DeFragDAO interface IBalanceSheet { function setLoan( address _userAddress, uint256[] memory _tokenIds, uint256 _borrowedAmount ) external; function updateFees() external; function removeCollateral( address _userAddress, uint256[] memory _tokenIds ) external; function isExistingUser(address _userAddress) external view returns (bool); function removingCollateralProjectedLTV( address _userAddress, uint256 _numberOfTokens ) external view returns (uint256 newCollateralRatio); function setPayment( address _userAddress, uint256 _paymentAmount ) external returns (uint256); function getLoanBasics( address _userAddress ) external view returns ( uint256[] memory tokenIds, uint256 accruedFees, uint256 borrowedAmount, uint256 paymentsAmount, uint256 claimableFees ); function getLoanMetrics( address _userAddress ) external view returns ( uint256 collateralizationRatio, uint256 outstandingLoan, uint256 borrowingPower, uint256 collateralValue, uint256 loanToValueRatio, uint256 healthScore ); function getTokenIds( address _userAddress ) external view returns (uint256[] memory tokenIds); function getAccruedFees( address _userAddress ) external view returns (uint256); function getBorrowedAmount( address _userAddress ) external view returns (uint256); function getPaymentsAmount( address _userAddress ) external view returns (uint256); function getCurrentPremium( uint256 _numberOfTokens, uint256 _strikePrice ) external view returns (uint256); function getAssetAveragePrice() external view returns (uint256 assetAveragePrice); function getCollateralValue( address _userAddress ) external view returns (uint256 collateralValue); function getOutstandingLoan( address _userAddress ) external view returns (uint256); function getBorrowingPower( address _userAddress ) external view returns (uint256 borrowingPower); function getCollateralizationRatio( address _userAddress ) external view returns (uint256 collateralizationRatio); function isLiquidatable(address _userAddress) external view returns (bool); function getLiquidatables() external view returns (address[] memory); function getTotalAmountBorrowed() external view returns (uint256 totalAmountBorrowed); function getSystemTotalCollateral() external view returns (uint256 systemTotalCollateral); function getTotalAccruedFees() external view returns (uint256 totalAccruedFees); function getTotalPayments() external view returns (uint256 totalPayments); function setLiquidation(address _userAddress) external; function getLiquidationCount( address _userAddress ) external view returns (uint256 liquidationCount); function getTotalLiquidationCount() external view returns (uint256 totalLiquidationCount); function getClaimableFees( address _userAddress ) external view returns (uint256 claimableFees); function getTotalClaimableFees() external view returns (uint256 totalClaimableFees); function getTotalCollateralValue() external view returns (uint256 totalCollateralValue); function getTotalNumberOfTokens() external view returns (uint256 totalNumberOfTokens); function getProtocolBasics() external view returns ( uint256 totalBorrowedAmount, uint256 totalCollateralValue, uint256 totalNumberOfTokens, uint256 totalAccruedFees, uint256 totalPayments, uint256 totalClaimableFees, uint256 totalLiquidationCount ); function getProtocolMetrics() external view returns ( uint256 totalOutstandingLoan, uint256 getProtocolLoanToValueRatio, uint256 getProtocolHealthScore ); function getTotalOutstandingLoans() external view returns (uint256 totalOutstandingLoans); function getAllUsers() external view returns (address[] memory); function getLoanToValueRatio( address _userAddress ) external view returns (uint256 loanToValueRatio); function getProtocolLoanToValueRatio() external view returns (uint256 protocolLoanToValueRatio); function getProtocolLTVThreshold() external view returns (uint256 protocolLTVThreshold); function getHealthScore( address _userAddress ) external view returns (uint256 healthScore); function getProtocolHealthScore() external view returns (uint256 protocolHealthScore); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; // /$$$$$$$ /$$$$$$$$ // | $$__ $$ | $$_____/ // | $$ \ $$ /$$$$$$ | $$ /$$$$$$ /$$$$$$ /$$$$$$ // | $$ | $$ /$$__ $$| $$$$$ /$$__ $$|____ $$ /$$__ $$ // | $$ | $$| $$$$$$$$| $$__/| $$ \__/ /$$$$$$$| $$ \ $$ // | $$ | $$| $$_____/| $$ | $$ /$$__ $$| $$ | $$ // | $$$$$$$/| $$$$$$$| $$ | $$ | $$$$$$$| $$$$$$$ // |_______/ \_______/|__/ |__/ \_______/ \____ $$ // /$$ \ $$ // | $$$$$$/ // \______/ /// @author DeFragDAO interface IAssetManager { function borrow(uint256[] memory _tokenIds, uint256 _amount) external; function makePayment(uint256 _amount, address _userAddress) external; function withdrawCollateral(uint256[] memory _tokenIds) external; function liquidate(address _userAddress) external; function redeemERC20(address _user, uint256 _amount) external; function pauseLoans() external; function unpauseLoans() external; function withdrawEth(address _to, uint256 _amount) external; function withdrawERC20( address _to, uint256 _amount, address _tokenAddress ) external; function withdrawERC721( address _to, uint256 _tokenId, address _tokenAddress ) external; function setTreasuryAddress(address _treasuryAddress) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @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 Pausable is Context { /** * @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. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { 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()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // 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 ReentrancyGuard { // 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; constructor() { _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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @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`. * * 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; /** * @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 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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // 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 Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
[{"inputs":[{"internalType":"address","name":"_nftCollectionAddress","type":"address"},{"internalType":"address","name":"_usdcAddress","type":"address"},{"internalType":"address","name":"_balanceSheetAddress","type":"address"},{"internalType":"address","name":"_treasuryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_collateralTokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"_borrowedAmount","type":"uint256"}],"name":"Borrowed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenID","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"_data","type":"bytes"}],"name":"DepositedCollateral","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Liquidated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_payer","type":"address"},{"indexed":true,"internalType":"address","name":"_userWithLoan","type":"address"},{"indexed":false,"internalType":"uint256","name":"_paymentAmount","type":"uint256"}],"name":"PaidAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Redeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"SentToTreasuryAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"address","name":"_new","type":"address"},{"indexed":false,"internalType":"address","name":"_old","type":"address"}],"name":"SetTreasuryAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"WithdrewCollateral","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_withdrewAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"_interactedWithTokenContract","type":"address"}],"name":"WithdrewERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_withdrewTokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"_interactedWithTokenContract","type":"address"}],"name":"WithdrewERC721","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_withdrewAmount","type":"uint256"}],"name":"WithdrewETH","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFRAG_SYSTEM_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LIQUIDATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ULP_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"amountInUSDC","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceSheetAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"borrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_userAddress","type":"address"}],"name":"liquidate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_userAddress","type":"address"}],"name":"makePayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nftCollectionAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseLoans","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"redeemERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryAddress","type":"address"}],"name":"setTreasuryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpauseLoans","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdcAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"withdrawCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"withdrawERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e06040523480156200001157600080fd5b5060405162002d3d38038062002d3d8339810160408190526200003491620001fe565b60016000819055805460ff191690556001600160a01b0384811660805283811660a05282811660c052600380546001600160a01b0319169183169190911790556200007e62000095565b6200008b600033620000e0565b505050506200025b565b6200009f620000f0565b6001805460ff1916811790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b620000ec82826200013d565b5050565b60015460ff16156200013b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16620000ec5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200019d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b0381168114620001f957600080fd5b919050565b600080600080608085870312156200021557600080fd5b6200022085620001e1565b93506200023060208601620001e1565b92506200024060408601620001e1565b91506200025060608601620001e1565b905092959194509250565b60805160a05160c051612a42620002fb60003960008181610379015281816109dd01528181610bf601528181610d73015281816114dc0152611b7c0152600081816101f6015281816106d201528181610f2e015281816113d9015281816119a101528181611aa50152611e760152600081816103ed01528181610a5e01528181610dea015281816117320152818161184e0152611f460152612a426000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80635fc3ea0b116100f9578063908ef64611610097578063bd2af43111610071578063bd2af43114610458578063c5f956af1461047f578063c9f8437c14610492578063d547741f146104a557600080fd5b8063908ef6461461040f57806391d1485414610417578063a217fddf1461045057600080fd5b80636d7c6689116100d35780636d7c66891461039b5780637b9f76b5146103c25780637ff74381146103d557806383a2325d146103e857600080fd5b80635fc3ea0b1461034e5780636605bfda146103615780636778ff771461037457600080fd5b8063248a9ca31161016657806336568abe1161014057806336568abe1461030a5780633e48f0331461031d57806344ae7615146103305780635c975abb1461034357600080fd5b8063248a9ca3146102c15780632f2ff15d146102e45780632f865568146102f757600080fd5b8063150b7a02116101a2578063150b7a021461023a5780631677b9011461026657806316d8887a146102795780631b9a91a4146102ae57600080fd5b806301ffc9a7146101c957806302d45457146101f15780630f290a7714610230575b600080fd5b6101dc6101d7366004612260565b6104b8565b60405190151581526020015b60405180910390f35b6102187f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101e8565b610238610521565b005b61024d61024836600461229f565b6105ba565b6040516001600160e01b031990911681526020016101e8565b61023861027436600461233e565b61062e565b6102a07f5e17fc5225d4a099df75359ce1f405503ca79498a8dc46a7d583235a0ee45c1681565b6040519081526020016101e8565b6102386102bc36600461233e565b610787565b6102a06102cf36600461236a565b60009081526002602052604090206001015490565b6102386102f2366004612383565b6108fa565b6102386103053660046123b3565b610924565b610238610318366004612383565b610c56565b61023861032b3660046124a6565b610ce2565b6102a061033e36600461236a565b610f29565b60015460ff166101dc565b61023861035c3660046124e3565b610fd7565b61023861036f3660046123b3565b611119565b6102187f000000000000000000000000000000000000000000000000000000000000000081565b6102a07f94bc1596dd2b9c6f38e0b2a79ad86bf86ff14a6dac61754f3460431ad38513f581565b6102386103d03660046124e3565b611226565b6102386103e3366004612383565b61135c565b6102187f000000000000000000000000000000000000000000000000000000000000000081565b610238611633565b6101dc610425366004612383565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6102a0600081565b6102a07f08e6d23221a158563e99a9996d0b03da373964c87a962f4a5ad91c37144ec3e081565b600354610218906001600160a01b031681565b6102386104a0366004612525565b6116c5565b6102386104b3366004612383565b611c33565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061051b57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b3360009081527fc117bb1ebd69360b203eee31a7c420997c8f8919973559106c210baeae685447602052604090205460ff166105b05760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a206f6e6c792044656672616753797374656d416044820152633236b4b760e11b60648201526084015b60405180910390fd5b6105b8611c58565b565b6000846001600160a01b03167f81397320231ab434e758e1dda00c6e210b55d17613586be81a094a544ee754d4878686866040516105fb949392919061256a565b60405180910390a2507f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b3360009081527f835dd802e3ee130b3577f13f48ef2a19a502a9cc64baf71f9727862934f7400f602052604090205460ff166106ac5760405162461bcd60e51b815260206004820152601660248201527f41737365744d616e616765723a206f6e6c7920554c500000000000000000000060448201526064016105a7565b60405163a9059cbb60e01b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af115801561071b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073f91906125b0565b50816001600160a01b03167f4896181ff8f4543cc00db9fe9b6fb7e6f032b7eb772c72ab1ec1b4d2e03b93698260405161077b91815260200190565b60405180910390a25050565b3360009081527fc117bb1ebd69360b203eee31a7c420997c8f8919973559106c210baeae685447602052604090205460ff166108115760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a206f6e6c792044656672616753797374656d416044820152633236b4b760e11b60648201526084016105a7565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461085e576040519150601f19603f3d011682016040523d82523d6000602084013e610863565b606091505b50509050806108b45760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016105a7565b6040518281526001600160a01b0384169033907f1f12aa8b6d492dd9b98e2b00b0b20830c2a7ded65afac13b60d169a034ae90bc906020015b60405180910390a3505050565b60008281526002602052604090206001015461091581611caa565b61091f8383611cb7565b505050565b3360009081527f2ffd32cdf6f0cb566b2aa8dbed589a202f35a89ae943936feeec4ab69e05f235602052604090205460ff166109a25760405162461bcd60e51b815260206004820152601d60248201527f41737365744d616e616765723a206f6e6c79204c697175696461746f7200000060448201526064016105a7565b6040517fd004b0360000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063d004b03690602401600060405180830381865afa158015610a26573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a4e91908101906125d2565b905060005b8151811015610bbd577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166342842e0e30600360009054906101000a90046001600160a01b0316858581518110610ab457610ab4612663565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610b0e57600080fd5b505af1158015610b22573d6000803e3d6000fd5b50505050826001600160a01b03167fde0aa27286f5cb3a4ed853dc4823ead62d63e92cdf13de09d6aece56970721a4600360009054906101000a90046001600160a01b0316848481518110610b7957610b79612663565b6020026020010151604051610ba39291906001600160a01b03929092168252602082015260400190565b60405180910390a280610bb58161268f565b915050610a53565b506040517fab919ee30000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063ab919ee390602401600060405180830381600087803b158015610c3a57600080fd5b505af1158015610c4e573d6000803e3d6000fd5b505050505050565b6001600160a01b0381163314610cd45760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016105a7565b610cde8282611d59565b5050565b600260005403610d345760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105a7565b6002600055610d41611ddc565b6040517ff397cca900000000000000000000000000000000000000000000000000000000815233906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f397cca990610daa90849086906004016126e3565b600060405180830381600087803b158015610dc457600080fd5b505af1158015610dd8573d6000803e3d6000fd5b5050505060005b8251811015610f1f577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166342842e0e3084868581518110610e2b57610e2b612663565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610e8557600080fd5b505af1158015610e99573d6000803e3d6000fd5b50505050816001600160a01b03167ff700cab75a1c246cf0ea8484d75e076ed2f652037a06a754ce87f3c96b574ca130858481518110610edb57610edb612663565b6020026020010151604051610f059291906001600160a01b03929092168252602082015260400190565b60405180910390a280610f178161268f565b915050610ddf565b5050600160005550565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fae9190612705565b9050610fbb816012612728565b610fc690600a612825565b610fd09084612834565b9392505050565b3360009081527fc117bb1ebd69360b203eee31a7c420997c8f8919973559106c210baeae685447602052604090205460ff166110615760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a206f6e6c792044656672616753797374656d416044820152633236b4b760e11b60648201526084016105a7565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820184905282169063a9059cbb906044016020604051808303816000875af11580156110b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d491906125b0565b50604080518381526001600160a01b03838116602083015285169133917fcdc72153be5513b5c728acb07c44c23d23c7fec977e0595801e5ebb5ccd894a191016108ed565b3360009081527fc117bb1ebd69360b203eee31a7c420997c8f8919973559106c210baeae685447602052604090205460ff166111a35760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a206f6e6c792044656672616753797374656d416044820152633236b4b760e11b60648201526084016105a7565b600354604080516001600160a01b038085168252909216602083015233917ff0340143ecfb85c19a230e8af5986e21ce2ef530cd5f127355102a0be53b0e05910160405180910390a2600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b3360009081527fc117bb1ebd69360b203eee31a7c420997c8f8919973559106c210baeae685447602052604090205460ff166112b05760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a206f6e6c792044656672616753797374656d416044820152633236b4b760e11b60648201526084016105a7565b604051632142170760e11b81523060048201526001600160a01b038481166024830152604482018490528216906342842e0e90606401600060405180830381600087803b15801561130057600080fd5b505af1158015611314573d6000803e3d6000fd5b5050604080518581526001600160a01b038581166020830152871693503392507f29621089ef89e8ddb614edf1bba81a3d3ee576dac4970569622444ea97f0d98091016108ed565b6002600054036113ae5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105a7565b60026000556113bb611ddc565b6113c482610f29565b6040516370a0823160e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611428573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144c9190612856565b101561149a5760405162461bcd60e51b815260206004820152601e60248201527f41737365744d616e616765723a206e6f7420656e6f756768206f776e6564000060448201526064016105a7565b6040517f841e48e70000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152602482018490526000917f00000000000000000000000000000000000000000000000000000000000000009091169063841e48e7906044016020604051808303816000875af1158015611527573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154b9190612856565b905080156115db57611579333061156184610f29565b61156a87610f29565b611574919061286f565b611e2f565b6003546115949033906001600160a01b031661157484610f29565b6003546040518281526001600160a01b03909116907ff02c0729c049dd2e10f84a3df6601bff7b02f7e9ccf35768cb6a6e20151acb339060200160405180910390a26115e9565b6115e9333061157486610f29565b6040518381526001600160a01b0383169033907f46949d12d3042855fb3772543755a98c944d4dc0b4ded1c80805c9d3969d38169060200160405180910390a35050600160005550565b3360009081527fc117bb1ebd69360b203eee31a7c420997c8f8919973559106c210baeae685447602052604090205460ff166116bd5760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a206f6e6c792044656672616753797374656d416044820152633236b4b760e11b60648201526084016105a7565b6105b8611ee9565b6002600054036117175760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105a7565b6002600055611724611ddc565b60005b8251811015611982577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e84838151811061177157611771612663565b60200260200101516040518263ffffffff1660e01b815260040161179791815260200190565b602060405180830381865afa9250505080156117d0575060408051601f3d908101601f191682019092526117cd91810190612882565b60015b6118415760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a2063616e277420766572696679206f776e657260448201527f736869700000000000000000000000000000000000000000000000000000000060648201526084016105a7565b50336001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e85848151811061188d5761188d612663565b60200260200101516040518263ffffffff1660e01b81526004016118b391815260200190565b602060405180830381865afa1580156118d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f49190612882565b6001600160a01b0316146119705760405162461bcd60e51b815260206004820152602360248201527f41737365744d616e616765723a206e6f7420616e206f776e6572206f6620746f60448201527f6b656e000000000000000000000000000000000000000000000000000000000060648201526084016105a7565b8061197a8161268f565b915050611727565b5061198c81610f29565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156119f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a149190612856565b1015611a625760405162461bcd60e51b815260206004820152601d60248201527f41737365744d616e616765723a206e6f7420656e6f756768205553444300000060448201526064016105a7565b60005b8251811015611aa257611a90838281518110611a8357611a83612663565b6020026020010151611f24565b80611a9a8161268f565b915050611a65565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb33611adc84610f29565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611b27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b4b91906125b0565b506040517ff3c61ae60000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f3c61ae690611bb59033908690869060040161289f565b600060405180830381600087803b158015611bcf57600080fd5b505af1158015611be3573d6000803e3d6000fd5b50505050336001600160a01b03167f47466c4ac4e1fa060f3549de0b43655fe690a50757c6407a878b3525cc46ac078383604051611c229291906128d1565b60405180910390a250506001600055565b600082815260026020526040902060010154611c4e81611caa565b61091f8383611d59565b611c60611fad565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b611cb48133611fff565b50565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16610cde5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611d153390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1615610cde5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60015460ff16156105b85760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105a7565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528381166024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af1158015611ebf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee391906125b0565b50505050565b611ef1611ddc565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833611c8d565b604051632142170760e11b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e90606401600060405180830381600087803b158015611f9257600080fd5b505af1158015611fa6573d6000803e3d6000fd5b5050505050565b60015460ff166105b85760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016105a7565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16610cde5761203d816001600160a01b0316601461207f565b61204883602061207f565b604051602001612059929190612917565b60408051601f198184030181529082905262461bcd60e51b82526105a791600401612998565b6060600061208e8360026129cb565b6120999060026129e2565b67ffffffffffffffff8111156120b1576120b16123d0565b6040519080825280601f01601f1916602001820160405280156120db576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061211257612112612663565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061215d5761215d612663565b60200101906001600160f81b031916908160001a90535060006121818460026129cb565b61218c9060016129e2565b90505b6001811115612211577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106121cd576121cd612663565b1a60f81b8282815181106121e3576121e3612663565b60200101906001600160f81b031916908160001a90535060049490941c9361220a816129f5565b905061218f565b508315610fd05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105a7565b60006020828403121561227257600080fd5b81356001600160e01b031981168114610fd057600080fd5b6001600160a01b0381168114611cb457600080fd5b6000806000806000608086880312156122b757600080fd5b85356122c28161228a565b945060208601356122d28161228a565b935060408601359250606086013567ffffffffffffffff808211156122f657600080fd5b818801915088601f83011261230a57600080fd5b81358181111561231957600080fd5b89602082850101111561232b57600080fd5b9699959850939650602001949392505050565b6000806040838503121561235157600080fd5b823561235c8161228a565b946020939093013593505050565b60006020828403121561237c57600080fd5b5035919050565b6000806040838503121561239657600080fd5b8235915060208301356123a88161228a565b809150509250929050565b6000602082840312156123c557600080fd5b8135610fd08161228a565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561240f5761240f6123d0565b604052919050565b600067ffffffffffffffff821115612431576124316123d0565b5060051b60200190565b600082601f83011261244c57600080fd5b8135602061246161245c83612417565b6123e6565b82815260059290921b8401810191818101908684111561248057600080fd5b8286015b8481101561249b5780358352918301918301612484565b509695505050505050565b6000602082840312156124b857600080fd5b813567ffffffffffffffff8111156124cf57600080fd5b6124db8482850161243b565b949350505050565b6000806000606084860312156124f857600080fd5b83356125038161228a565b925060208401359150604084013561251a8161228a565b809150509250925092565b6000806040838503121561253857600080fd5b823567ffffffffffffffff81111561254f57600080fd5b61255b8582860161243b565b95602094909401359450505050565b6001600160a01b038516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b6000602082840312156125c257600080fd5b81518015158114610fd057600080fd5b600060208083850312156125e557600080fd5b825167ffffffffffffffff8111156125fc57600080fd5b8301601f8101851361260d57600080fd5b805161261b61245c82612417565b81815260059190911b8201830190838101908783111561263a57600080fd5b928401925b828410156126585783518252928401929084019061263f565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016126a1576126a1612679565b5060010190565b600081518084526020808501945080840160005b838110156126d8578151875295820195908201906001016126bc565b509495945050505050565b6001600160a01b03831681526040602082015260006124db60408301846126a8565b60006020828403121561271757600080fd5b815160ff81168114610fd057600080fd5b60ff828116828216039081111561051b5761051b612679565b600181815b8085111561277c57816000190482111561276257612762612679565b8085161561276f57918102915b93841c9390800290612746565b509250929050565b6000826127935750600161051b565b816127a05750600061051b565b81600181146127b657600281146127c0576127dc565b600191505061051b565b60ff8411156127d1576127d1612679565b50506001821b61051b565b5060208310610133831016604e8410600b84101617156127ff575081810a61051b565b6128098383612741565b806000190482111561281d5761281d612679565b029392505050565b6000610fd060ff841683612784565b60008261285157634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561286857600080fd5b5051919050565b8181038181111561051b5761051b612679565b60006020828403121561289457600080fd5b8151610fd08161228a565b6001600160a01b03841681526060602082015260006128c160608301856126a8565b9050826040830152949350505050565b6040815260006128e460408301856126a8565b90508260208301529392505050565b60005b8381101561290e5781810151838201526020016128f6565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161294f8160178501602088016128f3565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161298c8160288401602088016128f3565b01602801949350505050565b60208152600082518060208401526129b78160408501602087016128f3565b601f01601f19169190910160400192915050565b808202811582820484141761051b5761051b612679565b8082018082111561051b5761051b612679565b600081612a0457612a04612679565b50600019019056fea26469706673582212207c075e8af177c50fc826555c2d2d7d5a88be219cd872928ba4818315db76745a64736f6c63430008130033000000000000000000000000a7f1462e0ecdeebdee4faf6681148ca96db78777000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc80000000000000000000000009198a6b1c8c11a3bd84fa2e8dad4432803f278990000000000000000000000001b197eb65de2e868492c90a0f18bd708e18aab57
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80635fc3ea0b116100f9578063908ef64611610097578063bd2af43111610071578063bd2af43114610458578063c5f956af1461047f578063c9f8437c14610492578063d547741f146104a557600080fd5b8063908ef6461461040f57806391d1485414610417578063a217fddf1461045057600080fd5b80636d7c6689116100d35780636d7c66891461039b5780637b9f76b5146103c25780637ff74381146103d557806383a2325d146103e857600080fd5b80635fc3ea0b1461034e5780636605bfda146103615780636778ff771461037457600080fd5b8063248a9ca31161016657806336568abe1161014057806336568abe1461030a5780633e48f0331461031d57806344ae7615146103305780635c975abb1461034357600080fd5b8063248a9ca3146102c15780632f2ff15d146102e45780632f865568146102f757600080fd5b8063150b7a02116101a2578063150b7a021461023a5780631677b9011461026657806316d8887a146102795780631b9a91a4146102ae57600080fd5b806301ffc9a7146101c957806302d45457146101f15780630f290a7714610230575b600080fd5b6101dc6101d7366004612260565b6104b8565b60405190151581526020015b60405180910390f35b6102187f000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc881565b6040516001600160a01b0390911681526020016101e8565b610238610521565b005b61024d61024836600461229f565b6105ba565b6040516001600160e01b031990911681526020016101e8565b61023861027436600461233e565b61062e565b6102a07f5e17fc5225d4a099df75359ce1f405503ca79498a8dc46a7d583235a0ee45c1681565b6040519081526020016101e8565b6102386102bc36600461233e565b610787565b6102a06102cf36600461236a565b60009081526002602052604090206001015490565b6102386102f2366004612383565b6108fa565b6102386103053660046123b3565b610924565b610238610318366004612383565b610c56565b61023861032b3660046124a6565b610ce2565b6102a061033e36600461236a565b610f29565b60015460ff166101dc565b61023861035c3660046124e3565b610fd7565b61023861036f3660046123b3565b611119565b6102187f0000000000000000000000009198a6b1c8c11a3bd84fa2e8dad4432803f2789981565b6102a07f94bc1596dd2b9c6f38e0b2a79ad86bf86ff14a6dac61754f3460431ad38513f581565b6102386103d03660046124e3565b611226565b6102386103e3366004612383565b61135c565b6102187f000000000000000000000000a7f1462e0ecdeebdee4faf6681148ca96db7877781565b610238611633565b6101dc610425366004612383565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6102a0600081565b6102a07f08e6d23221a158563e99a9996d0b03da373964c87a962f4a5ad91c37144ec3e081565b600354610218906001600160a01b031681565b6102386104a0366004612525565b6116c5565b6102386104b3366004612383565b611c33565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061051b57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b3360009081527fc117bb1ebd69360b203eee31a7c420997c8f8919973559106c210baeae685447602052604090205460ff166105b05760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a206f6e6c792044656672616753797374656d416044820152633236b4b760e11b60648201526084015b60405180910390fd5b6105b8611c58565b565b6000846001600160a01b03167f81397320231ab434e758e1dda00c6e210b55d17613586be81a094a544ee754d4878686866040516105fb949392919061256a565b60405180910390a2507f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b3360009081527f835dd802e3ee130b3577f13f48ef2a19a502a9cc64baf71f9727862934f7400f602052604090205460ff166106ac5760405162461bcd60e51b815260206004820152601660248201527f41737365744d616e616765723a206f6e6c7920554c500000000000000000000060448201526064016105a7565b60405163a9059cbb60e01b81526001600160a01b038381166004830152602482018390527f000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc8169063a9059cbb906044016020604051808303816000875af115801561071b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073f91906125b0565b50816001600160a01b03167f4896181ff8f4543cc00db9fe9b6fb7e6f032b7eb772c72ab1ec1b4d2e03b93698260405161077b91815260200190565b60405180910390a25050565b3360009081527fc117bb1ebd69360b203eee31a7c420997c8f8919973559106c210baeae685447602052604090205460ff166108115760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a206f6e6c792044656672616753797374656d416044820152633236b4b760e11b60648201526084016105a7565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461085e576040519150601f19603f3d011682016040523d82523d6000602084013e610863565b606091505b50509050806108b45760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016105a7565b6040518281526001600160a01b0384169033907f1f12aa8b6d492dd9b98e2b00b0b20830c2a7ded65afac13b60d169a034ae90bc906020015b60405180910390a3505050565b60008281526002602052604090206001015461091581611caa565b61091f8383611cb7565b505050565b3360009081527f2ffd32cdf6f0cb566b2aa8dbed589a202f35a89ae943936feeec4ab69e05f235602052604090205460ff166109a25760405162461bcd60e51b815260206004820152601d60248201527f41737365744d616e616765723a206f6e6c79204c697175696461746f7200000060448201526064016105a7565b6040517fd004b0360000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526000917f0000000000000000000000009198a6b1c8c11a3bd84fa2e8dad4432803f278999091169063d004b03690602401600060405180830381865afa158015610a26573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a4e91908101906125d2565b905060005b8151811015610bbd577f000000000000000000000000a7f1462e0ecdeebdee4faf6681148ca96db787776001600160a01b03166342842e0e30600360009054906101000a90046001600160a01b0316858581518110610ab457610ab4612663565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610b0e57600080fd5b505af1158015610b22573d6000803e3d6000fd5b50505050826001600160a01b03167fde0aa27286f5cb3a4ed853dc4823ead62d63e92cdf13de09d6aece56970721a4600360009054906101000a90046001600160a01b0316848481518110610b7957610b79612663565b6020026020010151604051610ba39291906001600160a01b03929092168252602082015260400190565b60405180910390a280610bb58161268f565b915050610a53565b506040517fab919ee30000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301527f0000000000000000000000009198a6b1c8c11a3bd84fa2e8dad4432803f27899169063ab919ee390602401600060405180830381600087803b158015610c3a57600080fd5b505af1158015610c4e573d6000803e3d6000fd5b505050505050565b6001600160a01b0381163314610cd45760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016105a7565b610cde8282611d59565b5050565b600260005403610d345760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105a7565b6002600055610d41611ddc565b6040517ff397cca900000000000000000000000000000000000000000000000000000000815233906001600160a01b037f0000000000000000000000009198a6b1c8c11a3bd84fa2e8dad4432803f27899169063f397cca990610daa90849086906004016126e3565b600060405180830381600087803b158015610dc457600080fd5b505af1158015610dd8573d6000803e3d6000fd5b5050505060005b8251811015610f1f577f000000000000000000000000a7f1462e0ecdeebdee4faf6681148ca96db787776001600160a01b03166342842e0e3084868581518110610e2b57610e2b612663565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610e8557600080fd5b505af1158015610e99573d6000803e3d6000fd5b50505050816001600160a01b03167ff700cab75a1c246cf0ea8484d75e076ed2f652037a06a754ce87f3c96b574ca130858481518110610edb57610edb612663565b6020026020010151604051610f059291906001600160a01b03929092168252602082015260400190565b60405180910390a280610f178161268f565b915050610ddf565b5050600160005550565b6000807f000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc86001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fae9190612705565b9050610fbb816012612728565b610fc690600a612825565b610fd09084612834565b9392505050565b3360009081527fc117bb1ebd69360b203eee31a7c420997c8f8919973559106c210baeae685447602052604090205460ff166110615760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a206f6e6c792044656672616753797374656d416044820152633236b4b760e11b60648201526084016105a7565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820184905282169063a9059cbb906044016020604051808303816000875af11580156110b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d491906125b0565b50604080518381526001600160a01b03838116602083015285169133917fcdc72153be5513b5c728acb07c44c23d23c7fec977e0595801e5ebb5ccd894a191016108ed565b3360009081527fc117bb1ebd69360b203eee31a7c420997c8f8919973559106c210baeae685447602052604090205460ff166111a35760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a206f6e6c792044656672616753797374656d416044820152633236b4b760e11b60648201526084016105a7565b600354604080516001600160a01b038085168252909216602083015233917ff0340143ecfb85c19a230e8af5986e21ce2ef530cd5f127355102a0be53b0e05910160405180910390a2600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b3360009081527fc117bb1ebd69360b203eee31a7c420997c8f8919973559106c210baeae685447602052604090205460ff166112b05760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a206f6e6c792044656672616753797374656d416044820152633236b4b760e11b60648201526084016105a7565b604051632142170760e11b81523060048201526001600160a01b038481166024830152604482018490528216906342842e0e90606401600060405180830381600087803b15801561130057600080fd5b505af1158015611314573d6000803e3d6000fd5b5050604080518581526001600160a01b038581166020830152871693503392507f29621089ef89e8ddb614edf1bba81a3d3ee576dac4970569622444ea97f0d98091016108ed565b6002600054036113ae5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105a7565b60026000556113bb611ddc565b6113c482610f29565b6040516370a0823160e01b81523360048201527f000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc86001600160a01b0316906370a0823190602401602060405180830381865afa158015611428573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144c9190612856565b101561149a5760405162461bcd60e51b815260206004820152601e60248201527f41737365744d616e616765723a206e6f7420656e6f756768206f776e6564000060448201526064016105a7565b6040517f841e48e70000000000000000000000000000000000000000000000000000000081526001600160a01b038281166004830152602482018490526000917f0000000000000000000000009198a6b1c8c11a3bd84fa2e8dad4432803f278999091169063841e48e7906044016020604051808303816000875af1158015611527573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154b9190612856565b905080156115db57611579333061156184610f29565b61156a87610f29565b611574919061286f565b611e2f565b6003546115949033906001600160a01b031661157484610f29565b6003546040518281526001600160a01b03909116907ff02c0729c049dd2e10f84a3df6601bff7b02f7e9ccf35768cb6a6e20151acb339060200160405180910390a26115e9565b6115e9333061157486610f29565b6040518381526001600160a01b0383169033907f46949d12d3042855fb3772543755a98c944d4dc0b4ded1c80805c9d3969d38169060200160405180910390a35050600160005550565b3360009081527fc117bb1ebd69360b203eee31a7c420997c8f8919973559106c210baeae685447602052604090205460ff166116bd5760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a206f6e6c792044656672616753797374656d416044820152633236b4b760e11b60648201526084016105a7565b6105b8611ee9565b6002600054036117175760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105a7565b6002600055611724611ddc565b60005b8251811015611982577f000000000000000000000000a7f1462e0ecdeebdee4faf6681148ca96db787776001600160a01b0316636352211e84838151811061177157611771612663565b60200260200101516040518263ffffffff1660e01b815260040161179791815260200190565b602060405180830381865afa9250505080156117d0575060408051601f3d908101601f191682019092526117cd91810190612882565b60015b6118415760405162461bcd60e51b8152602060048201526024808201527f41737365744d616e616765723a2063616e277420766572696679206f776e657260448201527f736869700000000000000000000000000000000000000000000000000000000060648201526084016105a7565b50336001600160a01b03167f000000000000000000000000a7f1462e0ecdeebdee4faf6681148ca96db787776001600160a01b0316636352211e85848151811061188d5761188d612663565b60200260200101516040518263ffffffff1660e01b81526004016118b391815260200190565b602060405180830381865afa1580156118d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f49190612882565b6001600160a01b0316146119705760405162461bcd60e51b815260206004820152602360248201527f41737365744d616e616765723a206e6f7420616e206f776e6572206f6620746f60448201527f6b656e000000000000000000000000000000000000000000000000000000000060648201526084016105a7565b8061197a8161268f565b915050611727565b5061198c81610f29565b6040516370a0823160e01b81523060048201527f000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc86001600160a01b0316906370a0823190602401602060405180830381865afa1580156119f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a149190612856565b1015611a625760405162461bcd60e51b815260206004820152601d60248201527f41737365744d616e616765723a206e6f7420656e6f756768205553444300000060448201526064016105a7565b60005b8251811015611aa257611a90838281518110611a8357611a83612663565b6020026020010151611f24565b80611a9a8161268f565b915050611a65565b507f000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc86001600160a01b031663a9059cbb33611adc84610f29565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611b27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b4b91906125b0565b506040517ff3c61ae60000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000009198a6b1c8c11a3bd84fa2e8dad4432803f27899169063f3c61ae690611bb59033908690869060040161289f565b600060405180830381600087803b158015611bcf57600080fd5b505af1158015611be3573d6000803e3d6000fd5b50505050336001600160a01b03167f47466c4ac4e1fa060f3549de0b43655fe690a50757c6407a878b3525cc46ac078383604051611c229291906128d1565b60405180910390a250506001600055565b600082815260026020526040902060010154611c4e81611caa565b61091f8383611d59565b611c60611fad565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b611cb48133611fff565b50565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16610cde5760008281526002602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611d153390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff1615610cde5760008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60015460ff16156105b85760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105a7565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528381166024830152604482018390527f000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc816906323b872dd906064016020604051808303816000875af1158015611ebf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee391906125b0565b50505050565b611ef1611ddc565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833611c8d565b604051632142170760e11b8152336004820152306024820152604481018290527f000000000000000000000000a7f1462e0ecdeebdee4faf6681148ca96db787776001600160a01b0316906342842e0e90606401600060405180830381600087803b158015611f9257600080fd5b505af1158015611fa6573d6000803e3d6000fd5b5050505050565b60015460ff166105b85760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016105a7565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16610cde5761203d816001600160a01b0316601461207f565b61204883602061207f565b604051602001612059929190612917565b60408051601f198184030181529082905262461bcd60e51b82526105a791600401612998565b6060600061208e8360026129cb565b6120999060026129e2565b67ffffffffffffffff8111156120b1576120b16123d0565b6040519080825280601f01601f1916602001820160405280156120db576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061211257612112612663565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061215d5761215d612663565b60200101906001600160f81b031916908160001a90535060006121818460026129cb565b61218c9060016129e2565b90505b6001811115612211577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106121cd576121cd612663565b1a60f81b8282815181106121e3576121e3612663565b60200101906001600160f81b031916908160001a90535060049490941c9361220a816129f5565b905061218f565b508315610fd05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105a7565b60006020828403121561227257600080fd5b81356001600160e01b031981168114610fd057600080fd5b6001600160a01b0381168114611cb457600080fd5b6000806000806000608086880312156122b757600080fd5b85356122c28161228a565b945060208601356122d28161228a565b935060408601359250606086013567ffffffffffffffff808211156122f657600080fd5b818801915088601f83011261230a57600080fd5b81358181111561231957600080fd5b89602082850101111561232b57600080fd5b9699959850939650602001949392505050565b6000806040838503121561235157600080fd5b823561235c8161228a565b946020939093013593505050565b60006020828403121561237c57600080fd5b5035919050565b6000806040838503121561239657600080fd5b8235915060208301356123a88161228a565b809150509250929050565b6000602082840312156123c557600080fd5b8135610fd08161228a565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561240f5761240f6123d0565b604052919050565b600067ffffffffffffffff821115612431576124316123d0565b5060051b60200190565b600082601f83011261244c57600080fd5b8135602061246161245c83612417565b6123e6565b82815260059290921b8401810191818101908684111561248057600080fd5b8286015b8481101561249b5780358352918301918301612484565b509695505050505050565b6000602082840312156124b857600080fd5b813567ffffffffffffffff8111156124cf57600080fd5b6124db8482850161243b565b949350505050565b6000806000606084860312156124f857600080fd5b83356125038161228a565b925060208401359150604084013561251a8161228a565b809150509250925092565b6000806040838503121561253857600080fd5b823567ffffffffffffffff81111561254f57600080fd5b61255b8582860161243b565b95602094909401359450505050565b6001600160a01b038516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b6000602082840312156125c257600080fd5b81518015158114610fd057600080fd5b600060208083850312156125e557600080fd5b825167ffffffffffffffff8111156125fc57600080fd5b8301601f8101851361260d57600080fd5b805161261b61245c82612417565b81815260059190911b8201830190838101908783111561263a57600080fd5b928401925b828410156126585783518252928401929084019061263f565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016126a1576126a1612679565b5060010190565b600081518084526020808501945080840160005b838110156126d8578151875295820195908201906001016126bc565b509495945050505050565b6001600160a01b03831681526040602082015260006124db60408301846126a8565b60006020828403121561271757600080fd5b815160ff81168114610fd057600080fd5b60ff828116828216039081111561051b5761051b612679565b600181815b8085111561277c57816000190482111561276257612762612679565b8085161561276f57918102915b93841c9390800290612746565b509250929050565b6000826127935750600161051b565b816127a05750600061051b565b81600181146127b657600281146127c0576127dc565b600191505061051b565b60ff8411156127d1576127d1612679565b50506001821b61051b565b5060208310610133831016604e8410600b84101617156127ff575081810a61051b565b6128098383612741565b806000190482111561281d5761281d612679565b029392505050565b6000610fd060ff841683612784565b60008261285157634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561286857600080fd5b5051919050565b8181038181111561051b5761051b612679565b60006020828403121561289457600080fd5b8151610fd08161228a565b6001600160a01b03841681526060602082015260006128c160608301856126a8565b9050826040830152949350505050565b6040815260006128e460408301856126a8565b90508260208301529392505050565b60005b8381101561290e5781810151838201526020016128f6565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161294f8160178501602088016128f3565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161298c8160288401602088016128f3565b01602801949350505050565b60208152600082518060208401526129b78160408501602087016128f3565b601f01601f19169190910160400192915050565b808202811582820484141761051b5761051b612679565b8082018082111561051b5761051b612679565b600081612a0457612a04612679565b50600019019056fea26469706673582212207c075e8af177c50fc826555c2d2d7d5a88be219cd872928ba4818315db76745a64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a7f1462e0ecdeebdee4faf6681148ca96db78777000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc80000000000000000000000009198a6b1c8c11a3bd84fa2e8dad4432803f278990000000000000000000000001b197eb65de2e868492c90a0f18bd708e18aab57
-----Decoded View---------------
Arg [0] : _nftCollectionAddress (address): 0xA7f1462e0EcdeEbDeE4FaF6681148Ca96Db78777
Arg [1] : _usdcAddress (address): 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8
Arg [2] : _balanceSheetAddress (address): 0x9198a6B1C8C11a3Bd84fA2e8DAD4432803F27899
Arg [3] : _treasuryAddress (address): 0x1b197EB65dE2e868492c90A0f18bd708E18aaB57
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000a7f1462e0ecdeebdee4faf6681148ca96db78777
Arg [1] : 000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc8
Arg [2] : 0000000000000000000000009198a6b1c8c11a3bd84fa2e8dad4432803f27899
Arg [3] : 0000000000000000000000001b197eb65de2e868492c90a0f18bd708e18aab57
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.