Spend less on fees, more on crypto. Buy crypto easily with MoonPay Balance. 20M+ users trust MoonPay worldwide.
Ready to onboard to Ethereum? With MetaMask Portfolio, you're in control.
Don’t invest unless you’re prepared to lose all the money you invest.
Ready to simplify your web3 experience? Try the all-in-one web3 app trusted by millions worldwide.
Thousands of tokens and competitive prices from multiple aggregators, in one place.
Everyday giveaways up to 100 ETH, Lucky Spins. Deposit BONUS 300% and Cashbacks!
5000+ Slots & Live Casino Games, 50+cryptos. Register with Etherscan and get 760% deposit bonus. Win Big$, withdraw it fast.
Slots, Roulette, Poker & more - Proud sponsors of UFC, Everton & StakeF1 team!
Overview
ETH Balance
Eth Value
$1,482,642.78 (@ $3,586.24/ETH)Token Holdings
Could not find any matches!
- ERC-20 Tokens (15)0.8320673 renBTCrenBTC (renBTC)$24,300.53@29,205.00122,367.8538374 DAIDai Stableco... (DAI)$122,367.85@1.0064,084.80499 USDCUSDC (USDC)$64,084.80@1.0013.42168965 WETHWrapped Ethe... (WETH)$48,133.38@3,586.238248,000 Earn $TUSD airdrops at https://www.tenorusd.orgERC-20: $ te... (Earn $...)70,854,964,059.6489 NFTERC-20: APEN... (NFT)682 E21E213,999.99 TokenERC-20 TOKEN*[Suspicious]4,214 TokenERC-20 TOKEN*[Suspicious]7,000 TokenERC-20 TOKEN*[Suspicious]728 TokenERC-20 TOKEN*[Unsafe]7,000 TokenERC-20 TOKEN*[Unsafe]7,000 TokenERC-20 TOKEN*[Unsafe]1.7 TokenERC-20 TOKEN*[Spam]7,000 TokenERC-20 TOKEN*[Spam]NFT Tokens (17)claim rewards on apyusd.netapyusd.netERC-1155nft-dai.comDAI Mysterybox NFTERC-1155claim rewards on pseth.netpseth.netERC-1155ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]
More Info
Private Name Tags
ContractCreator
- Transactions
- Internal Transactions
- Token Transfers (ERC-20)
- NFT Transfers
- Contract
- Events
- Analytics
- Multichain Portfolio
- Cards New
Advanced Filter- Filter by Tx Type:
- Tx
- Internal Tx
- ERC-20
- NFTs
Latest 25 from a total of 11,885 transactions
Transaction Hash MethodBlockFromToWithdraw 20732090 2024-09-12 4:17:11 114 days ago 1726114631 IN 0 ETH$0.00 0.00026766 2.60850681 Withdraw 20532126 2024-08-15 6:05:11 142 days ago 1723701911 IN 0 ETH$0.00 0.00011416 1.8386338 Withdraw 20532057 2024-08-15 5:51:23 142 days ago 1723701083 IN 0 ETH$0.00 0.00011095 1.65925809 Withdraw 19478764 2024-03-20 22:03:59 289 days ago 1710972239 IN 0 ETH$0.00 0.00286615 42.84560319 Withdraw 19297862 2024-02-24 13:52:11 314 days ago 1708782731 IN 0 ETH$0.00 0.0018157 23.44631913 Withdraw 18008653 2023-08-27 21:23:11 495 days ago 1693171391 IN 0 ETH$0.00 0.00055322 11.80094383 Withdraw 18008650 2023-08-27 21:22:35 495 days ago 1693171355 IN 0 ETH$0.00 0.00077887 10.86559112 Withdraw 17963619 2023-08-21 14:12:11 501 days ago 1692627131 IN 0 ETH$0.00 0.00281954 39.32697203 Withdraw 17949653 2023-08-19 15:16:35 503 days ago 1692458195 IN 0 ETH$0.00 0.00108218 15.09935494 Withdraw 17949614 2023-08-19 15:08:35 503 days ago 1692457715 IN 0 ETH$0.00 0.00122695 17.11639718 Withdraw 17885010 2023-08-10 14:13:59 512 days ago 1691676839 IN 0 ETH$0.00 0.0018256 29.40026292 Withdraw 17707024 2023-07-16 16:25:47 537 days ago 1689524747 IN 0 ETH$0.00 0.00152434 22.78720361 Withdraw 17652251 2023-07-08 23:17:59 545 days ago 1688858279 IN 0 ETH$0.00 0.00100673 13 Withdraw 17269844 2023-05-16 4:15:11 599 days ago 1684210511 IN 0 ETH$0.00 0.00379531 56.73538406 Withdraw 16993971 2023-04-07 3:28:23 638 days ago 1680838103 IN 0 ETH$0.00 0.00142037 21.23293344 Withdraw 16989023 2023-04-06 10:33:35 639 days ago 1680777215 IN 0 ETH$0.00 0.00297912 28.49715816 Withdraw 16921053 2023-03-27 20:20:11 648 days ago 1679948411 IN 0 ETH$0.00 0.00570857 73.71515723 Withdraw 16885028 2023-03-22 18:52:11 653 days ago 1679511131 IN 0 ETH$0.00 0.0029999 28.69596664 Withdraw 16641404 2023-02-16 12:51:11 687 days ago 1676551871 IN 0 ETH$0.00 0.00205367 30.7 Withdraw 16600898 2023-02-10 20:58:47 693 days ago 1676062727 IN 0 ETH$0.00 0.00157611 23.56102786 Withdraw 16522352 2023-01-30 21:33:11 704 days ago 1675114391 IN 0 ETH$0.00 0.00121952 18.23050443 Withdraw 16294737 2022-12-30 2:55:59 736 days ago 1672368959 IN 0 ETH$0.00 0.00202756 19.76184649 Withdraw 16274393 2022-12-27 6:48:35 739 days ago 1672123715 IN 0 ETH$0.00 0.00078303 11.19324306 Withdraw 16222419 2022-12-20 0:47:59 746 days ago 1671497279 IN 0 ETH$0.00 0.00116498 11.3546289 Withdraw 16192350 2022-12-15 20:01:47 750 days ago 1671134507 IN 0 ETH$0.00 0.00169314 25.31499878 Latest 25 internal transactions (View All)
Advanced mode:Parent Transaction Hash Block FromTo20532126 2024-08-15 6:05:11 142 days ago 1723701911 0.40640657 ETH$1,457.47 20532057 2024-08-15 5:51:23 142 days ago 1723701083 0.00272841 ETH$9.78 19478764 2024-03-20 22:03:59 289 days ago 1710972239 3.00710513 ETH$10,784.20 18008650 2023-08-27 21:22:35 495 days ago 1693171355 3.00682166 ETH$10,783.18 17963619 2023-08-21 14:12:11 501 days ago 1692627131 0.49660182 ETH$1,780.93 17949653 2023-08-19 15:16:35 503 days ago 1692458195 0.32344863 ETH$1,159.96 17949614 2023-08-19 15:08:35 503 days ago 1692457715 0.00185338 ETH$6.65 17885010 2023-08-10 14:13:59 512 days ago 1691676839 0.10478513 ETH$375.78 17707024 2023-07-16 16:25:47 537 days ago 1689524747 0.30004647 ETH$1,076.04 17269844 2023-05-16 4:15:11 599 days ago 1684210511 2.29201067 ETH$8,219.70 16993971 2023-04-07 3:28:23 638 days ago 1680838103 4.18987779 ETH$15,025.90 16641404 2023-02-16 12:51:11 687 days ago 1676551871 0.20221295 ETH$725.18 16600898 2023-02-10 20:58:47 693 days ago 1676062727 0.99471558 ETH$3,567.29 16522352 2023-01-30 21:33:11 704 days ago 1675114391 0.20965347 ETH$751.87 16192350 2022-12-15 20:01:47 750 days ago 1671134507 1.04689542 ETH$3,754.42 16126965 2022-12-06 16:31:59 759 days ago 1670344319 8.75618363 ETH$31,401.76 16084025 2022-11-30 16:34:47 765 days ago 1669826087 0.01252623 ETH$44.92 16083981 2022-11-30 16:25:59 765 days ago 1669825559 0.01559605 ETH$55.93 16083937 2022-11-30 16:17:11 765 days ago 1669825031 0.09324311 ETH$334.39 16070169 2022-11-28 18:06:11 767 days ago 1669658771 1.01732965 ETH$3,648.39 15939420 2022-11-10 11:48:23 785 days ago 1668080903 400 ETH$1,434,495.26 15939420 2022-11-10 11:48:23 785 days ago 1668080903 400 ETH$1,434,495.26 15939394 2022-11-10 11:43:11 785 days ago 1668080591 397.7 ETH$1,426,246.92 15939394 2022-11-10 11:43:11 785 days ago 1668080591 397.7 ETH$1,426,246.92 15668661 2022-10-03 15:56:35 823 days ago 1664812595 31.45191719 ETH$112,794.07 Loading...LoadingContract Name:LiquidityPoolV2
Compiler Versionv0.5.12+commit.7709ece9
Optimization Enabled:Yes with 200 runs
Other Settings:default evmVersionContract Source Code (Solidity)
- interface IKToken
- - function underlying()
- - function totalSupply()
- - function balanceOf(address account)
- - function transfer(address recipient, ...
- - function allowance(address owner, add ...
- - function approve(address spender, uin ...
- - function transferFrom(address sender, ...
- - function mint(address recipient, uint ...
- - function burnFrom(address sender, uin ...
- - function addMinter(address sender)
- - function renounceMinter()
- interface ILiquidityPool
- - function ()
- - function kToken(address _token)
- - function register(IKToken _kToken)
- - function renounceOperator()
- - function deposit(address _token, uint ...
- - function withdraw(address payable _to ...
- - function borrowableBalance(address _t ...
- - function underlyingBalance(address _t ...
- interface ILender
- - function ()
- - function borrow(address _token, uint2 ...
- interface IBorrowerProxy
- - function initialize()
- - function lend(address _caller, bytes ...
- contract Initializable
- - function isConstructor()
- contract Context is Initializable
- - function _msgSender()
- - function _msgData()
- interface IERC20
- - function totalSupply()
- - function balanceOf(address account)
- - function transfer(address recipient, ...
- - function allowance(address owner, add ...
- - function approve(address spender, uin ...
- - function transferFrom(address sender, ...
- library SafeMath
- - function add(uint256 a, uint256 b)
- - function sub(uint256 a, uint256 b)
- - function sub(uint256 a, uint256 b, st ...
- - function mul(uint256 a, uint256 b)
- - function div(uint256 a, uint256 b)
- - function div(uint256 a, uint256 b, st ...
- - function mod(uint256 a, uint256 b)
- - function mod(uint256 a, uint256 b, st ...
- contract ERC20 is Initializable, C ...
- - function totalSupply()
- - function balanceOf(address account)
- - function transfer(address recipient, ...
- - function allowance(address owner, add ...
- - function approve(address spender, uin ...
- - function transferFrom(address sender, ...
- - function increaseAllowance(address sp ...
- - function decreaseAllowance(address sp ...
- - function _transfer(address sender, ad ...
- - function _mint(address account, uint2 ...
- - function _burn(address account, uint2 ...
- - function _approve(address owner, addr ...
- - function _burnFrom(address account, u ...
- library Address
- - function isContract(address account)
- - function toPayable(address account)
- - function sendValue(address payable re ...
- library SafeERC20
- - function safeTransfer(IERC20 token, a ...
- - function safeTransferFrom(IERC20 toke ...
- - function safeApprove(IERC20 token, ad ...
- - function safeIncreaseAllowance(IERC20 ...
- - function safeDecreaseAllowance(IERC20 ...
- - function callOptionalReturn(IERC20 to ...
- library Roles
- - function add(Role storage role, addre ...
- - function remove(Role storage role, ad ...
- - function has(Role storage role, addre ...
- contract KRoles is Initializable
- - function initialize(address _operator ...
- - function isOperator(address account)
- - function addOperator(address account)
- - function renounceOperator()
- - function _addOperator(address account ...
- - function _removeOperator(address acco ...
- contract CanReclaimTokens is KRole ...
- - function initialize(address _nextOwne ...
- - function blacklistRecoverableToken(ad ...
- - function recoverTokens(address _token ...
- contract ReentrancyGuard is Initia ...
- - function initialize()
- contract PauserRole is Initializab ...
- - function initialize(address sender)
- - function isPauser(address account)
- - function addPauser(address account)
- - function renouncePauser()
- - function _addPauser(address account)
- - function _removePauser(address accoun ...
- contract Pausable is Initializable ...
- - function initialize(address sender)
- - function paused()
- - function pause()
- - function unpause()
- contract Proxy
- - function ()
- - function _implementation()
- - function _delegate(address implementa ...
- - function _willFallback()
- - function _fallback()
- library OpenZeppelinUpgradesAddress
- - function isContract(address account)
- contract BaseUpgradeabilityProxy i ...
- - function _implementation()
- - function _upgradeTo(address newImplem ...
- - function _setImplementation(address n ...
- contract UpgradeabilityProxy is Ba ...
- contract BaseAdminUpgradeabilityPr ...
- - function admin()
- - function implementation()
- - function changeAdmin(address newAdmin ...
- - function upgradeTo(address newImpleme ...
- - function upgradeToAndCall(address new ...
- - function _admin()
- - function _setAdmin(address newAdmin)
- - function _willFallback()
- contract InitializableUpgradeabili ...
- - function initialize(address _logic, b ...
- contract InitializableAdminUpgrade ...
- - function initialize(address _logic, a ...
- contract LiquidityPoolV2 is ILiqui ... *
- - function ()
- - function initialize(string memory _VE ...
- - function updateDepositFee(uint256 _de ...
- - function updatePoolFee(uint256 _poolF ...
- - function updateFeePool(address payabl ...
- - function register(IKToken _kToken)
- - function deposit(address _token, uint ...
- - function withdraw(address payable _to ...
- - function borrow(address _token, uint2 ...
- - function borrowableBalance(address _t ...
- - function underlyingBalance(address _t ...
- - function migrate(ILiquidityPool _newL ...
- - function kToken(address _token)
- - function calculateWithdrawAmount(IKTo ...
- - function calculateMintAmount(IKToken ...
- - function applyFee(uint256 _feeInBips, ...
- - function calculateFee(uint256 _feeInB ...
/** *Submitted for verification at Etherscan.io on 2021-01-30 */ pragma solidity 0.5.12; interface IKToken { function underlying() external view returns (address); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, 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 sender, address recipient, uint256 amount) external returns (bool); function mint(address recipient, uint256 amount) external returns (bool); function burnFrom(address sender, uint256 amount) external; function addMinter(address sender) external; function renounceMinter() external; } interface ILiquidityPool { function () external payable; function kToken(address _token) external view returns (IKToken); function register(IKToken _kToken) external; function renounceOperator() external; function deposit(address _token, uint256 _amount) external payable returns (uint256); function withdraw(address payable _to, IKToken _kToken, uint256 _kTokenAmount) external; function borrowableBalance(address _token) external view returns (uint256); function underlyingBalance(address _token, address _owner) external view returns (uint256); } interface ILender { function () external payable; function borrow(address _token, uint256 _amount, bytes calldata _data) external; } interface IBorrowerProxy { function initialize() external; function lend(address _caller, bytes calldata _data) external payable; } /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized"); bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = true; } _; if (isTopLevelCall) { initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; assembly { cs := extcodesize(self) } return cs == 0; } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract Context is Initializable { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Initializable, Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for `sender`'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Destroys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See {_burn} and {_approve}. */ function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); } uint256[50] private ______gap; } /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. * * _Available since v2.4.0._ */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } } /** * @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 ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } 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' // solhint-disable-next-line max-line-length 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)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @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. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } /** * @title Roles * @dev Library for managing addresses assigned to a Role. */ library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev Give an account access to this role. */ function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[account] = true; } /** * @dev Remove an account's access to this role. */ function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; } /** * @dev Check if an account has this role. * @return bool */ function has(Role storage role, address account) internal view returns (bool) { require(account != address(0), "Roles: account is the zero address"); return role.bearer[account]; } } contract KRoles is Initializable { using Roles for Roles.Role; event OperatorAdded(address indexed account); event OperatorRemoved(address indexed account); Roles.Role private _operators; address[] public operators; function initialize(address _operator) public initializer { _addOperator(_operator); } modifier onlyOperator() { require(isOperator(msg.sender), "OperatorRole: caller does not have the Operator role"); _; } function isOperator(address account) public view returns (bool) { return _operators.has(account); } function addOperator(address account) public onlyOperator { _addOperator(account); } function renounceOperator() public { _removeOperator(msg.sender); } function _addOperator(address account) internal { _operators.add(account); emit OperatorAdded(account); } function _removeOperator(address account) internal { _operators.remove(account); emit OperatorRemoved(account); } } contract CanReclaimTokens is KRoles { using SafeERC20 for ERC20; mapping(address => bool) private recoverableTokensBlacklist; function initialize(address _nextOwner) public initializer { KRoles.initialize(_nextOwner); } function blacklistRecoverableToken(address _token) public onlyOperator { recoverableTokensBlacklist[_token] = true; } /// @notice Allow the owner of the contract to recover funds accidentally /// sent to the contract. To withdraw ETH, the token should be set to `0x0`. function recoverTokens(address _token) external onlyOperator { require( !recoverableTokensBlacklist[_token], "CanReclaimTokens: token is not recoverable" ); if (_token == address(0x0)) { (bool success,) = msg.sender.call.value(address(this).balance)(""); require(success, "Transfer Failed"); } else { ERC20(_token).safeTransfer( msg.sender, ERC20(_token).balanceOf(address(this)) ); } } } /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. */ contract ReentrancyGuard is Initializable { // counter to allow mutex lock with only one SSTORE operation uint256 private _guardCounter; function initialize() public initializer { // The counter starts at one to prevent changing it from zero to a non-zero // value, which is a more expensive operation. _guardCounter = 1; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { _guardCounter += 1; uint256 localCounter = _guardCounter; _; require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call"); } uint256[50] private ______gap; } contract PauserRole is Initializable, Context { using Roles for Roles.Role; event PauserAdded(address indexed account); event PauserRemoved(address indexed account); Roles.Role private _pausers; function initialize(address sender) public initializer { if (!isPauser(sender)) { _addPauser(sender); } } modifier onlyPauser() { require(isPauser(_msgSender()), "PauserRole: caller does not have the Pauser role"); _; } function isPauser(address account) public view returns (bool) { return _pausers.has(account); } function addPauser(address account) public onlyPauser { _addPauser(account); } function renouncePauser() public { _removePauser(_msgSender()); } function _addPauser(address account) internal { _pausers.add(account); emit PauserAdded(account); } function _removePauser(address account) internal { _pausers.remove(account); emit PauserRemoved(account); } uint256[50] private ______gap; } /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ contract Pausable is Initializable, Context, PauserRole { /** * @dev Emitted when the pause is triggered by a pauser (`account`). */ event Paused(address account); /** * @dev Emitted when the pause is lifted by a pauser (`account`). */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. Assigns the Pauser role * to the deployer. */ function initialize(address sender) public initializer { PauserRole.initialize(sender); _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!_paused, "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(_paused, "Pausable: not paused"); _; } /** * @dev Called by a pauser to pause, triggers stopped state. */ function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Called by a pauser to unpause, returns to normal state. */ function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(_msgSender()); } uint256[50] private ______gap; } /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ function () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas, implementation, 0, calldatasize, 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize) } default { return(0, returndatasize) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * Utility library of inline functions on addresses * * Source https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/v2.1.3/contracts/utils/Address.sol * This contract is copied here and renamed from the original to avoid clashes in the compiled artifacts * when the user imports a zos-lib contract (that transitively causes this contract to be compiled and added to the * build/artifacts folder) as well as the vanilla Address implementation from an openzeppelin version. */ library OpenZeppelinUpgradesAddress { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check * @return whether the target address is a contract */ function isContract(address account) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about how this works. // TODO Check this again before the Serenity release, because all addresses will be // contracts then. // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } /** * @title BaseUpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract BaseUpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return Address of the current implementation */ function _implementation() internal view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(OpenZeppelinUpgradesAddress.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title UpgradeabilityProxy * @dev Extends BaseUpgradeabilityProxy with a constructor for initializing * implementation and init data. */ contract UpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } } /** * @title BaseAdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } } /** * @title InitializableUpgradeabilityProxy * @dev Extends BaseUpgradeabilityProxy with an initializer for initializing * implementation and init data. */ contract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Contract initializer. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ function initialize(address _logic, bytes memory _data) public payable { require(_implementation() == address(0)); assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } } /** * @title InitializableAdminUpgradeabilityProxy * @dev Extends from BaseAdminUpgradeabilityProxy with an initializer for * initializing the implementation, admin, and init data. */ contract InitializableAdminUpgradeabilityProxy is BaseAdminUpgradeabilityProxy, InitializableUpgradeabilityProxy { /** * Contract initializer. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ function initialize(address _logic, address _admin, bytes memory _data) public payable { require(_implementation() == address(0)); InitializableUpgradeabilityProxy.initialize(_logic, _data); assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } } contract LiquidityPoolV2 is ILiquidityPool, CanReclaimTokens, ReentrancyGuard, Pausable { using SafeMath for uint256; using SafeERC20 for ERC20; mapping (address=>IKToken) public kTokens; address[] public registeredTokens; mapping (address=>bool) public registeredKTokens; string public VERSION; IBorrowerProxy borrower; uint256 public depositFeeInBips; uint256 public poolFeeInBips; uint256 public FEE_BASE = 10000; address public ETHEREUM = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE); address payable feePool; event Deposited(address indexed _depositor, address indexed _token, uint256 _amount, uint256 _mintAmount); event Withdrew(address indexed _reciever, address indexed _withdrawer, address indexed _token, uint256 _amount, uint256 _burnAmount); event Borrowed(address indexed _borrower, address indexed _token, uint256 _amount, uint256 _fee); event EtherReceived(address indexed _from, uint256 _amount); function () external payable { emit EtherReceived(_msgSender(), msg.value); } function initialize(string memory _VERSION, address _borrower) public initializer { require(_borrower != address(0), "LiquidityPoolV2: borrower proxy cannot be 0x0"); CanReclaimTokens.initialize(msg.sender); Pausable.initialize(msg.sender); ReentrancyGuard.initialize(); Pausable.initialize(msg.sender); VERSION = _VERSION; borrower = IBorrowerProxy(_borrower); borrower.initialize(); } /// @notice updates the deposit fee. /// /// @dev fee is in bips so it should /// satisfy [0 <= fee <= FEE_BASE] /// @param _depositFeeInBips The new deposit fee. /// /// @return Nothing. function updateDepositFee(uint256 _depositFeeInBips) external onlyOperator { require(_depositFeeInBips >= 0 && _depositFeeInBips <= FEE_BASE, "LiquidityPoolV1: fee should be between 0 and FEE_BASE"); depositFeeInBips = _depositFeeInBips; } /// @notice updates the pool fee. /// /// @dev fee is in bips so it should /// satisfy [0 <= fee <= FEE_BASE] /// @param _poolFeeInBips The new pool fee. /// /// @return Nothing. function updatePoolFee(uint256 _poolFeeInBips) external onlyOperator { require(_poolFeeInBips >= 0 && _poolFeeInBips <= FEE_BASE, "LiquidityPoolV1: fee should be between 0 and FEE_BASE"); poolFeeInBips = _poolFeeInBips; } /// @notice updates the fee pool. /// /// @param _newFeePool The new fee pool. /// /// @return Nothing. function updateFeePool(address payable _newFeePool) external onlyOperator { require(_newFeePool != address(0), "LiquidityPoolV2: feepool cannot be 0x0"); feePool = _newFeePool; } /// @notice register a token on this Keeper. /// /// @param _kToken The keeper ERC20 token. /// /// @return Nothing. function register(IKToken _kToken) external onlyOperator { require(address(kTokens[_kToken.underlying()]) == address(0x0), "Underlying asset should not have been registered"); require(!registeredKTokens[address(_kToken)], "kToken should not have been registered"); kTokens[_kToken.underlying()] = _kToken; registeredKTokens[address(_kToken)] = true; registeredTokens.push(address(_kToken.underlying())); blacklistRecoverableToken(_kToken.underlying()); } /// @notice Deposit funds to the Keeper Protocol. /// /// @param _token The address of the token contract. /// @param _amount The value of deposit. /// /// @return Nothing. function deposit(address _token, uint256 _amount) external payable nonReentrant whenNotPaused returns (uint256) { IKToken kToken = kTokens[_token]; require(address(kToken) != address(0x0), "Token is not registered"); require(_amount > 0, "Deposit amount should be greater than 0"); if (_token != ETHEREUM) { require(msg.value == 0, "LiquidityPoolV2: Should not allow ETH deposits during ERC20 token deposits"); ERC20(_token).safeTransferFrom(msg.sender, address(this), _amount); } else { require(_amount == msg.value, "Incorrect eth amount"); } uint256 mintAmount = calculateMintAmount(kToken, _token, _amount); kToken.mint(msg.sender, mintAmount); emit Deposited(msg.sender, _token, _amount, mintAmount); return mintAmount; } /// @notice Withdraw funds from the Compound Protocol. /// /// @param _to The address of the amount receiver. /// @param _kToken The address of the kToken contract. /// @param _kTokenAmount The value of the kToken amount to be burned. /// /// @return Nothing. function withdraw(address payable _to, IKToken _kToken, uint256 _kTokenAmount) external nonReentrant whenNotPaused { require(registeredKTokens[address(_kToken)], "kToken is not registered"); require(_kTokenAmount > 0, "Withdraw amount should be greater than 0"); address token = _kToken.underlying(); uint256 amount = calculateWithdrawAmount(_kToken, token, _kTokenAmount); _kToken.burnFrom(msg.sender, _kTokenAmount); if (token != ETHEREUM) { ERC20(token).safeTransfer(_to, amount); } else { (bool success,) = _to.call.value(amount)(""); require(success, "Transfer Failed"); } emit Withdrew(_to, msg.sender, token, amount, _kTokenAmount); } /// @notice borrow assets from this LP, and return them within the same transaction. /// /// @param _token The address of the token contract. /// @param _amount The amont of token. /// @param _data The implementation specific data for the Borrower. /// /// @return Nothing. function borrow(address _token, uint256 _amount, bytes calldata _data) external nonReentrant whenNotPaused { require(address(kTokens[_token]) != address(0x0), "Token is not registered"); uint256 initialBalance = borrowableBalance(_token); if (_token != ETHEREUM) { ERC20(_token).safeTransfer(msg.sender, _amount); } else { (bool success,) = msg.sender.call.value(_amount)(""); require(success, "LiquidityPoolV1: failed to send funds to the borrower"); } borrower.lend(msg.sender, _data); uint256 finalBalance = borrowableBalance(_token); require(finalBalance >= initialBalance, "Borrower failed to return the borrowed funds"); uint256 fee = finalBalance.sub(initialBalance); uint256 poolFee = calculateFee(poolFeeInBips, fee); emit Borrowed(msg.sender, _token, _amount, fee); if (_token != ETHEREUM) { ERC20(_token).safeTransfer(feePool, poolFee); } else { (bool success,) = feePool.call.value(poolFee)(""); require(success, "LiquidityPoolV1: failed to send funds to the fee pool"); } } /// @notice Calculate the given token's outstanding balance of this contract. /// /// @param _token The address of the token contract. /// /// @return Outstanding balance of the given token. function borrowableBalance(address _token) public view returns (uint256) { if (_token == ETHEREUM) { return address(this).balance; } return ERC20(_token).balanceOf(address(this)); } /// @notice Calculate the given owner's outstanding balance for the given token on this contract. /// /// @param _token The address of the token contract. /// @param _owner The address of the token contract. /// /// @return Owner's outstanding balance of the given token. function underlyingBalance(address _token, address _owner) public view returns (uint256) { uint256 kBalance = kTokens[_token].balanceOf(_owner); uint256 kSupply = kTokens[_token].totalSupply(); if (kBalance == 0) { return 0; } return borrowableBalance(_token).mul(kBalance).div(kSupply); } /// @notice Migrate funds to the new liquidity provider. /// /// @param _newLP The address of the new LiquidityPool contract. /// /// @return Outstanding balance of the given token. function migrate(ILiquidityPool _newLP) public onlyOperator { for (uint256 i = 0; i < registeredTokens.length; i++) { address token = registeredTokens[i]; kTokens[token].addMinter(address(_newLP)); kTokens[token].renounceMinter(); _newLP.register(kTokens[token]); if (token != ETHEREUM) { ERC20(token).safeTransfer(address(_newLP), borrowableBalance(token)); } else { (bool success,) = address(_newLP).call.value(borrowableBalance(token))(""); require(success, "Transfer Failed"); } } _newLP.renounceOperator(); } // returns the corresponding kToken for the given underlying token if it exists. function kToken(address _token) external view returns (IKToken) { return kTokens[_token]; } /// Calculates the amount that will be withdrawn when the given amount of kToken /// is burnt. /// @dev used in the withdraw() function to calculate the amount that will be /// withdrawn. function calculateWithdrawAmount(IKToken _kToken, address _token, uint256 _kTokenAmount) internal view returns (uint256) { uint256 kTokenSupply = _kToken.totalSupply(); require(kTokenSupply != 0, "No KTokens to be burnt"); uint256 initialBalance = borrowableBalance(_token); return _kTokenAmount.mul(initialBalance).div(_kToken.totalSupply()); } /// Calculates the amount of kTokens that will be minted when the given amount /// is deposited. /// @dev used in the deposit() function to calculate the amount of kTokens that /// will be minted. function calculateMintAmount(IKToken _kToken, address _token, uint256 _depositAmount) internal view returns (uint256) { // The borrow balance includes the deposit amount, which is removed here. uint256 initialBalance = borrowableBalance(_token).sub(_depositAmount); uint256 kTokenSupply = _kToken.totalSupply(); if (kTokenSupply == 0) { return _depositAmount; } // mintAmoount = amountDeposited * (1-fee) * kPool /(pool + amountDeposited * fee) return (applyFee(depositFeeInBips, _depositAmount).mul(kTokenSupply)) .div(initialBalance.add( calculateFee(depositFeeInBips, _depositAmount) )); } /// Applies the fee by subtracting fees from the amount and returns /// the amount after deducting the fee. /// @dev it calculates (1 - fee) * amount function applyFee(uint256 _feeInBips, uint256 _amount) internal view returns (uint256) { return _amount.mul(FEE_BASE.sub(_feeInBips)).div(FEE_BASE); } /// Calculates the fee amount. /// @dev it calculates fee * amount function calculateFee(uint256 _feeInBips, uint256 _amount) internal view returns (uint256) { return _amount.mul(_feeInBips).div(FEE_BASE); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_borrower","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"Borrowed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_depositor","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"EtherReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"OperatorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"OperatorRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"PauserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"PauserRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_reciever","type":"address"},{"indexed":true,"internalType":"address","name":"_withdrawer","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_burnAmount","type":"uint256"}],"name":"Withdrew","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":true,"inputs":[],"name":"ETHEREUM","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FEE_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addPauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"blacklistRecoverableToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"borrow","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"borrowableBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"depositFeeInBips","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_VERSION","type":"string"},{"internalType":"address","name":"_borrower","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isPauser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"kToken","outputs":[{"internalType":"contract IKToken","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"kTokens","outputs":[{"internalType":"contract IKToken","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"contract ILiquidityPool","name":"_newLP","type":"address"}],"name":"migrate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"operators","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"poolFeeInBips","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract IKToken","name":"_kToken","type":"address"}],"name":"register","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"registeredKTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"registeredTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renouncePauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"underlyingBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_depositFeeInBips","type":"uint256"}],"name":"updateDepositFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"_newFeePool","type":"address"}],"name":"updateFeePool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_poolFeeInBips","type":"uint256"}],"name":"updatePoolFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"contract IKToken","name":"_kToken","type":"address"},{"internalType":"uint256","name":"_kTokenAmount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405261271060d65560d780546001600160a01b03191673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1790556135ea8061003f6000396000f3fe6080604052600436106101f95760003560e01c806382dc1ec41161010d578063c5b1fad1116100a0578063ecefc7051161006f578063ecefc7051461082d578063f65d901c14610842578063f7cdf47c14610875578063fc5eb0df1461088a578063ffa1ad74146108c5576101f9565b8063c5b1fad11461075a578063ce5494bb1461078d578063d9caed12146107c0578063e28d490614610803576101f9565b80639a0ba2ea116100dc5780639a0ba2ea146106be578063aef67d78146106e8578063c2cac04b146106fd578063c4d66de814610727576101f9565b806382dc1ec414610610578063834edf41146106435780638456cb59146106765780639870d7fe1461068b576101f9565b806347e86662116101905780636e2246a71161015f5780636e2246a7146104635780636ef8d66d146104f5578063736158d01461050a5780637ab4339d1461053d5780638129fc1c146105fb576101f9565b806347e86662146103995780635c975abb146103e85780636d16acfe146103fd5780636d70f7ae14610430576101f9565b80633f4ba83a116101cc5780633f4ba83a146102de5780634420e486146102f357806346fbf68e1461032657806347e7ef241461036d576101f9565b8063017def57146102435780630534e74e1461026f57806316114acd146102965780632ab6f8db146102c9575b61020161094f565b6001600160a01b03167f1e57e3bb474320be3d2c77138f75b7c3941292d647f5f9634e33a8e94e0e069b346040518082815260200191505060405180910390a2005b34801561024f57600080fd5b5061026d6004803603602081101561026657600080fd5b5035610954565b005b34801561027b57600080fd5b506102846109de565b60408051918252519081900360200190f35b3480156102a257600080fd5b5061026d600480360360208110156102b957600080fd5b50356001600160a01b03166109e4565b3480156102d557600080fd5b5061026d610bb6565b3480156102ea57600080fd5b5061026d610bc1565b3480156102ff57600080fd5b5061026d6004803603602081101561031657600080fd5b50356001600160a01b0316610caa565b34801561033257600080fd5b506103596004803603602081101561034957600080fd5b50356001600160a01b0316610fc2565b604080519115158252519081900360200190f35b6102846004803603604081101561038357600080fd5b506001600160a01b038135169060200135610fdd565b3480156103a557600080fd5b506103cc600480360360208110156103bc57600080fd5b50356001600160a01b03166112ce565b604080516001600160a01b039092168252519081900360200190f35b3480156103f457600080fd5b506103596112e9565b34801561040957600080fd5b506103cc6004803603602081101561042057600080fd5b50356001600160a01b03166112f2565b34801561043c57600080fd5b506103596004803603602081101561045357600080fd5b50356001600160a01b0316611310565b34801561046f57600080fd5b5061026d6004803603606081101561048657600080fd5b6001600160a01b03823516916020810135918101906060810160408201356401000000008111156104b657600080fd5b8201836020820111156104c857600080fd5b803590602001918460018302840111640100000000831117156104ea57600080fd5b509092509050611323565b34801561050157600080fd5b5061026d611727565b34801561051657600080fd5b506102846004803603602081101561052d57600080fd5b50356001600160a01b0316611737565b34801561054957600080fd5b5061026d6004803603604081101561056057600080fd5b81019060208101813564010000000081111561057b57600080fd5b82018360208201111561058d57600080fd5b803590602001918460018302840111640100000000831117156105af57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506117d09050565b34801561060757600080fd5b5061026d611965565b34801561061c57600080fd5b5061026d6004803603602081101561063357600080fd5b50356001600160a01b0316611a0b565b34801561064f57600080fd5b506103596004803603602081101561066657600080fd5b50356001600160a01b0316611a5a565b34801561068257600080fd5b5061026d611a6f565b34801561069757600080fd5b5061026d600480360360208110156106ae57600080fd5b50356001600160a01b0316611b36565b3480156106ca57600080fd5b506103cc600480360360208110156106e157600080fd5b5035611b83565b3480156106f457600080fd5b50610284611baa565b34801561070957600080fd5b5061026d6004803603602081101561072057600080fd5b5035611bb0565b34801561073357600080fd5b5061026d6004803603602081101561074a57600080fd5b50356001600160a01b0316611c3a565b34801561076657600080fd5b5061026d6004803603602081101561077d57600080fd5b50356001600160a01b0316611cf0565b34801561079957600080fd5b5061026d600480360360208110156107b057600080fd5b50356001600160a01b0316611d9b565b3480156107cc57600080fd5b5061026d600480360360608110156107e357600080fd5b506001600160a01b03813581169160208101359091169060400135612088565b34801561080f57600080fd5b506103cc6004803603602081101561082657600080fd5b50356123e4565b34801561083957600080fd5b506102846123f1565b34801561084e57600080fd5b5061026d6004803603602081101561086557600080fd5b50356001600160a01b03166123f7565b34801561088157600080fd5b506103cc61245f565b34801561089657600080fd5b50610284600480360360408110156108ad57600080fd5b506001600160a01b038135811691602001351661246e565b3480156108d157600080fd5b506108da6125bd565b6040805160208082528351818301528351919283929083019185019080838360005b838110156109145781810151838201526020016108fc565b50505050905090810190601f1680156109415780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b335b90565b61095d33611310565b6109985760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b60d6548111156109d95760405162461bcd60e51b81526004018080602001828103825260358152602001806133e36035913960400191505060405180910390fd5b60d455565b60d55481565b6109ed33611310565b610a285760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b6001600160a01b03811660009081526035602052604090205460ff1615610a805760405162461bcd60e51b815260040180806020018281038252602a8152602001806132b6602a913960400191505060405180910390fd5b6001600160a01b038116610b245760405160009033903031908381818185875af1925050503d8060008114610ad1576040519150601f19603f3d011682016040523d82523d6000602084013e610ad6565b606091505b5050905080610b1e576040805162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8811985a5b1959608a1b604482015290519081900360640190fd5b50610bb3565b604080516370a0823160e01b81523060048201529051610bb39133916001600160a01b038516916370a08231916024808301926020929190829003018186803b158015610b7057600080fd5b505afa158015610b84573d6000803e3d6000fd5b505050506040513d6020811015610b9a57600080fd5b50516001600160a01b038416919063ffffffff61264b16565b50565b610bbf3361269d565b565b610bd1610bcc61094f565b610fc2565b610c0c5760405162461bcd60e51b815260040180806020018281038252603081526020018061325f6030913960400191505060405180910390fd5b609c5460ff16610c5a576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b609c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610c8d61094f565b604080516001600160a01b039092168252519081900360200190a1565b610cb333611310565b610cee5760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b60006001600160a01b031660cf6000836001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3657600080fd5b505afa158015610d4a573d6000803e3d6000fd5b505050506040513d6020811015610d6057600080fd5b50516001600160a01b0390811682526020820192909252604001600020541614610dbb5760405162461bcd60e51b81526004018080602001828103825260308152602001806135126030913960400191505060405180910390fd5b6001600160a01b038116600090815260d1602052604090205460ff1615610e135760405162461bcd60e51b815260040180806020018281038252602681526020018061330d6026913960400191505060405180910390fd5b8060cf6000836001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610e5157600080fd5b505afa158015610e65573d6000803e3d6000fd5b505050506040513d6020811015610e7b57600080fd5b50516001600160a01b0390811682526020808301939093526040918201600090812080546001600160a01b03191695831695909517909455841680845260d1835292819020805460ff191660011790558051636f307dc360e01b8152905160d09392636f307dc39260048082019391829003018186803b158015610efe57600080fd5b505afa158015610f12573d6000803e3d6000fd5b505050506040513d6020811015610f2857600080fd5b5051815460018101835560009283526020928390200180546001600160a01b0319166001600160a01b0392831617905560408051636f307dc360e01b81529051610bb39392851692636f307dc39260048082019391829003018186803b158015610f9157600080fd5b505afa158015610fa5573d6000803e3d6000fd5b505050506040513d6020811015610fbb57600080fd5b50516123f7565b6000610fd560698363ffffffff6126e516565b90505b919050565b6036805460010190819055609c546000919060ff1615611037576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001600160a01b03808516600090815260cf6020526040902054168061109e576040805162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc81b9bdd081c9959da5cdd195c9959604a1b604482015290519081900360640190fd5b600084116110dd5760405162461bcd60e51b815260040180806020018281038252602781526020018061328f6027913960400191505060405180910390fd5b60d7546001600160a01b0386811691161461114f57341561112f5760405162461bcd60e51b815260040180806020018281038252604a81526020018061356c604a913960600191505060405180910390fd5b61114a6001600160a01b03861633308763ffffffff61274c16565b61119a565b34841461119a576040805162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd08195d1a08185b5bdd5b9d60621b604482015290519081900360640190fd5b60006111a78287876127a6565b604080516340c10f1960e01b81523360048201526024810183905290519192506001600160a01b038416916340c10f19916044808201926020929091908290030181600087803b1580156111fa57600080fd5b505af115801561120e573d6000803e3d6000fd5b505050506040513d602081101561122457600080fd5b5050604080518681526020810183905281516001600160a01b0389169233927ff5681f9d0db1b911ac18ee83d515a1cf1051853a9eae418316a2fdf7dea427c5929081900390910190a392505060365481146112c7576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5092915050565b60cf602052600090815260409020546001600160a01b031681565b609c5460ff1690565b6001600160a01b03908116600090815260cf60205260409020541690565b6000610fd560338363ffffffff6126e516565b6036805460010190819055609c5460ff1615611379576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001600160a01b03858116600090815260cf6020526040902054166113df576040805162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc81b9bdd081c9959da5cdd195c9959604a1b604482015290519081900360640190fd5b60006113ea86611737565b60d7549091506001600160a01b038781169116146114215761141c6001600160a01b038716338763ffffffff61264b16565b6114aa565b604051600090339087908381818185875af1925050503d8060008114611463576040519150601f19603f3d011682016040523d82523d6000602084013e611468565b606091505b50509050806114a85760405162461bcd60e51b815260040180806020018281038252603581526020018061338d6035913960400191505060405180910390fd5b505b60d3546040805163356eb6af60e21b8152336004820181815260248301938452604483018890526001600160a01b039094169363d5badabc9391928992899291606401848480828437600081840152601f19601f820116905080830192505050945050505050600060405180830381600087803b15801561152a57600080fd5b505af115801561153e573d6000803e3d6000fd5b50505050600061154d87611737565b90508181101561158e5760405162461bcd60e51b815260040180806020018281038252602c815260200180613475602c913960400191505060405180910390fd5b60006115a0828463ffffffff61287716565b905060006115b060d554836128b9565b604080518a81526020810185905281519293506001600160a01b038c169233927fc14e9e6b4d98a542b05a0f6b64acd5f4cbdb914be88432d87486b664e97071a7928290030190a360d7546001600160a01b038a81169116146116325760d85461162d906001600160a01b038b811691168363ffffffff61264b16565b6116c6565b60d8546040516000916001600160a01b03169083908381818185875af1925050503d806000811461167f576040519150601f19603f3d011682016040523d82523d6000602084013e611684565b606091505b50509050806116c45760405162461bcd60e51b81526004018080602001828103825260358152602001806134186035913960400191505060405180910390fd5b505b505050506036548114611720576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050505050565b610bbf61173261094f565b6128d3565b60d7546000906001600160a01b038381169116141561175857503031610fd8565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b15801561179e57600080fd5b505afa1580156117b2573d6000803e3d6000fd5b505050506040513d60208110156117c857600080fd5b505192915050565b600054610100900460ff16806117e957506117e961291b565b806117f7575060005460ff16155b6118325760405162461bcd60e51b815260040180806020018281038252602e8152602001806134e4602e913960400191505060405180910390fd5b600054610100900460ff1615801561185d576000805460ff1961ff0019909116610100171660011790555b6001600160a01b0382166118a25760405162461bcd60e51b815260040180806020018281038252602d8152602001806132e0602d913960400191505060405180910390fd5b6118ab33612921565b6118b433611c3a565b6118bc611965565b6118c533611c3a565b82516118d89060d29060208601906131c6565b5060d380546001600160a01b0319166001600160a01b0384811691909117918290556040805163204a7f0760e21b815290519290911691638129fc1c9160048082019260009290919082900301818387803b15801561193657600080fd5b505af115801561194a573d6000803e3d6000fd5b505050508015611960576000805461ff00191690555b505050565b600054610100900460ff168061197e575061197e61291b565b8061198c575060005460ff16155b6119c75760405162461bcd60e51b815260040180806020018281038252602e8152602001806134e4602e913960400191505060405180910390fd5b600054610100900460ff161580156119f2576000805460ff1961ff0019909116610100171660011790555b60016036558015610bb3576000805461ff001916905550565b611a16610bcc61094f565b611a515760405162461bcd60e51b815260040180806020018281038252603081526020018061325f6030913960400191505060405180910390fd5b610bb3816129cc565b60d16020526000908152604090205460ff1681565b611a7a610bcc61094f565b611ab55760405162461bcd60e51b815260040180806020018281038252603081526020018061325f6030913960400191505060405180910390fd5b609c5460ff1615611b00576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b609c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610c8d61094f565b611b3f33611310565b611b7a5760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b610bb381612a14565b60d08181548110611b9057fe5b6000918252602090912001546001600160a01b0316905081565b60d45481565b611bb933611310565b611bf45760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b60d654811115611c355760405162461bcd60e51b81526004018080602001828103825260358152602001806133e36035913960400191505060405180910390fd5b60d555565b600054610100900460ff1680611c535750611c5361291b565b80611c61575060005460ff16155b611c9c5760405162461bcd60e51b815260040180806020018281038252602e8152602001806134e4602e913960400191505060405180910390fd5b600054610100900460ff16158015611cc7576000805460ff1961ff0019909116610100171660011790555b611cd082612a5c565b609c805460ff191690558015611cec576000805461ff00191690555b5050565b611cf933611310565b611d345760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b6001600160a01b038116611d795760405162461bcd60e51b81526004018080602001828103825260268152602001806133676026913960400191505060405180910390fd5b60d880546001600160a01b0319166001600160a01b0392909216919091179055565b611da433611310565b611ddf5760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b60005b60d05481101561203857600060d08281548110611dfb57fe5b60009182526020808320909101546001600160a01b0390811680845260cf9092526040808420548151634c1d96ab60e11b8152888416600482015291519395509091169263983b2d569260248084019382900301818387803b158015611e6057600080fd5b505af1158015611e74573d6000803e3d6000fd5b5050506001600160a01b03808316600090815260cf6020526040808220548151639865027560e01b81529151931693506398650275926004808301939282900301818387803b158015611ec657600080fd5b505af1158015611eda573d6000803e3d6000fd5b505050506001600160a01b03818116600090815260cf6020526040808220548151632210724360e11b81529084166004820152905192861692634420e4869260248084019391929182900301818387803b158015611f3757600080fd5b505af1158015611f4b573d6000803e3d6000fd5b505060d7546001600160a01b038481169116149150611f8f905057611f8a83611f7383611737565b6001600160a01b038416919063ffffffff61264b16565b61202f565b6000836001600160a01b0316611fa483611737565b604051600081818185875af1925050503d8060008114611fe0576040519150601f19603f3d011682016040523d82523d6000602084013e611fe5565b606091505b505090508061202d576040805162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8811985a5b1959608a1b604482015290519081900360640190fd5b505b50600101611de2565b50806001600160a01b0316632ab6f8db6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561207457600080fd5b505af1158015611720573d6000803e3d6000fd5b6036805460010190819055609c5460ff16156120de576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001600160a01b038316600090815260d1602052604090205460ff1661214b576040805162461bcd60e51b815260206004820152601860248201527f6b546f6b656e206973206e6f7420726567697374657265640000000000000000604482015290519081900360640190fd5b6000821161218a5760405162461bcd60e51b815260040180806020018281038252602881526020018061344d6028913960400191505060405180910390fd5b6000836001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c557600080fd5b505afa1580156121d9573d6000803e3d6000fd5b505050506040513d60208110156121ef57600080fd5b505190506000612200858386612aff565b6040805163079cc67960e41b81523360048201526024810187905290519192506001600160a01b038716916379cc67909160448082019260009290919082900301818387803b15801561225257600080fd5b505af1158015612266573d6000803e3d6000fd5b505060d7546001600160a01b0385811691161491506122a090505761229b6001600160a01b038316878363ffffffff61264b16565b61233a565b6040516000906001600160a01b0388169083908381818185875af1925050503d80600081146122eb576040519150601f19603f3d011682016040523d82523d6000602084013e6122f0565b606091505b5050905080612338576040805162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8811985a5b1959608a1b604482015290519081900360640190fd5b505b604080518281526020810186905281516001600160a01b03808616933393918b16927f66d8849e904432a33a6c0adbb12d9cf486cc99e88c79160e8b1933b6c6644d599281900390910190a4505060365481146123de576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50505050565b60348181548110611b9057fe5b60d65481565b61240033611310565b61243b5760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b6001600160a01b03166000908152603560205260409020805460ff19166001179055565b60d7546001600160a01b031681565b6001600160a01b03808316600090815260cf602090815260408083205481516370a0823160e01b815286861660048201529151939485949116926370a082319260248082019391829003018186803b1580156124c957600080fd5b505afa1580156124dd573d6000803e3d6000fd5b505050506040513d60208110156124f357600080fd5b50516001600160a01b03808616600090815260cf602090815260408083205481516318160ddd60e01b81529151959650929492909316926318160ddd9260048083019392829003018186803b15801561254b57600080fd5b505afa15801561255f573d6000803e3d6000fd5b505050506040513d602081101561257557600080fd5b5051905081612589576000925050506125b7565b6125b2816125a68461259a89611737565b9063ffffffff612c3916565b9063ffffffff612c9216565b925050505b92915050565b60d2805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156126435780601f1061261857610100808354040283529160200191612643565b820191906000526020600020905b81548152906001019060200180831161262657829003601f168201915b505050505081565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611960908490612cd4565b6126ae60338263ffffffff612e8c16565b6040516001600160a01b038216907f80c0b871b97b595b16a7741c1b06fed0c6f6f558639f18ccbce50724325dc40d90600090a250565b60006001600160a01b03821661272c5760405162461bcd60e51b81526004018080602001828103825260228152602001806134c26022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526123de908590612cd4565b6000806127c2836127b686611737565b9063ffffffff61287716565b90506000856001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156127ff57600080fd5b505afa158015612813573d6000803e3d6000fd5b505050506040513d602081101561282957600080fd5b505190508061283c578392505050612870565b61286b61285b61284e60d454876128b9565b849063ffffffff612ef316565b6125a68361259a60d45489612f4d565b925050505b9392505050565b600061287083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612f77565b60d654600090612870906125a6848663ffffffff612c3916565b6128e460698263ffffffff612e8c16565b6040516001600160a01b038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b303b1590565b600054610100900460ff168061293a575061293a61291b565b80612948575060005460ff16155b6129835760405162461bcd60e51b815260040180806020018281038252602e8152602001806134e4602e913960400191505060405180910390fd5b600054610100900460ff161580156129ae576000805460ff1961ff0019909116610100171660011790555b6129b78261300e565b8015611cec576000805461ff00191690555050565b6129dd60698263ffffffff6130a416565b6040516001600160a01b038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b612a2560338263ffffffff6130a416565b6040516001600160a01b038216907fac6fa858e9350a46cec16539926e0fde25b7629f84b5a72bffaae4df888ae86d90600090a250565b600054610100900460ff1680612a755750612a7561291b565b80612a83575060005460ff16155b612abe5760405162461bcd60e51b815260040180806020018281038252602e8152602001806134e4602e913960400191505060405180910390fd5b600054610100900460ff16158015612ae9576000805460ff1961ff0019909116610100171660011790555b612af282610fc2565b6129b7576129b7826129cc565b600080846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3b57600080fd5b505afa158015612b4f573d6000803e3d6000fd5b505050506040513d6020811015612b6557600080fd5b5051905080612bb4576040805162461bcd60e51b8152602060048201526016602482015275139bc812d51bdad95b9cc81d1bc8189948189d5c9b9d60521b604482015290519081900360640190fd5b6000612bbf85611737565b905061286b866001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bfd57600080fd5b505afa158015612c11573d6000803e3d6000fd5b505050506040513d6020811015612c2757600080fd5b50516125a6868463ffffffff612c3916565b600082612c48575060006125b7565b82820282848281612c5557fe5b04146128705760405162461bcd60e51b81526004018080602001828103825260218152602001806134a16021913960400191505060405180910390fd5b600061287083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613125565b612ce6826001600160a01b031661318a565b612d37576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310612d755780518252601f199092019160209182019101612d56565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612dd7576040519150601f19603f3d011682016040523d82523d6000602084013e612ddc565b606091505b509150915081612e33576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156123de57808060200190516020811015612e4f57600080fd5b50516123de5760405162461bcd60e51b815260040180806020018281038252602a815260200180613542602a913960400191505060405180910390fd5b612e9682826126e5565b612ed15760405162461bcd60e51b81526004018080602001828103825260218152602001806133c26021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b600082820183811015612870576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60d654600090612870906125a6612f6a828763ffffffff61287716565b859063ffffffff612c3916565b600081848411156130065760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612fcb578181015183820152602001612fb3565b50505050905090810190601f168015612ff85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600054610100900460ff1680613027575061302761291b565b80613035575060005460ff16155b6130705760405162461bcd60e51b815260040180806020018281038252602e8152602001806134e4602e913960400191505060405180910390fd5b600054610100900460ff1615801561309b576000805460ff1961ff0019909116610100171660011790555b6129b782612a14565b6130ae82826126e5565b15613100576040805162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b600081836131745760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612fcb578181015183820152602001612fb3565b50600083858161318057fe5b0495945050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906131be57508115155b949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061320757805160ff1916838001178555613234565b82800160010185558215613234579182015b82811115613234578251825591602001919060010190613219565b50613240929150613244565b5090565b61095191905b80821115613240576000815560010161324a56fe506175736572526f6c653a2063616c6c657220646f6573206e6f742068617665207468652050617573657220726f6c654465706f73697420616d6f756e742073686f756c642062652067726561746572207468616e203043616e5265636c61696d546f6b656e733a20746f6b656e206973206e6f74207265636f76657261626c654c6971756964697479506f6f6c56323a20626f72726f7765722070726f78792063616e6e6f74206265203078306b546f6b656e2073686f756c64206e6f742068617665206265656e20726567697374657265644f70657261746f72526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204f70657261746f7220726f6c654c6971756964697479506f6f6c56323a20666565706f6f6c2063616e6e6f74206265203078304c6971756964697479506f6f6c56313a206661696c656420746f2073656e642066756e647320746f2074686520626f72726f776572526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c654c6971756964697479506f6f6c56313a206665652073686f756c64206265206265747765656e203020616e64204645455f424153454c6971756964697479506f6f6c56313a206661696c656420746f2073656e642066756e647320746f207468652066656520706f6f6c576974686472617720616d6f756e742073686f756c642062652067726561746572207468616e2030426f72726f776572206661696c656420746f2072657475726e2074686520626f72726f7765642066756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564556e6465726c79696e672061737365742073686f756c64206e6f742068617665206265656e20726567697374657265645361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565644c6971756964697479506f6f6c56323a2053686f756c64206e6f7420616c6c6f7720455448206465706f7369747320647572696e6720455243323020746f6b656e206465706f73697473a265627a7a72315820d995be33235f7bede9b4b1c9ede097911aef83bf5f6bbcbbc6e34f564a1f64a564736f6c634300050c0032Deployed Bytecode
0x6080604052600436106101f95760003560e01c806382dc1ec41161010d578063c5b1fad1116100a0578063ecefc7051161006f578063ecefc7051461082d578063f65d901c14610842578063f7cdf47c14610875578063fc5eb0df1461088a578063ffa1ad74146108c5576101f9565b8063c5b1fad11461075a578063ce5494bb1461078d578063d9caed12146107c0578063e28d490614610803576101f9565b80639a0ba2ea116100dc5780639a0ba2ea146106be578063aef67d78146106e8578063c2cac04b146106fd578063c4d66de814610727576101f9565b806382dc1ec414610610578063834edf41146106435780638456cb59146106765780639870d7fe1461068b576101f9565b806347e86662116101905780636e2246a71161015f5780636e2246a7146104635780636ef8d66d146104f5578063736158d01461050a5780637ab4339d1461053d5780638129fc1c146105fb576101f9565b806347e86662146103995780635c975abb146103e85780636d16acfe146103fd5780636d70f7ae14610430576101f9565b80633f4ba83a116101cc5780633f4ba83a146102de5780634420e486146102f357806346fbf68e1461032657806347e7ef241461036d576101f9565b8063017def57146102435780630534e74e1461026f57806316114acd146102965780632ab6f8db146102c9575b61020161094f565b6001600160a01b03167f1e57e3bb474320be3d2c77138f75b7c3941292d647f5f9634e33a8e94e0e069b346040518082815260200191505060405180910390a2005b34801561024f57600080fd5b5061026d6004803603602081101561026657600080fd5b5035610954565b005b34801561027b57600080fd5b506102846109de565b60408051918252519081900360200190f35b3480156102a257600080fd5b5061026d600480360360208110156102b957600080fd5b50356001600160a01b03166109e4565b3480156102d557600080fd5b5061026d610bb6565b3480156102ea57600080fd5b5061026d610bc1565b3480156102ff57600080fd5b5061026d6004803603602081101561031657600080fd5b50356001600160a01b0316610caa565b34801561033257600080fd5b506103596004803603602081101561034957600080fd5b50356001600160a01b0316610fc2565b604080519115158252519081900360200190f35b6102846004803603604081101561038357600080fd5b506001600160a01b038135169060200135610fdd565b3480156103a557600080fd5b506103cc600480360360208110156103bc57600080fd5b50356001600160a01b03166112ce565b604080516001600160a01b039092168252519081900360200190f35b3480156103f457600080fd5b506103596112e9565b34801561040957600080fd5b506103cc6004803603602081101561042057600080fd5b50356001600160a01b03166112f2565b34801561043c57600080fd5b506103596004803603602081101561045357600080fd5b50356001600160a01b0316611310565b34801561046f57600080fd5b5061026d6004803603606081101561048657600080fd5b6001600160a01b03823516916020810135918101906060810160408201356401000000008111156104b657600080fd5b8201836020820111156104c857600080fd5b803590602001918460018302840111640100000000831117156104ea57600080fd5b509092509050611323565b34801561050157600080fd5b5061026d611727565b34801561051657600080fd5b506102846004803603602081101561052d57600080fd5b50356001600160a01b0316611737565b34801561054957600080fd5b5061026d6004803603604081101561056057600080fd5b81019060208101813564010000000081111561057b57600080fd5b82018360208201111561058d57600080fd5b803590602001918460018302840111640100000000831117156105af57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506117d09050565b34801561060757600080fd5b5061026d611965565b34801561061c57600080fd5b5061026d6004803603602081101561063357600080fd5b50356001600160a01b0316611a0b565b34801561064f57600080fd5b506103596004803603602081101561066657600080fd5b50356001600160a01b0316611a5a565b34801561068257600080fd5b5061026d611a6f565b34801561069757600080fd5b5061026d600480360360208110156106ae57600080fd5b50356001600160a01b0316611b36565b3480156106ca57600080fd5b506103cc600480360360208110156106e157600080fd5b5035611b83565b3480156106f457600080fd5b50610284611baa565b34801561070957600080fd5b5061026d6004803603602081101561072057600080fd5b5035611bb0565b34801561073357600080fd5b5061026d6004803603602081101561074a57600080fd5b50356001600160a01b0316611c3a565b34801561076657600080fd5b5061026d6004803603602081101561077d57600080fd5b50356001600160a01b0316611cf0565b34801561079957600080fd5b5061026d600480360360208110156107b057600080fd5b50356001600160a01b0316611d9b565b3480156107cc57600080fd5b5061026d600480360360608110156107e357600080fd5b506001600160a01b03813581169160208101359091169060400135612088565b34801561080f57600080fd5b506103cc6004803603602081101561082657600080fd5b50356123e4565b34801561083957600080fd5b506102846123f1565b34801561084e57600080fd5b5061026d6004803603602081101561086557600080fd5b50356001600160a01b03166123f7565b34801561088157600080fd5b506103cc61245f565b34801561089657600080fd5b50610284600480360360408110156108ad57600080fd5b506001600160a01b038135811691602001351661246e565b3480156108d157600080fd5b506108da6125bd565b6040805160208082528351818301528351919283929083019185019080838360005b838110156109145781810151838201526020016108fc565b50505050905090810190601f1680156109415780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b335b90565b61095d33611310565b6109985760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b60d6548111156109d95760405162461bcd60e51b81526004018080602001828103825260358152602001806133e36035913960400191505060405180910390fd5b60d455565b60d55481565b6109ed33611310565b610a285760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b6001600160a01b03811660009081526035602052604090205460ff1615610a805760405162461bcd60e51b815260040180806020018281038252602a8152602001806132b6602a913960400191505060405180910390fd5b6001600160a01b038116610b245760405160009033903031908381818185875af1925050503d8060008114610ad1576040519150601f19603f3d011682016040523d82523d6000602084013e610ad6565b606091505b5050905080610b1e576040805162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8811985a5b1959608a1b604482015290519081900360640190fd5b50610bb3565b604080516370a0823160e01b81523060048201529051610bb39133916001600160a01b038516916370a08231916024808301926020929190829003018186803b158015610b7057600080fd5b505afa158015610b84573d6000803e3d6000fd5b505050506040513d6020811015610b9a57600080fd5b50516001600160a01b038416919063ffffffff61264b16565b50565b610bbf3361269d565b565b610bd1610bcc61094f565b610fc2565b610c0c5760405162461bcd60e51b815260040180806020018281038252603081526020018061325f6030913960400191505060405180910390fd5b609c5460ff16610c5a576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b609c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610c8d61094f565b604080516001600160a01b039092168252519081900360200190a1565b610cb333611310565b610cee5760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b60006001600160a01b031660cf6000836001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3657600080fd5b505afa158015610d4a573d6000803e3d6000fd5b505050506040513d6020811015610d6057600080fd5b50516001600160a01b0390811682526020820192909252604001600020541614610dbb5760405162461bcd60e51b81526004018080602001828103825260308152602001806135126030913960400191505060405180910390fd5b6001600160a01b038116600090815260d1602052604090205460ff1615610e135760405162461bcd60e51b815260040180806020018281038252602681526020018061330d6026913960400191505060405180910390fd5b8060cf6000836001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610e5157600080fd5b505afa158015610e65573d6000803e3d6000fd5b505050506040513d6020811015610e7b57600080fd5b50516001600160a01b0390811682526020808301939093526040918201600090812080546001600160a01b03191695831695909517909455841680845260d1835292819020805460ff191660011790558051636f307dc360e01b8152905160d09392636f307dc39260048082019391829003018186803b158015610efe57600080fd5b505afa158015610f12573d6000803e3d6000fd5b505050506040513d6020811015610f2857600080fd5b5051815460018101835560009283526020928390200180546001600160a01b0319166001600160a01b0392831617905560408051636f307dc360e01b81529051610bb39392851692636f307dc39260048082019391829003018186803b158015610f9157600080fd5b505afa158015610fa5573d6000803e3d6000fd5b505050506040513d6020811015610fbb57600080fd5b50516123f7565b6000610fd560698363ffffffff6126e516565b90505b919050565b6036805460010190819055609c546000919060ff1615611037576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001600160a01b03808516600090815260cf6020526040902054168061109e576040805162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc81b9bdd081c9959da5cdd195c9959604a1b604482015290519081900360640190fd5b600084116110dd5760405162461bcd60e51b815260040180806020018281038252602781526020018061328f6027913960400191505060405180910390fd5b60d7546001600160a01b0386811691161461114f57341561112f5760405162461bcd60e51b815260040180806020018281038252604a81526020018061356c604a913960600191505060405180910390fd5b61114a6001600160a01b03861633308763ffffffff61274c16565b61119a565b34841461119a576040805162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd08195d1a08185b5bdd5b9d60621b604482015290519081900360640190fd5b60006111a78287876127a6565b604080516340c10f1960e01b81523360048201526024810183905290519192506001600160a01b038416916340c10f19916044808201926020929091908290030181600087803b1580156111fa57600080fd5b505af115801561120e573d6000803e3d6000fd5b505050506040513d602081101561122457600080fd5b5050604080518681526020810183905281516001600160a01b0389169233927ff5681f9d0db1b911ac18ee83d515a1cf1051853a9eae418316a2fdf7dea427c5929081900390910190a392505060365481146112c7576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5092915050565b60cf602052600090815260409020546001600160a01b031681565b609c5460ff1690565b6001600160a01b03908116600090815260cf60205260409020541690565b6000610fd560338363ffffffff6126e516565b6036805460010190819055609c5460ff1615611379576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001600160a01b03858116600090815260cf6020526040902054166113df576040805162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc81b9bdd081c9959da5cdd195c9959604a1b604482015290519081900360640190fd5b60006113ea86611737565b60d7549091506001600160a01b038781169116146114215761141c6001600160a01b038716338763ffffffff61264b16565b6114aa565b604051600090339087908381818185875af1925050503d8060008114611463576040519150601f19603f3d011682016040523d82523d6000602084013e611468565b606091505b50509050806114a85760405162461bcd60e51b815260040180806020018281038252603581526020018061338d6035913960400191505060405180910390fd5b505b60d3546040805163356eb6af60e21b8152336004820181815260248301938452604483018890526001600160a01b039094169363d5badabc9391928992899291606401848480828437600081840152601f19601f820116905080830192505050945050505050600060405180830381600087803b15801561152a57600080fd5b505af115801561153e573d6000803e3d6000fd5b50505050600061154d87611737565b90508181101561158e5760405162461bcd60e51b815260040180806020018281038252602c815260200180613475602c913960400191505060405180910390fd5b60006115a0828463ffffffff61287716565b905060006115b060d554836128b9565b604080518a81526020810185905281519293506001600160a01b038c169233927fc14e9e6b4d98a542b05a0f6b64acd5f4cbdb914be88432d87486b664e97071a7928290030190a360d7546001600160a01b038a81169116146116325760d85461162d906001600160a01b038b811691168363ffffffff61264b16565b6116c6565b60d8546040516000916001600160a01b03169083908381818185875af1925050503d806000811461167f576040519150601f19603f3d011682016040523d82523d6000602084013e611684565b606091505b50509050806116c45760405162461bcd60e51b81526004018080602001828103825260358152602001806134186035913960400191505060405180910390fd5b505b505050506036548114611720576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b5050505050565b610bbf61173261094f565b6128d3565b60d7546000906001600160a01b038381169116141561175857503031610fd8565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b15801561179e57600080fd5b505afa1580156117b2573d6000803e3d6000fd5b505050506040513d60208110156117c857600080fd5b505192915050565b600054610100900460ff16806117e957506117e961291b565b806117f7575060005460ff16155b6118325760405162461bcd60e51b815260040180806020018281038252602e8152602001806134e4602e913960400191505060405180910390fd5b600054610100900460ff1615801561185d576000805460ff1961ff0019909116610100171660011790555b6001600160a01b0382166118a25760405162461bcd60e51b815260040180806020018281038252602d8152602001806132e0602d913960400191505060405180910390fd5b6118ab33612921565b6118b433611c3a565b6118bc611965565b6118c533611c3a565b82516118d89060d29060208601906131c6565b5060d380546001600160a01b0319166001600160a01b0384811691909117918290556040805163204a7f0760e21b815290519290911691638129fc1c9160048082019260009290919082900301818387803b15801561193657600080fd5b505af115801561194a573d6000803e3d6000fd5b505050508015611960576000805461ff00191690555b505050565b600054610100900460ff168061197e575061197e61291b565b8061198c575060005460ff16155b6119c75760405162461bcd60e51b815260040180806020018281038252602e8152602001806134e4602e913960400191505060405180910390fd5b600054610100900460ff161580156119f2576000805460ff1961ff0019909116610100171660011790555b60016036558015610bb3576000805461ff001916905550565b611a16610bcc61094f565b611a515760405162461bcd60e51b815260040180806020018281038252603081526020018061325f6030913960400191505060405180910390fd5b610bb3816129cc565b60d16020526000908152604090205460ff1681565b611a7a610bcc61094f565b611ab55760405162461bcd60e51b815260040180806020018281038252603081526020018061325f6030913960400191505060405180910390fd5b609c5460ff1615611b00576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b609c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610c8d61094f565b611b3f33611310565b611b7a5760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b610bb381612a14565b60d08181548110611b9057fe5b6000918252602090912001546001600160a01b0316905081565b60d45481565b611bb933611310565b611bf45760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b60d654811115611c355760405162461bcd60e51b81526004018080602001828103825260358152602001806133e36035913960400191505060405180910390fd5b60d555565b600054610100900460ff1680611c535750611c5361291b565b80611c61575060005460ff16155b611c9c5760405162461bcd60e51b815260040180806020018281038252602e8152602001806134e4602e913960400191505060405180910390fd5b600054610100900460ff16158015611cc7576000805460ff1961ff0019909116610100171660011790555b611cd082612a5c565b609c805460ff191690558015611cec576000805461ff00191690555b5050565b611cf933611310565b611d345760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b6001600160a01b038116611d795760405162461bcd60e51b81526004018080602001828103825260268152602001806133676026913960400191505060405180910390fd5b60d880546001600160a01b0319166001600160a01b0392909216919091179055565b611da433611310565b611ddf5760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b60005b60d05481101561203857600060d08281548110611dfb57fe5b60009182526020808320909101546001600160a01b0390811680845260cf9092526040808420548151634c1d96ab60e11b8152888416600482015291519395509091169263983b2d569260248084019382900301818387803b158015611e6057600080fd5b505af1158015611e74573d6000803e3d6000fd5b5050506001600160a01b03808316600090815260cf6020526040808220548151639865027560e01b81529151931693506398650275926004808301939282900301818387803b158015611ec657600080fd5b505af1158015611eda573d6000803e3d6000fd5b505050506001600160a01b03818116600090815260cf6020526040808220548151632210724360e11b81529084166004820152905192861692634420e4869260248084019391929182900301818387803b158015611f3757600080fd5b505af1158015611f4b573d6000803e3d6000fd5b505060d7546001600160a01b038481169116149150611f8f905057611f8a83611f7383611737565b6001600160a01b038416919063ffffffff61264b16565b61202f565b6000836001600160a01b0316611fa483611737565b604051600081818185875af1925050503d8060008114611fe0576040519150601f19603f3d011682016040523d82523d6000602084013e611fe5565b606091505b505090508061202d576040805162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8811985a5b1959608a1b604482015290519081900360640190fd5b505b50600101611de2565b50806001600160a01b0316632ab6f8db6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561207457600080fd5b505af1158015611720573d6000803e3d6000fd5b6036805460010190819055609c5460ff16156120de576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001600160a01b038316600090815260d1602052604090205460ff1661214b576040805162461bcd60e51b815260206004820152601860248201527f6b546f6b656e206973206e6f7420726567697374657265640000000000000000604482015290519081900360640190fd5b6000821161218a5760405162461bcd60e51b815260040180806020018281038252602881526020018061344d6028913960400191505060405180910390fd5b6000836001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c557600080fd5b505afa1580156121d9573d6000803e3d6000fd5b505050506040513d60208110156121ef57600080fd5b505190506000612200858386612aff565b6040805163079cc67960e41b81523360048201526024810187905290519192506001600160a01b038716916379cc67909160448082019260009290919082900301818387803b15801561225257600080fd5b505af1158015612266573d6000803e3d6000fd5b505060d7546001600160a01b0385811691161491506122a090505761229b6001600160a01b038316878363ffffffff61264b16565b61233a565b6040516000906001600160a01b0388169083908381818185875af1925050503d80600081146122eb576040519150601f19603f3d011682016040523d82523d6000602084013e6122f0565b606091505b5050905080612338576040805162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8811985a5b1959608a1b604482015290519081900360640190fd5b505b604080518281526020810186905281516001600160a01b03808616933393918b16927f66d8849e904432a33a6c0adbb12d9cf486cc99e88c79160e8b1933b6c6644d599281900390910190a4505060365481146123de576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50505050565b60348181548110611b9057fe5b60d65481565b61240033611310565b61243b5760405162461bcd60e51b81526004018080602001828103825260348152602001806133336034913960400191505060405180910390fd5b6001600160a01b03166000908152603560205260409020805460ff19166001179055565b60d7546001600160a01b031681565b6001600160a01b03808316600090815260cf602090815260408083205481516370a0823160e01b815286861660048201529151939485949116926370a082319260248082019391829003018186803b1580156124c957600080fd5b505afa1580156124dd573d6000803e3d6000fd5b505050506040513d60208110156124f357600080fd5b50516001600160a01b03808616600090815260cf602090815260408083205481516318160ddd60e01b81529151959650929492909316926318160ddd9260048083019392829003018186803b15801561254b57600080fd5b505afa15801561255f573d6000803e3d6000fd5b505050506040513d602081101561257557600080fd5b5051905081612589576000925050506125b7565b6125b2816125a68461259a89611737565b9063ffffffff612c3916565b9063ffffffff612c9216565b925050505b92915050565b60d2805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156126435780601f1061261857610100808354040283529160200191612643565b820191906000526020600020905b81548152906001019060200180831161262657829003601f168201915b505050505081565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611960908490612cd4565b6126ae60338263ffffffff612e8c16565b6040516001600160a01b038216907f80c0b871b97b595b16a7741c1b06fed0c6f6f558639f18ccbce50724325dc40d90600090a250565b60006001600160a01b03821661272c5760405162461bcd60e51b81526004018080602001828103825260228152602001806134c26022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526123de908590612cd4565b6000806127c2836127b686611737565b9063ffffffff61287716565b90506000856001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156127ff57600080fd5b505afa158015612813573d6000803e3d6000fd5b505050506040513d602081101561282957600080fd5b505190508061283c578392505050612870565b61286b61285b61284e60d454876128b9565b849063ffffffff612ef316565b6125a68361259a60d45489612f4d565b925050505b9392505050565b600061287083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612f77565b60d654600090612870906125a6848663ffffffff612c3916565b6128e460698263ffffffff612e8c16565b6040516001600160a01b038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b303b1590565b600054610100900460ff168061293a575061293a61291b565b80612948575060005460ff16155b6129835760405162461bcd60e51b815260040180806020018281038252602e8152602001806134e4602e913960400191505060405180910390fd5b600054610100900460ff161580156129ae576000805460ff1961ff0019909116610100171660011790555b6129b78261300e565b8015611cec576000805461ff00191690555050565b6129dd60698263ffffffff6130a416565b6040516001600160a01b038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b612a2560338263ffffffff6130a416565b6040516001600160a01b038216907fac6fa858e9350a46cec16539926e0fde25b7629f84b5a72bffaae4df888ae86d90600090a250565b600054610100900460ff1680612a755750612a7561291b565b80612a83575060005460ff16155b612abe5760405162461bcd60e51b815260040180806020018281038252602e8152602001806134e4602e913960400191505060405180910390fd5b600054610100900460ff16158015612ae9576000805460ff1961ff0019909116610100171660011790555b612af282610fc2565b6129b7576129b7826129cc565b600080846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3b57600080fd5b505afa158015612b4f573d6000803e3d6000fd5b505050506040513d6020811015612b6557600080fd5b5051905080612bb4576040805162461bcd60e51b8152602060048201526016602482015275139bc812d51bdad95b9cc81d1bc8189948189d5c9b9d60521b604482015290519081900360640190fd5b6000612bbf85611737565b905061286b866001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bfd57600080fd5b505afa158015612c11573d6000803e3d6000fd5b505050506040513d6020811015612c2757600080fd5b50516125a6868463ffffffff612c3916565b600082612c48575060006125b7565b82820282848281612c5557fe5b04146128705760405162461bcd60e51b81526004018080602001828103825260218152602001806134a16021913960400191505060405180910390fd5b600061287083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613125565b612ce6826001600160a01b031661318a565b612d37576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310612d755780518252601f199092019160209182019101612d56565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612dd7576040519150601f19603f3d011682016040523d82523d6000602084013e612ddc565b606091505b509150915081612e33576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156123de57808060200190516020811015612e4f57600080fd5b50516123de5760405162461bcd60e51b815260040180806020018281038252602a815260200180613542602a913960400191505060405180910390fd5b612e9682826126e5565b612ed15760405162461bcd60e51b81526004018080602001828103825260218152602001806133c26021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b600082820183811015612870576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60d654600090612870906125a6612f6a828763ffffffff61287716565b859063ffffffff612c3916565b600081848411156130065760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612fcb578181015183820152602001612fb3565b50505050905090810190601f168015612ff85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600054610100900460ff1680613027575061302761291b565b80613035575060005460ff16155b6130705760405162461bcd60e51b815260040180806020018281038252602e8152602001806134e4602e913960400191505060405180910390fd5b600054610100900460ff1615801561309b576000805460ff1961ff0019909116610100171660011790555b6129b782612a14565b6130ae82826126e5565b15613100576040805162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b600081836131745760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612fcb578181015183820152602001612fb3565b50600083858161318057fe5b0495945050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906131be57508115155b949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061320757805160ff1916838001178555613234565b82800160010185558215613234579182015b82811115613234578251825591602001919060010190613219565b50613240929150613244565b5090565b61095191905b80821115613240576000815560010161324a56fe506175736572526f6c653a2063616c6c657220646f6573206e6f742068617665207468652050617573657220726f6c654465706f73697420616d6f756e742073686f756c642062652067726561746572207468616e203043616e5265636c61696d546f6b656e733a20746f6b656e206973206e6f74207265636f76657261626c654c6971756964697479506f6f6c56323a20626f72726f7765722070726f78792063616e6e6f74206265203078306b546f6b656e2073686f756c64206e6f742068617665206265656e20726567697374657265644f70657261746f72526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204f70657261746f7220726f6c654c6971756964697479506f6f6c56323a20666565706f6f6c2063616e6e6f74206265203078304c6971756964697479506f6f6c56313a206661696c656420746f2073656e642066756e647320746f2074686520626f72726f776572526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c654c6971756964697479506f6f6c56313a206665652073686f756c64206265206265747765656e203020616e64204645455f424153454c6971756964697479506f6f6c56313a206661696c656420746f2073656e642066756e647320746f207468652066656520706f6f6c576974686472617720616d6f756e742073686f756c642062652067726561746572207468616e2030426f72726f776572206661696c656420746f2072657475726e2074686520626f72726f7765642066756e6473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564556e6465726c79696e672061737365742073686f756c64206e6f742068617665206265656e20726567697374657265645361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565644c6971756964697479506f6f6c56323a2053686f756c64206e6f7420616c6c6f7720455448206465706f7369747320647572696e6720455243323020746f6b656e206465706f73697473a265627a7a72315820d995be33235f7bede9b4b1c9ede097911aef83bf5f6bbcbbc6e34f564a1f64a564736f6c634300050c0032
Loading...LoadingLoading...Loading
Loading...Loading
Loading...LoadingLoading...LoadingLoading...LoadingLoading...LoadingLoading...LoadingLoading...LoadingLoading...Loading[ Download: CSV Export ][ 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.
Address QR Code
My Address - Private Name Tag or Note
My Name Tag:
Private Name Tags (up to 35 characters) can be used for easy identification of addressesPrivate Note:
A private note (up to 500 characters) can be attached to this address.
Please DO NOT store any passwords or private keys here.Compiler specific version warnings:
The compiled contract might be susceptible to AbiReencodingHeadOverflowWithStaticArrayCleanup (medium-severity), DirtyBytesArrayToStorage (low-severity), NestedCalldataArrayAbiReencodingSizeValidation (very low-severity), ABIDecodeTwoDimensionalArrayMemory (very low-severity), KeccakCaching (medium-severity), EmptyByteArrayCopy (medium-severity), DynamicArrayCleanup (medium-severity), ImplicitConstructorCallvalueCheck (very low-severity), TupleAssignmentMultiStackSlotComponents (very low-severity), MemoryArrayCreationOverflow (low-severity), privateCanBeOverridden (low-severity), YulOptimizerRedundantAssignmentBreakContinue0.5 (low-severity) Solidity Compiler Bugs.
Connect a Wallet
Connecting wallet for read function is optional, useful if you want to call certain functions or simply use your wallet's node.Connect a Wallet
Connecting wallet for read function is optional, useful if you want to call certain functions or simply use your wallet's node.Connect a Wallet
Connecting wallet for read function is optional, useful if you want to call certain functions or simply use your wallet's node.SignIn
Address Cards
To use this feature, please login to your Etherscan account and return to this page.Before You Copy
Transaction Private Note
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.