Source Code
Overview
ETH Balance
0 ETH
Token Holdings
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 59,827 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Burn | 7223097 | 14 hrs ago | IN | 0 ETH | 0.00080154 | ||||
Burn | 7221040 | 21 hrs ago | IN | 0 ETH | 0.00025245 | ||||
Withdraw | 7221037 | 21 hrs ago | IN | 0 ETH | 0.0003513 | ||||
Deposit Asset To... | 7221035 | 21 hrs ago | IN | 0 ETH | 0.00050933 | ||||
Burn | 7220056 | 25 hrs ago | IN | 0 ETH | 0.0000001 | ||||
Withdraw | 7220056 | 25 hrs ago | IN | 0 ETH | 0.00000013 | ||||
Deposit Asset To... | 7220047 | 25 hrs ago | IN | 0 ETH | 0.00000021 | ||||
Burn | 7216823 | 36 hrs ago | IN | 0 ETH | 0.00162166 | ||||
Withdraw | 7216820 | 36 hrs ago | IN | 0 ETH | 0.00229103 | ||||
Deposit Asset To... | 7216816 | 36 hrs ago | IN | 0 ETH | 0.00334672 | ||||
Deposit Asset To... | 7215333 | 41 hrs ago | IN | 0 ETH | 0.00148268 | ||||
Burn | 7214265 | 45 hrs ago | IN | 0 ETH | 0.00046777 | ||||
Withdraw | 7214263 | 45 hrs ago | IN | 0 ETH | 0.00066962 | ||||
Deposit Asset To... | 7214261 | 45 hrs ago | IN | 0 ETH | 0.00105649 | ||||
Burn | 7211575 | 2 days ago | IN | 0 ETH | 0.00018916 | ||||
Deposit Asset To... | 7211556 | 2 days ago | IN | 0 ETH | 0.00042345 | ||||
Deposit Asset To... | 7210065 | 2 days ago | IN | 0 ETH | 0.00038658 | ||||
Deposit Asset To... | 7210065 | 2 days ago | IN | 0 ETH | 0.00069193 | ||||
Burn | 7207862 | 2 days ago | IN | 0 ETH | 0.00010651 | ||||
Withdraw | 7207860 | 2 days ago | IN | 0 ETH | 0.00014448 | ||||
Deposit Asset To... | 7207857 | 2 days ago | IN | 0 ETH | 0.00022747 | ||||
Burn | 7207848 | 2 days ago | IN | 0 ETH | 0.00010651 | ||||
Withdraw | 7207845 | 2 days ago | IN | 0 ETH | 0.00014439 | ||||
Deposit Asset To... | 7207840 | 2 days ago | IN | 0 ETH | 0.00022742 | ||||
Burn | 7207802 | 2 days ago | IN | 0 ETH | 0.00010635 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
MockVault
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 9999 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../unstable/interfaces/InUSD.sol"; import "../unstable/interfaces/Iconfigurator.sol"; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; interface IZkOracle { function fetchPrice() external view returns (uint256); } interface IMockNonRebasingLST is IERC20{ function deposit() external payable; } contract MockVault { using SafeERC20 for IERC20; InUSD public immutable nUSD; IERC20 public immutable collateralAsset; IConfigurator public immutable configurator; uint256 poolTotalCirculation; uint256 constant liquidationMagicNumberOne = 1e20; uint256 constant liquidationMagicNumberTwo = 11e19; mapping(address => uint256) public depositedAsset; mapping(address => uint256) borrowed; mapping(address => uint256) feeStored; mapping(address => uint256) feeUpdatedAt; event DepositEther(address indexed onBehalfOf, address asset, uint256 etherAmount, uint256 assetAmount, uint256 timestamp); event DepositAsset(address indexed onBehalfOf, address asset, uint256 amount, uint256 timestamp); event WithdrawAsset(address indexed sponsor, address asset, address indexed onBehalfOf, uint256 amount, uint256 timestamp); event Mint(address indexed sponsor, address indexed onBehalfOf, uint256 amount, uint256 timestamp); event Burn(address indexed sponsor, address indexed onBehalfOf, uint256 amount, uint256 timestamp); event LiquidationRecord(address indexed provider, address indexed keeper, address indexed onBehalfOf, uint256 eusdamount, uint256 LiquidateAssetAmount, uint256 keeperReward, bool superLiquidation, uint256 timestamp); event RigidRedemption(address indexed caller, address indexed provider, uint256 peusdAmount, uint256 assetAmount, uint256 timestamp); event FeeDistribution(address indexed feeAddress, uint256 feeAmount, uint256 timestamp); constructor(address _collateral, address _configurator) { collateralAsset = IERC20(_collateral); configurator = IConfigurator(_configurator); nUSD = InUSD(configurator.nUSD()); } function totalDepositedAsset() public view virtual returns (uint256) { return collateralAsset.balanceOf(address(this)); } //******* TESTNET FUNCTION ********* function depositEtherToMint(uint256 mintAmount) external payable { // uint256 preBalance = collateralAsset.balanceOf(address(this)); IMockNonRebasingLST(address(collateralAsset)).deposit{value: msg.value}(); uint256 balance = collateralAsset.balanceOf(address(this)); depositedAsset[msg.sender] += balance - preBalance; if (mintAmount > 0) { _mintnUSD(msg.sender, msg.sender, mintAmount, getAssetPrice()); } emit DepositEther(msg.sender, address(collateralAsset), msg.value,balance - preBalance, block.timestamp); } //******* END TESTNET FUNCTION ********* /** * @notice Deposit staked ETH, update the interest distribution, can mint peUSD directly * Emits a `DepositAsset` event. * * Requirements: * - `assetAmount` Must be higher than 0. * - `mintAmount` Send 0 if deposit only, no mint of nUSD */ function depositAssetToMint(uint256 assetAmount, uint256 mintAmount) external virtual { require(assetAmount > 0, "Deposit should be > 0"); collateralAsset.safeTransferFrom(msg.sender, address(this), assetAmount); depositedAsset[msg.sender] += assetAmount; if (mintAmount > 0) { _mintnUSD(msg.sender, msg.sender, mintAmount, getAssetPrice()); } emit DepositAsset(msg.sender, address(collateralAsset), assetAmount, block.timestamp); } /** * @notice Withdraw collateral assets to an address * Emits a `WithdrawAsset` event. * * Requirements: * - `onBehalfOf` cannot be the zero address. * - `amount` Must be higher than 0. * * @dev Withdraw collateral. Check user’s collateral ratio after withdrawal, should be higher than `safeCollateralRatio` */ function withdraw(address onBehalfOf, uint256 amount) external virtual { require(onBehalfOf != address(0), "to zero address"); require(amount != 0, "zero amount"); _withdraw(msg.sender, onBehalfOf, amount); } /** * @notice The mint amount number of nUSD is minted to the address * Emits a `Mint` event. * * Requirements: * - `onBehalfOf` cannot be the zero address. */ function mint(address onBehalfOf, uint256 amount) external virtual { require(onBehalfOf != address(0), "to zero address"); require(amount != 0, "zero amount"); _mintnUSD(msg.sender, onBehalfOf, amount, getAssetPrice()); } /** * @notice Burn the amount of nUSD and payback the amount of minted nUSD * Emits a `Burn` event. * Requirements: * - `onBehalfOf` cannot be the zero address. * - `amount` Must be higher than 0. * @dev Calling the internal`_repay`function. */ function burn(address onBehalfOf, uint256 amount) external virtual { require(onBehalfOf != address(0), "to zero address"); require(amount != 0, "zero amount"); _repay(msg.sender, onBehalfOf, amount); } /** * @notice Keeper liquidates borrowers whose collateral ratio is below badCollateralRatio, using peUSD provided by Liquidation Provider. * * Requirements: * - onBehalfOf Collateral Ratio should be below badCollateralRatio * - assetAmount should be less than 50% of collateral * - provider should authorize Unstable to utilize nUSD * @dev After liquidation, borrower's debt is reduced by assetAmount * assetPrice, providers and keepers can receive up to an additional 10% liquidation reward. */ function liquidation(address provider, address onBehalfOf, uint256 assetAmount) external virtual { uint256 assetPrice = getAssetPrice(); uint256 onBehalfOfCollateralRatio = (depositedAsset[onBehalfOf] * assetPrice * 100) / getBorrowedOf(onBehalfOf); require(onBehalfOfCollateralRatio < configurator.getBadCollateralRatio(address(this)), "Borrowers collateral ratio should below badCollateralRatio"); require(assetAmount * 2 <= depositedAsset[onBehalfOf], "a max of 50% collateral can be liquidated"); require(nUSD.allowance(provider, address(this)) != 0 || msg.sender == provider, "provider should authorize to provide liquidation peUSD"); uint256 nusdAmount = (assetAmount * assetPrice) / 1e18; _repay(provider, onBehalfOf, nusdAmount); uint256 reducedAsset = assetAmount; if(onBehalfOfCollateralRatio > liquidationMagicNumberOne && onBehalfOfCollateralRatio < liquidationMagicNumberTwo) { reducedAsset = assetAmount * onBehalfOfCollateralRatio / liquidationMagicNumberOne; } if(onBehalfOfCollateralRatio >= liquidationMagicNumberTwo) { reducedAsset = assetAmount * 11 / 10; } depositedAsset[onBehalfOf] -= reducedAsset; uint256 reward2keeper; uint256 keeperRatio = configurator.vaultKeeperRatio(address(this)); if (msg.sender != provider && onBehalfOfCollateralRatio >= liquidationMagicNumberOne + keeperRatio * 1e18) { reward2keeper = assetAmount * keeperRatio / 100; collateralAsset.safeTransfer(msg.sender, reward2keeper); } collateralAsset.safeTransfer(provider, reducedAsset - reward2keeper); emit LiquidationRecord(provider, msg.sender, onBehalfOf, nusdAmount, reducedAsset, reward2keeper, false, block.timestamp); } /** * @notice Choose a Redemption Provider, Rigid Redeem `nusdAmount` of nUSD and get 1:1 value of collateral * Emits a `RigidRedemption` event. * * *Requirements: * - `provider` must be a Redemption Provider * - `provider`debt must equal to or above`nusdAmount` * @dev Service Fee for rigidRedemption `redemptionFee` is set to 0.5% by default, can be revised by DAO. */ function rigidRedemption(address provider, uint256 nusdAmount, uint256 minReceiveAmount) external virtual { require(provider != msg.sender, "CBS"); require(configurator.isRedemptionProvider(provider), "provider is not a RedemptionProvider"); require(borrowed[provider] >= nusdAmount, "nusdAmount cannot surpass providers debt"); uint256 assetPrice = getAssetPrice(); uint256 providerCollateralRatio = (depositedAsset[provider] * assetPrice * 100) / getBorrowedOf(provider); require(providerCollateralRatio >= 100 * 1e18, "The provider's collateral ratio should be not less than 100%."); _repay(msg.sender, provider, nusdAmount); uint256 collateralAmount = nusdAmount * 1e18 * (10_000 - configurator.redemptionFee()) / assetPrice / 10_000; require(collateralAmount >= minReceiveAmount, "EL"); depositedAsset[provider] -= collateralAmount; collateralAsset.safeTransfer(msg.sender, collateralAmount); emit RigidRedemption(msg.sender, provider, nusdAmount, collateralAmount, block.timestamp); } /** * @dev Refresh accrued interest fee before adding totalSupply. Check providers collateralRatio cannot below `safeCollateralRatio`after minting. Collect origination fee. */ function _mintnUSD(address _provider, address _onBehalfOf, uint256 _mintAmount, uint256 _assetPrice) internal virtual { require(poolTotalCirculation + _mintAmount <= configurator.mintVaultMaxSupply(address(this)), "exceeds cap"); _updateFee(_provider); borrowed[_provider] += _mintAmount; uint256 originationFee = getOriginationFee(_mintAmount); nUSD.mint(address(configurator), originationFee); nUSD.mint(_onBehalfOf, _mintAmount - originationFee); poolTotalCirculation += _mintAmount; _checkHealth(_provider, _assetPrice); emit Mint(_provider, _onBehalfOf, _mintAmount, block.timestamp); } /** * @dev Calculate origination fee based on pool utilization. */ function getOriginationFee(uint256 _mintAmount) public view returns(uint256) { (uint256 minOriginationFeeBps, uint256 maxOriginationFeeBps) = configurator.getOriginationFee(address(this)); uint256 poolUtilization = (poolTotalCirculation + _mintAmount) * 1e18 / configurator.mintVaultMaxSupply(address(this)); return (maxOriginationFeeBps - minOriginationFeeBps) * poolUtilization * _mintAmount / 1e18 / 10000; } /** * @notice Burn _provideramount nUSD to payback minted nUSD for _onBehalfOf. * * @dev Refresh accrued interest fee before reducing nUSDCirculation. */ function _repay(address _provider, address _onBehalfOf, uint256 _amount) internal virtual { _updateFee(_onBehalfOf); uint256 totalFee = feeStored[_onBehalfOf]; uint256 amount = borrowed[_onBehalfOf] + totalFee >= _amount ? _amount : borrowed[_onBehalfOf] + totalFee; if(amount > totalFee) { if(totalFee > 0) { nUSD.transferFrom(_provider, address(configurator), totalFee); feeStored[_onBehalfOf] = 0; } nUSD.burn(_provider, amount - totalFee); borrowed[_onBehalfOf] -= amount - totalFee; poolTotalCirculation -= amount - totalFee; } else { nUSD.transferFrom(_provider, address(configurator), amount); feeStored[_onBehalfOf] = totalFee - amount; } emit Burn(_provider, _onBehalfOf, amount, block.timestamp); } function _withdraw(address _provider, address _onBehalfOf, uint256 _amount) internal virtual { require(depositedAsset[_provider] >= _amount, "Withdraw amount exceeds deposited amount."); depositedAsset[_provider] -= _amount; collateralAsset.safeTransfer(_onBehalfOf, _amount); if (getBorrowedOf(_provider) > 0) { _checkHealth(_provider, getAssetPrice()); } emit WithdrawAsset(_provider, address(collateralAsset), _onBehalfOf, _amount, block.timestamp); } /** * @dev Get USD value of current collateral asset and minted peUSD through price oracle / Collateral asset USD value must higher than safe Collateral Ratio. */ function _checkHealth(address user, uint256 price) internal view { if (((depositedAsset[user] * price * 100) / getBorrowedOf(user)) < configurator.getSafeCollateralRatio(address(this))) revert("collateralRatio is Below safeCollateralRatio"); } function _updateFee(address user) internal { if (block.timestamp > feeUpdatedAt[user]) { feeStored[user] += _newFee(user); feeUpdatedAt[user] = block.timestamp; } } function _newFee(address user) internal view returns (uint256) { return (borrowed[user] * configurator.borrowApr(address(this)) * (block.timestamp - feeUpdatedAt[user])) / (86_400 * 365) / 10_000; } /** * @dev Return USD value of current ETH through Chainlink contract. */ function etherPrice() public view returns (uint256) { (,int price, , , ) = AggregatorV3Interface(configurator.etherOracle()).latestRoundData(); return uint256(price) * 1e10; } /** * @dev Return ETH value of collateral asset through zkOracle. */ function getAsset2EtherExchangeRate() public view returns (uint256) { return IZkOracle(getZkOracle()).fetchPrice(); } /** * @dev Get USD value of collateral asset, based on zkOracle price * ETH/USD price. */ function getAssetPrice() public view returns (uint256) { return etherPrice() * getAsset2EtherExchangeRate() / 1e18; } function getZkOracle() public view returns (address) { return configurator.zkOracleAddress(address(collateralAsset)); } /** * @dev Returns the current borrowing amount for the user, including borrowed shares and accumulated fees. * @param user The address of the user. * @return The total borrowing amount for the user. */ function getBorrowedOf(address user) public view returns (uint256) { return borrowed[user] + feeStored[user] + _newFee(user); } function getPoolTotalCirculation() public view returns (uint256) { return poolTotalCirculation; } function getAsset() external view returns (address) { return address(collateralAsset); } //View functions - frontend friendly function getCollateralRatio(address user) public view returns (uint256) { if (getBorrowedOf(user) == 0) return 10000 * 1e18; //really big number return (depositedAsset[user] * getAssetPrice() * 100) / getBorrowedOf(user); } function getOverallCollateralRatio() public view returns (uint256) { return (totalDepositedAsset() * getAssetPrice() * 100) / poolTotalCirculation; } function getLiquidateableAmount(address user) public view returns (uint256 etherAmount, uint256 nUsdAmount) { if (getCollateralRatio(user) > configurator.getSafeCollateralRatio(address(this))) return (0, 0); { etherAmount = depositedAsset[user] / 2; nUsdAmount = etherAmount * getAssetPrice() / 1e18; } } function getRedeemableAmount(address user) public view returns (uint256) { if(!configurator.isRedemptionProvider(user)) return 0; return borrowed[user]; } function getLiquidateFund(address user) public view returns (uint256 nusdAmount) { InUSD token = InUSD(configurator.nUSD()); uint256 approval = token.allowance(user, address(this)); if (approval == 0) return 0; uint256 bal = token.balanceOf(user); nusdAmount = approval > bal ? bal : approval; } function getWithdrawableAmount(address user) public view returns (uint256) { if (getBorrowedOf(user) == 0) return depositedAsset[user]; uint256 safeCollateralRatio = configurator.getSafeCollateralRatio(address(this)); if (getCollateralRatio(user) <= safeCollateralRatio) return 0; return depositedAsset[user] * (getCollateralRatio(user) - safeCollateralRatio) / getCollateralRatio(user); } function roomToCap() public view returns (uint256) { if(poolTotalCirculation >= configurator.mintVaultMaxSupply(address(this))) return 0; //deal with case where it's above cap return configurator.mintVaultMaxSupply(address(this)) - poolTotalCirculation; } function getnUsdMintableAmount(address user) public view returns (uint256 nusdAmount) { uint256 safeCollateralRatio = configurator.getSafeCollateralRatio(address(this)); if (getCollateralRatio(user) <= safeCollateralRatio) return 0; uint256 userMax = depositedAsset[user] * getAssetPrice() * 100 / safeCollateralRatio - getBorrowedOf(user); return userMax < roomToCap() ? userMax : roomToCap(); } function getnUsdMintableAmountWithDeposit(address user, uint256 deposit) public view returns (uint256 nusdAmount) { uint256 newDepositedAmount = depositedAsset[user] + deposit; uint256 safeCollateralRatio = configurator.getSafeCollateralRatio(address(this)); uint256 userMax = newDepositedAmount * getAssetPrice() * 100 / safeCollateralRatio - getBorrowedOf(user); return userMax < roomToCap() ? userMax : roomToCap(); } function getTVL() public view returns (uint256) { return totalDepositedAsset() * getAssetPrice(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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); }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.19; interface InUSD { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); function mint( address to, uint256 amount ) external returns (bool); function burn( address account, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.19; interface IConfigurator { function zkOracleAddress(address vault) external view returns (address); function vaultMintEnabled(address pool) external view returns(bool); function mintVaultMaxSupply(address pool) external view returns(uint256); function getBadCollateralRatio(address pool) external view returns(uint256); function getSafeCollateralRatio(address pool) external view returns(uint256); function borrowApr(address pool) external view returns(uint256); function vaultKeeperRatio(address pool) external view returns(uint256); function getOriginationFee(address vault) external view returns(uint256, uint256); function semiLiquidVault(address vault) external view returns(bool); function vaultBurnPaused(address pool) external view returns(bool); function becomeRedemptionProvider(bool _bool) external; function isRedemptionProvider(address user) external view returns (bool); function redemptionFee() external view returns(uint256); function flashloanFee() external view returns(uint256); function admin() external view returns(address); function nUSD() external view returns(address); function etherOracle() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
{ "remappings": [ "@chainlink/=node_modules/@chainlink/", "@ensdomains/=node_modules/@ensdomains/", "@eth-optimism/=node_modules/@eth-optimism/", "@ethereum-waffle/=node_modules/@ethereum-waffle/", "@layerzerolabs/=node_modules/@layerzerolabs/", "@openzeppelin-3/=node_modules/@openzeppelin-3/", "@openzeppelin/=node_modules/@openzeppelin/", "@uniswap/=node_modules/@uniswap/", "erc721a/=node_modules/erc721a/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-std/=lib/forge-std/src/", "hardhat-deploy/=node_modules/hardhat-deploy/", "hardhat/=node_modules/hardhat/" ], "optimizer": { "enabled": true, "runs": 9999 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
[{"inputs":[{"internalType":"address","name":"_collateral","type":"address"},{"internalType":"address","name":"_configurator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sponsor","type":"address"},{"indexed":true,"internalType":"address","name":"onBehalfOf","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"onBehalfOf","type":"address"},{"indexed":false,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"DepositAsset","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"onBehalfOf","type":"address"},{"indexed":false,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"etherAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"assetAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"DepositEther","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FeeDistribution","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"provider","type":"address"},{"indexed":true,"internalType":"address","name":"keeper","type":"address"},{"indexed":true,"internalType":"address","name":"onBehalfOf","type":"address"},{"indexed":false,"internalType":"uint256","name":"eusdamount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"LiquidateAssetAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"keeperReward","type":"uint256"},{"indexed":false,"internalType":"bool","name":"superLiquidation","type":"bool"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"LiquidationRecord","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sponsor","type":"address"},{"indexed":true,"internalType":"address","name":"onBehalfOf","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"provider","type":"address"},{"indexed":false,"internalType":"uint256","name":"peusdAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"assetAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"RigidRedemption","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sponsor","type":"address"},{"indexed":false,"internalType":"address","name":"asset","type":"address"},{"indexed":true,"internalType":"address","name":"onBehalfOf","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"WithdrawAsset","type":"event"},{"inputs":[{"internalType":"address","name":"onBehalfOf","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collateralAsset","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"configurator","outputs":[{"internalType":"contract IConfigurator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assetAmount","type":"uint256"},{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"depositAssetToMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"depositEtherToMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"depositedAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"etherPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAsset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAsset2EtherExchangeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAssetPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getBorrowedOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getCollateralRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getLiquidateFund","outputs":[{"internalType":"uint256","name":"nusdAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getLiquidateableAmount","outputs":[{"internalType":"uint256","name":"etherAmount","type":"uint256"},{"internalType":"uint256","name":"nUsdAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"getOriginationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOverallCollateralRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPoolTotalCirculation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getRedeemableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTVL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getWithdrawableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getZkOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getnUsdMintableAmount","outputs":[{"internalType":"uint256","name":"nusdAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"deposit","type":"uint256"}],"name":"getnUsdMintableAmountWithDeposit","outputs":[{"internalType":"uint256","name":"nusdAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"provider","type":"address"},{"internalType":"address","name":"onBehalfOf","type":"address"},{"internalType":"uint256","name":"assetAmount","type":"uint256"}],"name":"liquidation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"onBehalfOf","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nUSD","outputs":[{"internalType":"contract InUSD","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"provider","type":"address"},{"internalType":"uint256","name":"nusdAmount","type":"uint256"},{"internalType":"uint256","name":"minReceiveAmount","type":"uint256"}],"name":"rigidRedemption","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"roomToCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDepositedAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"onBehalfOf","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e06040523480156200001157600080fd5b50604051620038f6380380620038f68339810160408190526200003491620000dd565b6001600160a01b0380831660a052811660c081905260408051633b970e1d60e01b81529051633b970e1d916004808201926020929091908290030181865afa15801562000085573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ab919062000115565b6001600160a01b0316608052506200013a9050565b80516001600160a01b0381168114620000d857600080fd5b919050565b60008060408385031215620000f157600080fd5b620000fc83620000c0565b91506200010c60208401620000c0565b90509250929050565b6000602082840312156200012857600080fd5b6200013382620000c0565b9392505050565b60805160a05160c05161366662000290600039600081816102ae0152818161075a0152818161088d01528181610c7a01528181610dfe01528181610f47015281816112f301528181611571015281816117cc0152818161187e0152818161198b01528181611bd901528181611dff01528181611f0f01528181611fb70152818161209c0152818161238a015281816124c30152818161259b015281816126dc0152818161296701528181612b750152612fca01526000818161036801528181610494015281816106a7015281816108620152818161092b015281816109a201528181610a4301528181610b25015281816113cf0152818161140e015281816116cc0152818161173a01528181611d2201528181612e670152612eb60152600081816102f7015281816111040152818161270e015281816127880152818161299601528181612a280152612ba401526136666000f3fe6080604052600436106101cd5760003560e01c806396171e59116100f7578063c19b0f5511610095578063d8f53d3011610064578063d8f53d301461054b578063e54f08801461056b578063f3fef3a314610580578063f6777175146105a057600080fd5b8063c19b0f55146104d6578063ca0b7856146104eb578063ce0c76e71461050b578063d5e8d0e51461052b57600080fd5b80639dc29fac116100d15780639dc29fac1461044d5780639e3079551461046d578063aabaecd614610482578063abbc4217146104b657600080fd5b806396171e59146104035780639754d1dc1461042357806397b3fcaa1461043857600080fd5b80633b970e1d1161016f5780635df104721161013e5780635df104721461038c578063619cfc35146103a157806369d83b3c146103c15780636eff3e4d146103ee57600080fd5b80633b970e1d146102e557806340c10f1914610319578063584a4980146103395780635c222bad1461035957600080fd5b80631f83a516116101ab5780631f83a5161461023a57806328487a131461026f5780632b507df81461029c5780632f0bc965146102d057600080fd5b806305ad8308146101d257806315a3ba431461020557806317d145a214610225575b600080fd5b3480156101de57600080fd5b506101f26101ed366004613313565b6105c0565b6040519081526020015b60405180910390f35b34801561021157600080fd5b506101f2610220366004613313565b61060a565b34801561023157600080fd5b506101f2610676565b34801561024657600080fd5b5061025a610255366004613313565b61071f565b604080519283526020830191909152016101fc565b34801561027b57600080fd5b50610284610832565b6040516001600160a01b0390911681526020016101fc565b3480156102a857600080fd5b506102847f000000000000000000000000000000000000000000000000000000000000000081565b6102e36102de366004613330565b6108fa565b005b3480156102f157600080fd5b506102847f000000000000000000000000000000000000000000000000000000000000000081565b34801561032557600080fd5b506102e3610334366004613349565b610b82565b34801561034557600080fd5b506101f2610354366004613313565b610c3f565b34801561036557600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610284565b34801561039857600080fd5b506101f2610d7c565b3480156103ad57600080fd5b506101f26103bc366004613313565b610dc3565b3480156103cd57600080fd5b506101f26103dc366004613313565b60016020526000908152604090205481565b3480156103fa57600080fd5b506101f2610e93565b34801561040f57600080fd5b506102e361041e366004613375565b610ec6565b34801561042f57600080fd5b506000546101f2565b34801561044457600080fd5b506101f261149f565b34801561045957600080fd5b506102e3610468366004613349565b6114bb565b34801561047957600080fd5b506101f261156c565b34801561048e57600080fd5b506102847f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c257600080fd5b506102e36104d13660046133b6565b61166f565b3480156104e257600080fd5b506101f261179b565b3480156104f757600080fd5b506102e36105063660046133d8565b6118fb565b34801561051757600080fd5b506101f2610526366004613349565b611d9d565b34801561053757600080fd5b506101f2610546366004613330565b611ed2565b34801561055757600080fd5b506101f2610566366004613313565b612097565b34801561057757600080fd5b506101f2612255565b34801561058c57600080fd5b506102e361059b366004613349565b61227a565b3480156105ac57600080fd5b506101f26105bb366004613313565b61232b565b60006105cb82612468565b6001600160a01b0383166000908152600360209081526040808320546002909252909120546105fa919061343c565b610604919061343c565b92915050565b6000610615826105c0565b60000361062d575069021e19e0c9bab2400000919050565b610636826105c0565b61063e612255565b6001600160a01b038416600090815260016020526040902054610661919061344f565b61066c90606461344f565b6106049190613466565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156106f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071a91906134a1565b905090565b6040517fae91874900000000000000000000000000000000000000000000000000000000815230600482015260009081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ae91874990602401602060405180830381865afa1580156107a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c591906134a1565b6107ce8461060a565b11156107df57506000928392509050565b6001600160a01b03831660009081526001602052604090205461080490600290613466565b9150670de0b6b3a7640000610817612255565b610821908461344f565b61082b9190613466565b9050915091565b6040517f3f5068340000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526000917f000000000000000000000000000000000000000000000000000000000000000090911690633f50683490602401602060405180830381865afa1580156108d6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071a91906134ba565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561097a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099e91906134a1565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156109fb57600080fd5b505af1158015610a0f573d6000803e3d6000fd5b50506040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600093507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692506370a082319150602401602060405180830381865afa158015610a94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab891906134a1565b9050610ac482826134d7565b3360009081526001602052604081208054909190610ae390849061343c565b90915550508215610b0157610b01333385610afc612255565b61256d565b337f6a7b44958c301c33959b506daa1c81df7d298aa58fd6c510f4fd967f0eb87ce87f000000000000000000000000000000000000000000000000000000000000000034610b4f86866134d7565b604080516001600160a01b03909416845260208401929092529082015242606082015260800160405180910390a2505050565b6001600160a01b038216610bdd5760405162461bcd60e51b815260206004820152600f60248201527f746f207a65726f2061646472657373000000000000000000000000000000000060448201526064015b60405180910390fd5b80600003610c2d5760405162461bcd60e51b815260206004820152600b60248201527f7a65726f20616d6f756e740000000000000000000000000000000000000000006044820152606401610bd4565b610c3b338383610afc612255565b5050565b6040517fae91874900000000000000000000000000000000000000000000000000000000815230600482015260009081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ae91874990602401602060405180830381865afa158015610cc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce591906134a1565b905080610cf18461060a565b11610cff5750600092915050565b6000610d0a846105c0565b82610d13612255565b6001600160a01b038716600090815260016020526040902054610d36919061344f565b610d4190606461344f565b610d4b9190613466565b610d5591906134d7565b9050610d5f61179b565b8110610d7257610d6d61179b565b610d74565b805b949350505050565b6000610d86610832565b6001600160a01b0316630fdb11cf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106f6573d6000803e3d6000fd5b6040517f7890444c0000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526000917f000000000000000000000000000000000000000000000000000000000000000090911690637890444c90602401602060405180830381865afa158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6b91906134ea565b610e7757506000919050565b506001600160a01b031660009081526002602052604090205490565b60008054610e9f612255565b610ea7610676565b610eb1919061344f565b610ebc90606461344f565b61071a9190613466565b6000610ed0612255565b90506000610edd846105c0565b6001600160a01b038516600090815260016020526040902054610f0190849061344f565b610f0c90606461344f565b610f169190613466565b6040517fd54d832c0000000000000000000000000000000000000000000000000000000081523060048201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d54d832c90602401602060405180830381865afa158015610f96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fba91906134a1565b811061102e5760405162461bcd60e51b815260206004820152603a60248201527f426f72726f7765727320636f6c6c61746572616c20726174696f2073686f756c60448201527f642062656c6f7720626164436f6c6c61746572616c526174696f0000000000006064820152608401610bd4565b6001600160a01b03841660009081526001602052604090205461105284600261344f565b11156110c65760405162461bcd60e51b815260206004820152602960248201527f61206d6178206f662035302520636f6c6c61746572616c2063616e206265206c60448201527f69717569646174656400000000000000000000000000000000000000000000006064820152608401610bd4565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301523060248301527f0000000000000000000000000000000000000000000000000000000000000000169063dd62ed3e90604401602060405180830381865afa15801561114b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116f91906134a1565b1515806111845750336001600160a01b038616145b6111f65760405162461bcd60e51b815260206004820152603660248201527f70726f76696465722073686f756c6420617574686f72697a6520746f2070726f60448201527f76696465206c69717569646174696f6e207065555344000000000000000000006064820152608401610bd4565b6000670de0b6b3a764000061120b848661344f565b6112159190613466565b90506112228686836128b1565b8368056bc75e2d631000008311801561124357506805f68e8131ecf8000083105b156112695768056bc75e2d6310000061125c848761344f565b6112669190613466565b90505b6805f68e8131ecf80000831061129357600a61128686600b61344f565b6112909190613466565b90505b6001600160a01b038616600090815260016020526040812080548392906112bb9084906134d7565b90915550506040517fb300a55900000000000000000000000000000000000000000000000000000000815230600482015260009081907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b300a55990602401602060405180830381865afa158015611342573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136691906134a1565b9050336001600160a01b038a16148015906113a5575061138e81670de0b6b3a764000061344f565b6113a19068056bc75e2d6310000061343c565b8510155b156113f65760646113b6828961344f565b6113c09190613466565b91506113f66001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163384612c7b565b6114358961140484866134d7565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190612c7b565b6040805185815260208101859052908101839052600060608201524260808201526001600160a01b03808a169133918c16907fb59dc9737d55b75fc6ca7522e82d6161da5d7c8337b9ab990a5846f95b5ccdad9060a00160405180910390a4505050505050505050565b60006114a9612255565b6114b1610676565b61071a919061344f565b6001600160a01b0382166115115760405162461bcd60e51b815260206004820152600f60248201527f746f207a65726f206164647265737300000000000000000000000000000000006044820152606401610bd4565b806000036115615760405162461bcd60e51b815260206004820152600b60248201527f7a65726f20616d6f756e740000000000000000000000000000000000000000006044820152606401610bd4565b610c3b3383836128b1565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e17bbe616040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f191906134ba565b6001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561162e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611652919061352b565b505050915050806402540be400611669919061344f565b91505090565b600082116116bf5760405162461bcd60e51b815260206004820152601560248201527f4465706f7369742073686f756c64206265203e203000000000000000000000006044820152606401610bd4565b6116f46001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085612d47565b336000908152600160205260408120805484929061171390849061343c565b9091555050801561172c5761172c333383610afc612255565b604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152602081018490524281830152905133917ff80e165f76857acc123ffe20b1116e9ec31ad7f2c4ecd6f379a9cc9151b50371919081900360600190a25050565b6040517fcc143a040000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063cc143a0490602401602060405180830381865afa15801561181b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183f91906134a1565b6000541061184d5750600090565b6000546040517fcc143a040000000000000000000000000000000000000000000000000000000081523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063cc143a0490602401602060405180830381865afa1580156118cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f191906134a1565b61071a91906134d7565b336001600160a01b038416036119535760405162461bcd60e51b815260206004820152600360248201527f43425300000000000000000000000000000000000000000000000000000000006044820152606401610bd4565b6040517f7890444c0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f00000000000000000000000000000000000000000000000000000000000000001690637890444c90602401602060405180830381865afa1580156119d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f691906134ea565b611a675760405162461bcd60e51b8152602060048201526024808201527f70726f7669646572206973206e6f74206120526564656d7074696f6e50726f7660448201527f69646572000000000000000000000000000000000000000000000000000000006064820152608401610bd4565b6001600160a01b038316600090815260026020526040902054821115611af55760405162461bcd60e51b815260206004820152602860248201527f6e757364416d6f756e742063616e6e6f7420737572706173732070726f76696460448201527f65727320646562740000000000000000000000000000000000000000000000006064820152608401610bd4565b6000611aff612255565b90506000611b0c856105c0565b6001600160a01b038616600090815260016020526040902054611b3090849061344f565b611b3b90606461344f565b611b459190613466565b905068056bc75e2d63100000811015611bc65760405162461bcd60e51b815260206004820152603d60248201527f5468652070726f7669646572277320636f6c6c61746572616c20726174696f2060448201527f73686f756c64206265206e6f74206c657373207468616e20313030252e0000006064820152608401610bd4565b611bd13386866128b1565b6000612710837f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663458f58156040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c5991906134a1565b611c65906127106134d7565b611c7788670de0b6b3a764000061344f565b611c81919061344f565b611c8b9190613466565b611c959190613466565b905083811015611ce75760405162461bcd60e51b815260206004820152600260248201527f454c0000000000000000000000000000000000000000000000000000000000006044820152606401610bd4565b6001600160a01b03861660009081526001602052604081208054839290611d0f9084906134d7565b90915550611d4990506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383612c7b565b6040805186815260208101839052428183015290516001600160a01b0388169133917f1a7ab636ab77b4d93c0afba804a009a127e77def45e623e572144ca8f8a03ac59181900360600190a3505050505050565b6001600160a01b0382166000908152600160205260408120548190611dc390849061343c565b6040517fae9187490000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ae91874990602401602060405180830381865afa158015611e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6a91906134a1565b90506000611e77866105c0565b82611e80612255565b611e8a908661344f565b611e9590606461344f565b611e9f9190613466565b611ea991906134d7565b9050611eb361179b565b8110611ec657611ec161179b565b611ec8565b805b9695505050505050565b6040517f27480e5e000000000000000000000000000000000000000000000000000000008152306004820152600090819081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906327480e5e906024016040805180830381865afa158015611f55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f79919061357b565b6040517fcc143a0400000000000000000000000000000000000000000000000000000000815230600482015291935091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cc143a0490602401602060405180830381865afa158015611ffe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061202291906134a1565b85600054612030919061343c565b61204290670de0b6b3a764000061344f565b61204c9190613466565b9050612710670de0b6b3a7640000868361206687876134d7565b612070919061344f565b61207a919061344f565b6120849190613466565b61208e9190613466565b95945050505050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633b970e1d6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061211c91906134ba565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015230602483015291925060009183169063dd62ed3e90604401602060405180830381865afa158015612187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ab91906134a1565b9050806000036121bf575060009392505050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152600091908416906370a0823190602401602060405180830381865afa158015612222573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224691906134a1565b9050808211610d74578161208e565b6000670de0b6b3a7640000612268610d7c565b61227061156c565b610ebc919061344f565b6001600160a01b0382166122d05760405162461bcd60e51b815260206004820152600f60248201527f746f207a65726f206164647265737300000000000000000000000000000000006044820152606401610bd4565b806000036123205760405162461bcd60e51b815260206004820152600b60248201527f7a65726f20616d6f756e740000000000000000000000000000000000000000006044820152606401610bd4565b610c3b338383612d9e565b6000612336826105c0565b60000361235957506001600160a01b031660009081526001602052604090205490565b6040517fae9187490000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ae91874990602401602060405180830381865afa1580156123d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123fd91906134a1565b9050806124098461060a565b116124175750600092915050565b6124208361060a565b8161242a8561060a565b61243491906134d7565b6001600160a01b038516600090815260016020526040902054612457919061344f565b6124619190613466565b9392505050565b6001600160a01b038116600090815260046020526040812054612710906301e133809061249590426134d7565b6040517f9fecc37d0000000000000000000000000000000000000000000000000000000081523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639fecc37d90602401602060405180830381865afa158015612512573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061253691906134a1565b6001600160a01b038616600090815260026020526040902054612559919061344f565b612563919061344f565b61066c9190613466565b6040517fcc143a040000000000000000000000000000000000000000000000000000000081523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063cc143a0490602401602060405180830381865afa1580156125ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061260e91906134a1565b8260005461261c919061343c565b111561266a5760405162461bcd60e51b815260206004820152600b60248201527f65786365656473206361700000000000000000000000000000000000000000006044820152606401610bd4565b61267384612f27565b6001600160a01b0384166000908152600260205260408120805484929061269b90849061343c565b90915550600090506126ac83611ed2565b6040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390529192507f0000000000000000000000000000000000000000000000000000000000000000909116906340c10f19906044016020604051808303816000875af1158015612759573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061277d91906134ea565b506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166340c10f19856127b884876134d7565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561281b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283f91906134ea565b5082600080828254612851919061343c565b9091555061286190508583612f9c565b604080518481524260208201526001600160a01b0380871692908816917f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee91015b60405180910390a35050505050565b6128ba82612f27565b6001600160a01b038216600090815260036020908152604080832054600290925282205490919083906128ee90849061343c565b101561291d576001600160a01b03841660009081526002602052604090205461291890839061343c565b61291f565b825b905081811115612b3d578115612a1e576040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018490527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af11580156129df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a0391906134ea565b506001600160a01b0384166000908152600360205260408120555b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016639dc29fac86612a5885856134d7565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015612abb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612adf91906134ea565b50612aea82826134d7565b6001600160a01b03851660009081526002602052604081208054909190612b129084906134d7565b90915550612b22905082826134d7565b600080828254612b3291906134d7565b90915550612c369050565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af1158015612bed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c1191906134ea565b50612c1c81836134d7565b6001600160a01b0385166000908152600360205260409020555b604080518281524260208201526001600160a01b0380871692908816917f5d624aa9c148153ab3446c1b154f660ee7701e549fe9b62dab7171b1c80e6fa291016128a2565b6040516001600160a01b038316602482015260448101829052612d429084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526130f3565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052612d989085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612cc0565b50505050565b6001600160a01b038316600090815260016020526040902054811115612e2c5760405162461bcd60e51b815260206004820152602960248201527f576974686472617720616d6f756e742065786365656473206465706f7369746560448201527f6420616d6f756e742e00000000000000000000000000000000000000000000006064820152608401610bd4565b6001600160a01b03831660009081526001602052604081208054839290612e549084906134d7565b90915550612e8e90506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168383612c7b565b6000612e99846105c0565b1115612eb057612eb083612eab612255565b612f9c565b604080517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811682526020820184905242828401529151848316928616917f31c6c2b083b6c6fb9c8345de5c29efda3ef312a42d1bc0d4a3029465080809c1919081900360600190a3505050565b6001600160a01b038116600090815260046020526040902054421115612f9957612f5081612468565b6001600160a01b03821660009081526003602052604081208054909190612f7890849061343c565b90915550506001600160a01b03811660009081526004602052604090204290555b50565b6040517fae9187490000000000000000000000000000000000000000000000000000000081523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ae91874990602401602060405180830381865afa158015613019573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061303d91906134a1565b613046836105c0565b6001600160a01b03841660009081526001602052604090205461306a90849061344f565b61307590606461344f565b61307f9190613466565b1015610c3b5760405162461bcd60e51b815260206004820152602c60248201527f636f6c6c61746572616c526174696f2069732042656c6f772073616665436f6c60448201527f6c61746572616c526174696f00000000000000000000000000000000000000006064820152608401610bd4565b6000613148826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166131db9092919063ffffffff16565b905080516000148061316957508080602001905181019061316991906134ea565b612d425760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610bd4565b6060610d74848460008585600080866001600160a01b0316858760405161320291906135c3565b60006040518083038185875af1925050503d806000811461323f576040519150601f19603f3d011682016040523d82523d6000602084013e613244565b606091505b509150915061325587838387613260565b979650505050505050565b606083156132cf5782516000036132c8576001600160a01b0385163b6132c85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610bd4565b5081610d74565b610d7483838151156132e45781518083602001fd5b8060405162461bcd60e51b8152600401610bd491906135df565b6001600160a01b0381168114612f9957600080fd5b60006020828403121561332557600080fd5b8135612461816132fe565b60006020828403121561334257600080fd5b5035919050565b6000806040838503121561335c57600080fd5b8235613367816132fe565b946020939093013593505050565b60008060006060848603121561338a57600080fd5b8335613395816132fe565b925060208401356133a5816132fe565b929592945050506040919091013590565b600080604083850312156133c957600080fd5b50508035926020909101359150565b6000806000606084860312156133ed57600080fd5b83356133f8816132fe565b95602085013595506040909401359392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156106045761060461340d565b80820281158282048414176106045761060461340d565b60008261349c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000602082840312156134b357600080fd5b5051919050565b6000602082840312156134cc57600080fd5b8151612461816132fe565b818103818111156106045761060461340d565b6000602082840312156134fc57600080fd5b8151801515811461246157600080fd5b805169ffffffffffffffffffff8116811461352657600080fd5b919050565b600080600080600060a0868803121561354357600080fd5b61354c8661350c565b945060208601519350604086015192506060860151915061356f6080870161350c565b90509295509295909350565b6000806040838503121561358e57600080fd5b505080516020909101519092909150565b60005b838110156135ba5781810151838201526020016135a2565b50506000910152565b600082516135d581846020870161359f565b9190910192915050565b60208152600082518060208401526135fe81604085016020870161359f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212200c674bd714f4aaf789545bc71c37330b4790a2119693c2a285d337aebcc927fc64736f6c63430008130033000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c0000000000000000000000009664cc85e954062733ddb24125273330991beeee
Deployed Bytecode
0x6080604052600436106101cd5760003560e01c806396171e59116100f7578063c19b0f5511610095578063d8f53d3011610064578063d8f53d301461054b578063e54f08801461056b578063f3fef3a314610580578063f6777175146105a057600080fd5b8063c19b0f55146104d6578063ca0b7856146104eb578063ce0c76e71461050b578063d5e8d0e51461052b57600080fd5b80639dc29fac116100d15780639dc29fac1461044d5780639e3079551461046d578063aabaecd614610482578063abbc4217146104b657600080fd5b806396171e59146104035780639754d1dc1461042357806397b3fcaa1461043857600080fd5b80633b970e1d1161016f5780635df104721161013e5780635df104721461038c578063619cfc35146103a157806369d83b3c146103c15780636eff3e4d146103ee57600080fd5b80633b970e1d146102e557806340c10f1914610319578063584a4980146103395780635c222bad1461035957600080fd5b80631f83a516116101ab5780631f83a5161461023a57806328487a131461026f5780632b507df81461029c5780632f0bc965146102d057600080fd5b806305ad8308146101d257806315a3ba431461020557806317d145a214610225575b600080fd5b3480156101de57600080fd5b506101f26101ed366004613313565b6105c0565b6040519081526020015b60405180910390f35b34801561021157600080fd5b506101f2610220366004613313565b61060a565b34801561023157600080fd5b506101f2610676565b34801561024657600080fd5b5061025a610255366004613313565b61071f565b604080519283526020830191909152016101fc565b34801561027b57600080fd5b50610284610832565b6040516001600160a01b0390911681526020016101fc565b3480156102a857600080fd5b506102847f0000000000000000000000009664cc85e954062733ddb24125273330991beeee81565b6102e36102de366004613330565b6108fa565b005b3480156102f157600080fd5b506102847f000000000000000000000000ed24accc4edc6d4f72e9cc5d3afbd514668edc3881565b34801561032557600080fd5b506102e3610334366004613349565b610b82565b34801561034557600080fd5b506101f2610354366004613313565b610c3f565b34801561036557600080fd5b507f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c610284565b34801561039857600080fd5b506101f2610d7c565b3480156103ad57600080fd5b506101f26103bc366004613313565b610dc3565b3480156103cd57600080fd5b506101f26103dc366004613313565b60016020526000908152604090205481565b3480156103fa57600080fd5b506101f2610e93565b34801561040f57600080fd5b506102e361041e366004613375565b610ec6565b34801561042f57600080fd5b506000546101f2565b34801561044457600080fd5b506101f261149f565b34801561045957600080fd5b506102e3610468366004613349565b6114bb565b34801561047957600080fd5b506101f261156c565b34801561048e57600080fd5b506102847f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c81565b3480156104c257600080fd5b506102e36104d13660046133b6565b61166f565b3480156104e257600080fd5b506101f261179b565b3480156104f757600080fd5b506102e36105063660046133d8565b6118fb565b34801561051757600080fd5b506101f2610526366004613349565b611d9d565b34801561053757600080fd5b506101f2610546366004613330565b611ed2565b34801561055757600080fd5b506101f2610566366004613313565b612097565b34801561057757600080fd5b506101f2612255565b34801561058c57600080fd5b506102e361059b366004613349565b61227a565b3480156105ac57600080fd5b506101f26105bb366004613313565b61232b565b60006105cb82612468565b6001600160a01b0383166000908152600360209081526040808320546002909252909120546105fa919061343c565b610604919061343c565b92915050565b6000610615826105c0565b60000361062d575069021e19e0c9bab2400000919050565b610636826105c0565b61063e612255565b6001600160a01b038416600090815260016020526040902054610661919061344f565b61066c90606461344f565b6106049190613466565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c6001600160a01b0316906370a0823190602401602060405180830381865afa1580156106f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071a91906134a1565b905090565b6040517fae91874900000000000000000000000000000000000000000000000000000000815230600482015260009081906001600160a01b037f0000000000000000000000009664cc85e954062733ddb24125273330991beeee169063ae91874990602401602060405180830381865afa1580156107a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c591906134a1565b6107ce8461060a565b11156107df57506000928392509050565b6001600160a01b03831660009081526001602052604090205461080490600290613466565b9150670de0b6b3a7640000610817612255565b610821908461344f565b61082b9190613466565b9050915091565b6040517f3f5068340000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c811660048301526000917f0000000000000000000000009664cc85e954062733ddb24125273330991beeee90911690633f50683490602401602060405180830381865afa1580156108d6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071a91906134ba565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c6001600160a01b0316906370a0823190602401602060405180830381865afa15801561097a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099e91906134a1565b90507f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c6001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156109fb57600080fd5b505af1158015610a0f573d6000803e3d6000fd5b50506040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600093507f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c6001600160a01b031692506370a082319150602401602060405180830381865afa158015610a94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab891906134a1565b9050610ac482826134d7565b3360009081526001602052604081208054909190610ae390849061343c565b90915550508215610b0157610b01333385610afc612255565b61256d565b337f6a7b44958c301c33959b506daa1c81df7d298aa58fd6c510f4fd967f0eb87ce87f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c34610b4f86866134d7565b604080516001600160a01b03909416845260208401929092529082015242606082015260800160405180910390a2505050565b6001600160a01b038216610bdd5760405162461bcd60e51b815260206004820152600f60248201527f746f207a65726f2061646472657373000000000000000000000000000000000060448201526064015b60405180910390fd5b80600003610c2d5760405162461bcd60e51b815260206004820152600b60248201527f7a65726f20616d6f756e740000000000000000000000000000000000000000006044820152606401610bd4565b610c3b338383610afc612255565b5050565b6040517fae91874900000000000000000000000000000000000000000000000000000000815230600482015260009081906001600160a01b037f0000000000000000000000009664cc85e954062733ddb24125273330991beeee169063ae91874990602401602060405180830381865afa158015610cc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce591906134a1565b905080610cf18461060a565b11610cff5750600092915050565b6000610d0a846105c0565b82610d13612255565b6001600160a01b038716600090815260016020526040902054610d36919061344f565b610d4190606461344f565b610d4b9190613466565b610d5591906134d7565b9050610d5f61179b565b8110610d7257610d6d61179b565b610d74565b805b949350505050565b6000610d86610832565b6001600160a01b0316630fdb11cf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106f6573d6000803e3d6000fd5b6040517f7890444c0000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526000917f0000000000000000000000009664cc85e954062733ddb24125273330991beeee90911690637890444c90602401602060405180830381865afa158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6b91906134ea565b610e7757506000919050565b506001600160a01b031660009081526002602052604090205490565b60008054610e9f612255565b610ea7610676565b610eb1919061344f565b610ebc90606461344f565b61071a9190613466565b6000610ed0612255565b90506000610edd846105c0565b6001600160a01b038516600090815260016020526040902054610f0190849061344f565b610f0c90606461344f565b610f169190613466565b6040517fd54d832c0000000000000000000000000000000000000000000000000000000081523060048201529091507f0000000000000000000000009664cc85e954062733ddb24125273330991beeee6001600160a01b03169063d54d832c90602401602060405180830381865afa158015610f96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fba91906134a1565b811061102e5760405162461bcd60e51b815260206004820152603a60248201527f426f72726f7765727320636f6c6c61746572616c20726174696f2073686f756c60448201527f642062656c6f7720626164436f6c6c61746572616c526174696f0000000000006064820152608401610bd4565b6001600160a01b03841660009081526001602052604090205461105284600261344f565b11156110c65760405162461bcd60e51b815260206004820152602960248201527f61206d6178206f662035302520636f6c6c61746572616c2063616e206265206c60448201527f69717569646174656400000000000000000000000000000000000000000000006064820152608401610bd4565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301523060248301527f000000000000000000000000ed24accc4edc6d4f72e9cc5d3afbd514668edc38169063dd62ed3e90604401602060405180830381865afa15801561114b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116f91906134a1565b1515806111845750336001600160a01b038616145b6111f65760405162461bcd60e51b815260206004820152603660248201527f70726f76696465722073686f756c6420617574686f72697a6520746f2070726f60448201527f76696465206c69717569646174696f6e207065555344000000000000000000006064820152608401610bd4565b6000670de0b6b3a764000061120b848661344f565b6112159190613466565b90506112228686836128b1565b8368056bc75e2d631000008311801561124357506805f68e8131ecf8000083105b156112695768056bc75e2d6310000061125c848761344f565b6112669190613466565b90505b6805f68e8131ecf80000831061129357600a61128686600b61344f565b6112909190613466565b90505b6001600160a01b038616600090815260016020526040812080548392906112bb9084906134d7565b90915550506040517fb300a55900000000000000000000000000000000000000000000000000000000815230600482015260009081907f0000000000000000000000009664cc85e954062733ddb24125273330991beeee6001600160a01b03169063b300a55990602401602060405180830381865afa158015611342573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136691906134a1565b9050336001600160a01b038a16148015906113a5575061138e81670de0b6b3a764000061344f565b6113a19068056bc75e2d6310000061343c565b8510155b156113f65760646113b6828961344f565b6113c09190613466565b91506113f66001600160a01b037f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c163384612c7b565b6114358961140484866134d7565b6001600160a01b037f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c169190612c7b565b6040805185815260208101859052908101839052600060608201524260808201526001600160a01b03808a169133918c16907fb59dc9737d55b75fc6ca7522e82d6161da5d7c8337b9ab990a5846f95b5ccdad9060a00160405180910390a4505050505050505050565b60006114a9612255565b6114b1610676565b61071a919061344f565b6001600160a01b0382166115115760405162461bcd60e51b815260206004820152600f60248201527f746f207a65726f206164647265737300000000000000000000000000000000006044820152606401610bd4565b806000036115615760405162461bcd60e51b815260206004820152600b60248201527f7a65726f20616d6f756e740000000000000000000000000000000000000000006044820152606401610bd4565b610c3b3383836128b1565b6000807f0000000000000000000000009664cc85e954062733ddb24125273330991beeee6001600160a01b031663e17bbe616040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f191906134ba565b6001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561162e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611652919061352b565b505050915050806402540be400611669919061344f565b91505090565b600082116116bf5760405162461bcd60e51b815260206004820152601560248201527f4465706f7369742073686f756c64206265203e203000000000000000000000006044820152606401610bd4565b6116f46001600160a01b037f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c16333085612d47565b336000908152600160205260408120805484929061171390849061343c565b9091555050801561172c5761172c333383610afc612255565b604080516001600160a01b037f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c168152602081018490524281830152905133917ff80e165f76857acc123ffe20b1116e9ec31ad7f2c4ecd6f379a9cc9151b50371919081900360600190a25050565b6040517fcc143a040000000000000000000000000000000000000000000000000000000081523060048201526000907f0000000000000000000000009664cc85e954062733ddb24125273330991beeee6001600160a01b03169063cc143a0490602401602060405180830381865afa15801561181b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183f91906134a1565b6000541061184d5750600090565b6000546040517fcc143a040000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000009664cc85e954062733ddb24125273330991beeee6001600160a01b03169063cc143a0490602401602060405180830381865afa1580156118cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f191906134a1565b61071a91906134d7565b336001600160a01b038416036119535760405162461bcd60e51b815260206004820152600360248201527f43425300000000000000000000000000000000000000000000000000000000006044820152606401610bd4565b6040517f7890444c0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000009664cc85e954062733ddb24125273330991beeee1690637890444c90602401602060405180830381865afa1580156119d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f691906134ea565b611a675760405162461bcd60e51b8152602060048201526024808201527f70726f7669646572206973206e6f74206120526564656d7074696f6e50726f7660448201527f69646572000000000000000000000000000000000000000000000000000000006064820152608401610bd4565b6001600160a01b038316600090815260026020526040902054821115611af55760405162461bcd60e51b815260206004820152602860248201527f6e757364416d6f756e742063616e6e6f7420737572706173732070726f76696460448201527f65727320646562740000000000000000000000000000000000000000000000006064820152608401610bd4565b6000611aff612255565b90506000611b0c856105c0565b6001600160a01b038616600090815260016020526040902054611b3090849061344f565b611b3b90606461344f565b611b459190613466565b905068056bc75e2d63100000811015611bc65760405162461bcd60e51b815260206004820152603d60248201527f5468652070726f7669646572277320636f6c6c61746572616c20726174696f2060448201527f73686f756c64206265206e6f74206c657373207468616e20313030252e0000006064820152608401610bd4565b611bd13386866128b1565b6000612710837f0000000000000000000000009664cc85e954062733ddb24125273330991beeee6001600160a01b031663458f58156040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c5991906134a1565b611c65906127106134d7565b611c7788670de0b6b3a764000061344f565b611c81919061344f565b611c8b9190613466565b611c959190613466565b905083811015611ce75760405162461bcd60e51b815260206004820152600260248201527f454c0000000000000000000000000000000000000000000000000000000000006044820152606401610bd4565b6001600160a01b03861660009081526001602052604081208054839290611d0f9084906134d7565b90915550611d4990506001600160a01b037f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c163383612c7b565b6040805186815260208101839052428183015290516001600160a01b0388169133917f1a7ab636ab77b4d93c0afba804a009a127e77def45e623e572144ca8f8a03ac59181900360600190a3505050505050565b6001600160a01b0382166000908152600160205260408120548190611dc390849061343c565b6040517fae9187490000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b037f0000000000000000000000009664cc85e954062733ddb24125273330991beeee169063ae91874990602401602060405180830381865afa158015611e46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6a91906134a1565b90506000611e77866105c0565b82611e80612255565b611e8a908661344f565b611e9590606461344f565b611e9f9190613466565b611ea991906134d7565b9050611eb361179b565b8110611ec657611ec161179b565b611ec8565b805b9695505050505050565b6040517f27480e5e000000000000000000000000000000000000000000000000000000008152306004820152600090819081906001600160a01b037f0000000000000000000000009664cc85e954062733ddb24125273330991beeee16906327480e5e906024016040805180830381865afa158015611f55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f79919061357b565b6040517fcc143a0400000000000000000000000000000000000000000000000000000000815230600482015291935091506000906001600160a01b037f0000000000000000000000009664cc85e954062733ddb24125273330991beeee169063cc143a0490602401602060405180830381865afa158015611ffe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061202291906134a1565b85600054612030919061343c565b61204290670de0b6b3a764000061344f565b61204c9190613466565b9050612710670de0b6b3a7640000868361206687876134d7565b612070919061344f565b61207a919061344f565b6120849190613466565b61208e9190613466565b95945050505050565b6000807f0000000000000000000000009664cc85e954062733ddb24125273330991beeee6001600160a01b0316633b970e1d6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061211c91906134ba565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015230602483015291925060009183169063dd62ed3e90604401602060405180830381865afa158015612187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ab91906134a1565b9050806000036121bf575060009392505050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152600091908416906370a0823190602401602060405180830381865afa158015612222573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224691906134a1565b9050808211610d74578161208e565b6000670de0b6b3a7640000612268610d7c565b61227061156c565b610ebc919061344f565b6001600160a01b0382166122d05760405162461bcd60e51b815260206004820152600f60248201527f746f207a65726f206164647265737300000000000000000000000000000000006044820152606401610bd4565b806000036123205760405162461bcd60e51b815260206004820152600b60248201527f7a65726f20616d6f756e740000000000000000000000000000000000000000006044820152606401610bd4565b610c3b338383612d9e565b6000612336826105c0565b60000361235957506001600160a01b031660009081526001602052604090205490565b6040517fae9187490000000000000000000000000000000000000000000000000000000081523060048201526000907f0000000000000000000000009664cc85e954062733ddb24125273330991beeee6001600160a01b03169063ae91874990602401602060405180830381865afa1580156123d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123fd91906134a1565b9050806124098461060a565b116124175750600092915050565b6124208361060a565b8161242a8561060a565b61243491906134d7565b6001600160a01b038516600090815260016020526040902054612457919061344f565b6124619190613466565b9392505050565b6001600160a01b038116600090815260046020526040812054612710906301e133809061249590426134d7565b6040517f9fecc37d0000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000009664cc85e954062733ddb24125273330991beeee6001600160a01b031690639fecc37d90602401602060405180830381865afa158015612512573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061253691906134a1565b6001600160a01b038616600090815260026020526040902054612559919061344f565b612563919061344f565b61066c9190613466565b6040517fcc143a040000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000009664cc85e954062733ddb24125273330991beeee6001600160a01b03169063cc143a0490602401602060405180830381865afa1580156125ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061260e91906134a1565b8260005461261c919061343c565b111561266a5760405162461bcd60e51b815260206004820152600b60248201527f65786365656473206361700000000000000000000000000000000000000000006044820152606401610bd4565b61267384612f27565b6001600160a01b0384166000908152600260205260408120805484929061269b90849061343c565b90915550600090506126ac83611ed2565b6040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000009664cc85e954062733ddb24125273330991beeee81166004830152602482018390529192507f000000000000000000000000ed24accc4edc6d4f72e9cc5d3afbd514668edc38909116906340c10f19906044016020604051808303816000875af1158015612759573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061277d91906134ea565b506001600160a01b037f000000000000000000000000ed24accc4edc6d4f72e9cc5d3afbd514668edc38166340c10f19856127b884876134d7565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561281b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283f91906134ea565b5082600080828254612851919061343c565b9091555061286190508583612f9c565b604080518481524260208201526001600160a01b0380871692908816917f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee91015b60405180910390a35050505050565b6128ba82612f27565b6001600160a01b038216600090815260036020908152604080832054600290925282205490919083906128ee90849061343c565b101561291d576001600160a01b03841660009081526002602052604090205461291890839061343c565b61291f565b825b905081811115612b3d578115612a1e576040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301527f0000000000000000000000009664cc85e954062733ddb24125273330991beeee81166024830152604482018490527f000000000000000000000000ed24accc4edc6d4f72e9cc5d3afbd514668edc3816906323b872dd906064016020604051808303816000875af11580156129df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a0391906134ea565b506001600160a01b0384166000908152600360205260408120555b6001600160a01b037f000000000000000000000000ed24accc4edc6d4f72e9cc5d3afbd514668edc3816639dc29fac86612a5885856134d7565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015612abb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612adf91906134ea565b50612aea82826134d7565b6001600160a01b03851660009081526002602052604081208054909190612b129084906134d7565b90915550612b22905082826134d7565b600080828254612b3291906134d7565b90915550612c369050565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301527f0000000000000000000000009664cc85e954062733ddb24125273330991beeee81166024830152604482018390527f000000000000000000000000ed24accc4edc6d4f72e9cc5d3afbd514668edc3816906323b872dd906064016020604051808303816000875af1158015612bed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c1191906134ea565b50612c1c81836134d7565b6001600160a01b0385166000908152600360205260409020555b604080518281524260208201526001600160a01b0380871692908816917f5d624aa9c148153ab3446c1b154f660ee7701e549fe9b62dab7171b1c80e6fa291016128a2565b6040516001600160a01b038316602482015260448101829052612d429084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526130f3565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052612d989085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612cc0565b50505050565b6001600160a01b038316600090815260016020526040902054811115612e2c5760405162461bcd60e51b815260206004820152602960248201527f576974686472617720616d6f756e742065786365656473206465706f7369746560448201527f6420616d6f756e742e00000000000000000000000000000000000000000000006064820152608401610bd4565b6001600160a01b03831660009081526001602052604081208054839290612e549084906134d7565b90915550612e8e90506001600160a01b037f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c168383612c7b565b6000612e99846105c0565b1115612eb057612eb083612eab612255565b612f9c565b604080517f000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c6001600160a01b0390811682526020820184905242828401529151848316928616917f31c6c2b083b6c6fb9c8345de5c29efda3ef312a42d1bc0d4a3029465080809c1919081900360600190a3505050565b6001600160a01b038116600090815260046020526040902054421115612f9957612f5081612468565b6001600160a01b03821660009081526003602052604081208054909190612f7890849061343c565b90915550506001600160a01b03811660009081526004602052604090204290555b50565b6040517fae9187490000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000009664cc85e954062733ddb24125273330991beeee6001600160a01b03169063ae91874990602401602060405180830381865afa158015613019573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061303d91906134a1565b613046836105c0565b6001600160a01b03841660009081526001602052604090205461306a90849061344f565b61307590606461344f565b61307f9190613466565b1015610c3b5760405162461bcd60e51b815260206004820152602c60248201527f636f6c6c61746572616c526174696f2069732042656c6f772073616665436f6c60448201527f6c61746572616c526174696f00000000000000000000000000000000000000006064820152608401610bd4565b6000613148826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166131db9092919063ffffffff16565b905080516000148061316957508080602001905181019061316991906134ea565b612d425760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610bd4565b6060610d74848460008585600080866001600160a01b0316858760405161320291906135c3565b60006040518083038185875af1925050503d806000811461323f576040519150601f19603f3d011682016040523d82523d6000602084013e613244565b606091505b509150915061325587838387613260565b979650505050505050565b606083156132cf5782516000036132c8576001600160a01b0385163b6132c85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610bd4565b5081610d74565b610d7483838151156132e45781518083602001fd5b8060405162461bcd60e51b8152600401610bd491906135df565b6001600160a01b0381168114612f9957600080fd5b60006020828403121561332557600080fd5b8135612461816132fe565b60006020828403121561334257600080fd5b5035919050565b6000806040838503121561335c57600080fd5b8235613367816132fe565b946020939093013593505050565b60008060006060848603121561338a57600080fd5b8335613395816132fe565b925060208401356133a5816132fe565b929592945050506040919091013590565b600080604083850312156133c957600080fd5b50508035926020909101359150565b6000806000606084860312156133ed57600080fd5b83356133f8816132fe565b95602085013595506040909401359392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156106045761060461340d565b80820281158282048414176106045761060461340d565b60008261349c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000602082840312156134b357600080fd5b5051919050565b6000602082840312156134cc57600080fd5b8151612461816132fe565b818103818111156106045761060461340d565b6000602082840312156134fc57600080fd5b8151801515811461246157600080fd5b805169ffffffffffffffffffff8116811461352657600080fd5b919050565b600080600080600060a0868803121561354357600080fd5b61354c8661350c565b945060208601519350604086015192506060860151915061356f6080870161350c565b90509295509295909350565b6000806040838503121561358e57600080fd5b505080516020909101519092909150565b60005b838110156135ba5781810151838201526020016135a2565b50506000910152565b600082516135d581846020870161359f565b9190910192915050565b60208152600082518060208401526135fe81604085016020870161359f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212200c674bd714f4aaf789545bc71c37330b4790a2119693c2a285d337aebcc927fc64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c0000000000000000000000009664cc85e954062733ddb24125273330991beeee
-----Decoded View---------------
Arg [0] : _collateral (address): 0x491D755A33f6Eb77a890925414Dd5DaeA42E3D7c
Arg [1] : _configurator (address): 0x9664cC85e954062733dDb24125273330991BEEEe
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000491d755a33f6eb77a890925414dd5daea42e3d7c
Arg [1] : 0000000000000000000000009664cc85e954062733ddb24125273330991beeee
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.