Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 10918263 | 1470 days ago | IN | 0 ETH | 0.47847403 |
Latest 8 internal transactions
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
11544322 | 1374 days ago | Contract Creation | 0 ETH | |||
11344741 | 1405 days ago | Contract Creation | 0 ETH | |||
11303473 | 1411 days ago | Contract Creation | 0 ETH | |||
11303451 | 1411 days ago | Contract Creation | 0 ETH | |||
11287752 | 1413 days ago | Contract Creation | 0 ETH | |||
11271166 | 1416 days ago | Contract Creation | 0 ETH | |||
11268935 | 1416 days ago | Contract Creation | 0 ETH | |||
10940159 | 1467 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
SmartFundETHFactory
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-09-24 */ pragma solidity ^0.6.12; /** * @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. */ 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. */ 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. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } interface PermittedAddressesInterface { function permittedAddresses(address _address) external view returns(bool); function addressesTypes(address _address) external view returns(string memory); function isMatchTypes(address _address, uint256 addressType) external view returns(bool); } interface DefiPortalInterface { function callPayableProtocol( address[] memory tokensToSend, uint256[] memory amountsToSend, bytes calldata _additionalData, bytes32[] calldata _additionalArgs ) external payable returns( string memory eventType, address[] memory tokensToReceive, uint256[] memory amountsToReceive ); function callNonPayableProtocol( address[] memory tokensToSend, uint256[] memory amountsToSend, bytes calldata _additionalData, bytes32[] calldata _additionalArgs ) external returns( string memory eventType, address[] memory tokensToReceive, uint256[] memory amountsToReceive ); function getValue( address _from, address _to, uint256 _amount ) external view returns(uint256); } interface PoolPortalInterface { function buyPool ( uint256 _amount, uint _type, address _poolToken, address[] calldata _connectorsAddress, uint256[] calldata _connectorsAmount, bytes32[] calldata _additionalArgs, bytes calldata _additionalData ) external payable returns(uint256 poolAmountReceive, uint256[] memory connectorsSpended); function sellPool ( uint256 _amount, uint _type, IERC20 _poolToken, bytes32[] calldata _additionalArgs, bytes calldata _additionData ) external payable returns( address[] memory connectorsAddress, uint256[] memory connectorsAmount ); } interface ExchangePortalInterface { function trade( IERC20 _source, uint256 _sourceAmount, IERC20 _destination, uint256 _type, bytes32[] calldata _proof, uint256[] calldata _positions, bytes calldata _additionalData, bool _verifyDestanation ) external payable returns (uint256); function getValue(address _from, address _to, uint256 _amount) external view returns (uint256); function getTotalValue( address[] calldata _fromAddresses, uint256[] calldata _amounts, address _to ) external view returns (uint256); } /* The SmartFund contract is what holds all the tokens and ether, and contains all the logic for calculating its value (and ergo profit), allows users to deposit/withdraw their funds, and calculates the fund managers cut of the funds profit among other things. The SmartFund gets the value of its token holdings (in Ether) and trades through the ExchangePortal contract. This means that as new exchange capabalities are added to new exchange portals, the SmartFund will be able to upgrade to a new exchange portal, and trade a wider variety of assets with a wider variety of exchanges. The SmartFund is also connected to a permittedAddresses contract, which determines which exchange, pool, defi portals the SmartFund is allowed to connect to, restricting the fund owners ability to connect to a potentially malicious contract. In additional this contract can use pools and defi protocols voa pool and defi portals. */ /* * @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 { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } /** * @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 Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, 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"); } } } abstract contract SmartFundCore is Ownable, IERC20 { using SafeMath for uint256; using SafeERC20 for IERC20; // Fund type bool public isLightFund = false; // Total amount of ether or stable deposited by all users uint256 public totalWeiDeposited = 0; // Total amount of ether or stable withdrawn by all users uint256 public totalWeiWithdrawn = 0; // The Interface of the Exchange Portal ExchangePortalInterface public exchangePortal; // The Interface of pool portall PoolPortalInterface public poolPortal; // The interface of DefiPortal DefiPortalInterface public defiPortal; // The Smart Contract which stores the addresses of all the authorized Exchange Portals PermittedAddressesInterface public permittedAddresses; // portals recognizes ETH by this address IERC20 constant internal ETH_TOKEN_ADDRESS = IERC20(0x00eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee); // For ERC20 compliance string public name; // The maximum amount of tokens that can be traded via the smart fund uint256 public MAX_TOKENS = 20; // Percentages are rounded to 3 decimal places uint256 public TOTAL_PERCENTAGE = 10000; // Address of the platform that takes a cut from the fund manager success cut address public platformAddress; // The percentage of earnings paid to the fund manager. 10000 = 100% // e.g. 10% is 1000 uint256 public successFee; // The percentage of fund manager earnings paid to the platform. 10000 = 100% // e.g. 10% is 1000 uint256 public platformFee; // An array of all the erc20 token addresses the smart fund holds address[] public tokenAddresses; // Boolean value that determines whether the fund accepts deposits from anyone or // only specific addresses approved by the manager bool public onlyWhitelist = false; // Mapping of addresses that are approved to deposit if the manager only want's specific // addresses to be able to invest in their fund mapping (address => bool) public whitelist; uint public version = 7; // the total number of shares in the fund uint256 public totalShares = 0; // Denomination of initial shares uint256 constant internal INITIAL_SHARES = 10 ** 18; // The earnings the fund manager has already cashed out uint256 public fundManagerCashedOut = 0; // for ETH and USD fund this asset different address public coreFundAsset; // If true the contract will require each new asset to buy to be on a special Merkle tree list bool public isRequireTradeVerification; // how many shares belong to each address mapping (address => uint256) public addressToShares; // so that we can easily check that we don't add duplicates to our array mapping (address => bool) public tokensTraded; // this is really only being used to more easily show profits, but may not be necessary // if we do a lot of this offchain using events to track everything // total `depositToken` deposited - total `depositToken` withdrawn mapping (address => int256) public addressesNetDeposit; // Events event DefiCall( string eventType, address[] tokensToSend, uint256[] amountsToSend, address[] tokensToReceive, uint256[] amountsToReceive ); event BuyPool( address poolAddress, uint256 poolAmount, address[] connectorsAddress, uint256[] connectorsAmount); event SellPool( address poolAddress, uint256 poolAmount, address[] connectorsAddress, uint256[] connectorsAmount); event Deposit(address indexed user, uint256 amount, uint256 sharesReceived, uint256 totalShares); event Withdraw(address indexed user, uint256 sharesRemoved, uint256 totalShares); event Trade(address src, uint256 srcAmount, address dest, uint256 destReceived); event SmartFundCreated(address indexed owner); constructor( address _owner, string memory _name, uint256 _successFee, address _platformAddress, address _exchangePortalAddress, address _poolPortalAddress, address _defiPortal, address _permittedAddresses, address _coreFundAsset, bool _isRequireTradeVerification )public{ // never allow a 100% fee require(_successFee < TOTAL_PERCENTAGE); name = _name; successFee = _successFee; platformFee = _successFee; // platform fee the same as manager fee // Init manager if(_owner == address(0)){ transferOwnership(msg.sender); } else{ transferOwnership(_owner); } // Init platform address if(_platformAddress == address(0)){ platformAddress = msg.sender; } else{ platformAddress = _platformAddress; } // Initial Token is Ether tokenAddresses.push(address(ETH_TOKEN_ADDRESS)); // Initial interfaces exchangePortal = ExchangePortalInterface(_exchangePortalAddress); poolPortal = PoolPortalInterface(_poolPortalAddress); defiPortal = DefiPortalInterface(_defiPortal); permittedAddresses = PermittedAddressesInterface(_permittedAddresses); // Initial core assets coreFundAsset = _coreFundAsset; // Initial check if fund require trade verification or not isRequireTradeVerification = _isRequireTradeVerification; emit SmartFundCreated(owner()); } // virtual methods // USD and ETH based funds have different implements of this methods function calculateFundValue() public virtual view returns (uint256); function getTokenValue(IERC20 _token) public virtual view returns (uint256); /** * @dev Sends (_mul/_div) of every token (and ether) the funds holds to _withdrawAddress * * @param _mul The numerator * @param _div The denominator * @param _withdrawAddress Address to send the tokens/ether to * * NOTE: _withdrawAddress changed from address to address[] arrays because balance calculation should be performed * once for all usesr who wants to withdraw from the current balance. * */ function _withdraw( uint256[] memory _mul, uint256[] memory _div, address[] memory _withdrawAddress ) internal returns (uint256) { for (uint8 i = 1; i < tokenAddresses.length; i++) { // Transfer that _mul/_div of each token we hold to the user IERC20 token = IERC20(tokenAddresses[i]); uint256 fundAmount = token.balanceOf(address(this)); // Transfer ERC20 to _withdrawAddress for(uint8 j = 0; j < _withdrawAddress.length; j++){ // calculate withdraw ERC20 share uint256 payoutAmount = fundAmount.mul(_mul[j]).div(_div[j]); if(payoutAmount > 0) token.transfer(_withdrawAddress[j], payoutAmount); } } // Transfer ETH to _withdrawAddress uint256 etherBalance = address(this).balance; for(uint8 k = 0; k < _withdrawAddress.length; k++){ // calculate withdraw ETH share uint256 etherPayoutAmount = (etherBalance).mul(_mul[k]).div(_div[k]); if(etherPayoutAmount > 0) payable(_withdrawAddress[k]).transfer(etherPayoutAmount); } } /** * @dev Withdraws users fund holdings, sends (userShares/totalShares) of every held token * to msg.sender, defaults to 100% of users shares. * * @param _percentageWithdraw The percentage of the users shares to withdraw. */ function withdraw(uint256 _percentageWithdraw) external { require(totalShares != 0, "EMPTY_SHARES"); require(_percentageWithdraw <= TOTAL_PERCENTAGE, "INCORRECT_PERCENT"); uint256 percentageWithdraw = (_percentageWithdraw == 0) ? TOTAL_PERCENTAGE : _percentageWithdraw; uint256 addressShares = addressToShares[msg.sender]; uint256 numberOfWithdrawShares = addressShares.mul(percentageWithdraw).div(TOTAL_PERCENTAGE); uint256 fundManagerCut; uint256 fundValue; // Withdraw the users share minus the fund manager's success fee (fundManagerCut, fundValue, ) = calculateFundManagerCut(); uint256 withdrawShares = numberOfWithdrawShares.mul(fundValue.sub(fundManagerCut)).div(fundValue); // prepare call data for _withdarw address[] memory spenders = new address[](1); spenders[0] = msg.sender; uint256[] memory value = new uint256[](1); value[0] = totalShares; uint256[] memory cut = new uint256[](1); cut[0] = withdrawShares; // do withdraw _withdraw(cut, value, spenders); // Store the value we are withdrawing in ether uint256 valueWithdrawn = fundValue.mul(withdrawShares).div(totalShares); totalWeiWithdrawn = totalWeiWithdrawn.add(valueWithdrawn); addressesNetDeposit[msg.sender] -= int256(valueWithdrawn); // Subtract from total shares the number of withdrawn shares totalShares = totalShares.sub(numberOfWithdrawShares); addressToShares[msg.sender] = addressToShares[msg.sender].sub(numberOfWithdrawShares); emit Withdraw(msg.sender, numberOfWithdrawShares, totalShares); } /** * @dev Facilitates a trade of the funds holdings via the exchange portal * * @param _source ERC20 token to convert from * @param _sourceAmount Amount to convert (in _source token) * @param _destination ERC20 token to convert to * @param _type The type of exchange to trade with * @param _proof Merkle tree proof (if not used just set []) * @param _positions Merkle tree positions (if not used just set []) * @param _additionalData For additional data (if not used just set "0x0") * @param _minReturn Min expected amount of destination */ function trade( IERC20 _source, uint256 _sourceAmount, IERC20 _destination, uint256 _type, bytes32[] calldata _proof, uint256[] calldata _positions, bytes calldata _additionalData, uint256 _minReturn ) external onlyOwner { require(_minReturn > 0, "MIN_RETURN_0"); uint256 receivedAmount; if (_source == ETH_TOKEN_ADDRESS) { // Make sure fund contains enough ether require(address(this).balance >= _sourceAmount, "NOT_ENOUGH_ETH"); // Call trade on ExchangePortal along with ether receivedAmount = exchangePortal.trade.value(_sourceAmount)( _source, _sourceAmount, _destination, _type, _proof, _positions, _additionalData, isRequireTradeVerification ); } else { _source.approve(address(exchangePortal), _sourceAmount); receivedAmount = exchangePortal.trade( _source, _sourceAmount, _destination, _type, _proof, _positions, _additionalData, isRequireTradeVerification ); } // make sure fund recive destanation require(receivedAmount >= _minReturn, "RECEIVED_LESS_THAN_MIN_RETURN"); // add token to trader list _addToken(address(_destination)); // emit event emit Trade( address(_source), _sourceAmount, address(_destination), receivedAmount); } /** * @dev buy pool via pool portal * * @param _amount For Bancor amount it's relay, for Uniswap amount it's ETH, for Bancor and Uniswap v2 can be 0 * @param _type type of pool (0 - Bancor, 1 - Uniswap) * @param _poolToken address of relay for Bancor and exchange for Uniswap * @param _connectorsAddress address of pool connectors * @param _connectorsAmount amount of pool connectors * @param _additionalArgs bytes32 array for case if need pass some extra params, can be empty * @param _additionData for provide any additional data, if not used just set "0x" */ function buyPool( uint256 _amount, uint _type, address _poolToken, address[] calldata _connectorsAddress, uint256[] memory _connectorsAmount, // WARNING: this array rewrite from buyPool return (details below) bytes32[] calldata _additionalArgs, bytes calldata _additionData ) external onlyOwner { // for determine the exact number of received pool uint256 poolAmountReceive; // approve connectors // etherAmount for detect ETH case uint256 etherAmount = approveArrayOfTokensToSpender( _connectorsAddress, _connectorsAmount, address(poolPortal) ); // buy pool with ETH (payable case) if(etherAmount > 0){ // WARNING: rewrire _connectorsAmount from return // some pools can return some remains for connectors, and for get correct result, // for connectors amount to spend for emit event // poolPortal calculates and return exactly how many tokens were spent (total - remains), // unfortunate due stack too deep issue, we can't declarate new variable // so we rewrire _connectorsAmount (poolAmountReceive, _connectorsAmount) = poolPortal.buyPool.value(etherAmount)( _amount, _type, _poolToken, _connectorsAddress, _connectorsAmount, _additionalArgs, _additionData ); } // buy pool only with ERC20 (non payable case) else{ // WARNING: rewrire _connectorsAmount from return (poolAmountReceive, _connectorsAmount) = poolPortal.buyPool( _amount, _type, _poolToken, _connectorsAddress, _connectorsAmount, _additionalArgs, _additionData ); } // make sure fund receive pool token require(poolAmountReceive > 0, "EMPTY_POOL_RETURN"); // Add pool as ERC20 for withdraw _addToken(_poolToken); // emit event emit BuyPool( _poolToken, poolAmountReceive, _connectorsAddress, _connectorsAmount); } /** * @dev sell pool via pool portal * * @param _amount amount of Bancor relay or Uniswap exchange to sell * @param _type type of pool (0 - Bancor, 1 - Uniswap) * @param _poolToken address of Bancor relay or Uniswap exchange * @param _additionalArgs bytes32 array for case if need pass some extra params, can be empty * @param _additionData for provide any additional data, if not used just set "0x" */ function sellPool( uint256 _amount, uint _type, IERC20 _poolToken, bytes32[] calldata _additionalArgs, bytes calldata _additionData ) external onlyOwner { // approve pool _poolToken.approve(address(poolPortal), _amount); // sell pool (address[] memory connectorsAddress, uint256[] memory connectorsAmount) = poolPortal.sellPool( _amount, _type, _poolToken, _additionalArgs, _additionData ); // Add connectors to fund for(uint8 i = 0; i < connectorsAddress.length; i++){ _addToken(connectorsAddress[i]); } // event emit SellPool( address(_poolToken), _amount, connectorsAddress, connectorsAmount); } /** * @dev allow manager use newest DEFI protocols * NOTE: all logic in DEFI portal hardcoded, and also fund manager can't update * non permitted DEFI portal, so this is safe call * * @param _additionalData params data packed in bytes * @param _additionalArgs additional params array for quick unpack */ function callDefiPortal( address[] memory tokensToSend, uint256[] memory amountsToSend, bytes32[] calldata _additionalArgs, bytes calldata _additionalData ) external onlyOwner { // event data string memory eventType; address[] memory tokensToReceive; uint256[] memory amountsToReceive; // approve connectors // etherAmount for detect ETH case uint256 etherAmount = approveArrayOfTokensToSpender( tokensToSend, amountsToSend, address(defiPortal) ); // call defi payable case if(etherAmount > 0){ (eventType, tokensToReceive, amountsToReceive) = defiPortal.callPayableProtocol.value(etherAmount)( tokensToSend, amountsToSend, _additionalData, _additionalArgs ); } // call defi not payable case else{ (eventType, tokensToReceive, amountsToReceive) = defiPortal.callNonPayableProtocol( tokensToSend, amountsToSend, _additionalData, _additionalArgs ); } // add new tokens in fund for(uint8 i = 0; i < tokensToReceive.length; i++){ _addToken(tokensToReceive[i]); } // emit event emit DefiCall( eventType, tokensToSend, amountsToSend, tokensToReceive, amountsToReceive ); } // pivate helper for approve arary of tokens // spender can be Pool or Defi portals function approveArrayOfTokensToSpender( address[] memory addresses, uint256[] memory amounts, address spender ) private returns (uint256 etherAmount) { for(uint8 i = 0; i < addresses.length; i++){ if(addresses[i] != address(ETH_TOKEN_ADDRESS)){ // approve IERC20(addresses[i]).approve(spender, amounts[i]); } else{ etherAmount = amounts[i]; } } } // return all tokens addresses from fund function getAllTokenAddresses() external view returns (address[] memory) { return tokenAddresses; } /** * @dev Adds a token to tokensTraded if it's not already there * @param _token The token to add */ function _addToken(address _token) internal { // don't add token to if we already have it in our list if (tokensTraded[_token] || (_token == address(ETH_TOKEN_ADDRESS))) return; tokensTraded[_token] = true; tokenAddresses.push(_token); uint256 tokenCount = tokenAddresses.length; // we can't hold more than MAX_TOKENS tokens require(tokenCount <= MAX_TOKENS, "MAX_TOKENS"); } /** * @dev Removes a token from tokensTraded * * @param _token The address of the token to be removed * @param _tokenIndex The index of the token to be removed * */ function removeToken(address _token, uint256 _tokenIndex) public onlyOwner { require(_token != address(ETH_TOKEN_ADDRESS)); require(tokensTraded[_token]); require(IERC20(_token).balanceOf(address(this)) == 0); require(tokenAddresses[_tokenIndex] == _token); tokensTraded[_token] = false; // remove token from array uint256 arrayLength = tokenAddresses.length - 1; tokenAddresses[_tokenIndex] = tokenAddresses[arrayLength]; delete tokenAddresses[arrayLength]; tokenAddresses.pop(); } /** * @dev Calculates the funds profit * * @return The funds profit in deposit token (Ether) */ function calculateFundProfit() public view returns (int256) { uint256 fundValue = calculateFundValue(); return int256(fundValue) + int256(totalWeiWithdrawn) - int256(totalWeiDeposited); } /** * @dev Calculates the amount of shares received according to ether deposited * * @param _amount Amount of ether to convert to shares * * @return Amount of shares to be received */ function calculateDepositToShares(uint256 _amount) public view returns (uint256) { uint256 fundManagerCut; uint256 fundValue; // If there are no shares in the contract, whoever deposits owns 100% of the fund // we will set this to 10^18 shares, but this could be any amount if (totalShares == 0) return INITIAL_SHARES; (fundManagerCut, fundValue, ) = calculateFundManagerCut(); uint256 fundValueBeforeDeposit = fundValue.sub(_amount).sub(fundManagerCut); if (fundValueBeforeDeposit == 0) return 0; return _amount.mul(totalShares).div(fundValueBeforeDeposit); } /** * @dev Calculates the fund managers cut, depending on the funds profit and success fee * * @return fundManagerRemainingCut The fund managers cut that they have left to withdraw * @return fundValue The funds current value * @return fundManagerTotalCut The fund managers total cut of the profits until now */ function calculateFundManagerCut() public view returns ( uint256 fundManagerRemainingCut, // fm's cut of the profits that has yet to be cashed out (in `depositToken`) uint256 fundValue, // total value of fund (in `depositToken`) uint256 fundManagerTotalCut // fm's total cut of the profits (in `depositToken`) ) { fundValue = calculateFundValue(); // The total amount of ether currently deposited into the fund, takes into account the total ether // withdrawn by investors as well as ether withdrawn by the fund manager // NOTE: value can be negative if the manager performs well and investors withdraw more // ether than they deposited int256 curtotalWeiDeposited = int256(totalWeiDeposited) - int256(totalWeiWithdrawn.add(fundManagerCashedOut)); // If profit < 0, the fund managers totalCut and remainingCut are 0 if (int256(fundValue) <= curtotalWeiDeposited) { fundManagerTotalCut = 0; fundManagerRemainingCut = 0; } else { // calculate profit. profit = current fund value - total deposited + total withdrawn + total withdrawn by fm uint256 profit = uint256(int256(fundValue) - curtotalWeiDeposited); // remove the money already taken by the fund manager and take percentage fundManagerTotalCut = profit.mul(successFee).div(TOTAL_PERCENTAGE); fundManagerRemainingCut = fundManagerTotalCut.sub(fundManagerCashedOut); } } /** * @dev Allows the fund manager to withdraw their cut of the funds profit */ function fundManagerWithdraw() public onlyOwner { uint256 fundManagerCut; uint256 fundValue; (fundManagerCut, fundValue, ) = calculateFundManagerCut(); uint256 platformCut = (platformFee == 0) ? 0 : fundManagerCut.mul(platformFee).div(TOTAL_PERCENTAGE); // prepare call data for _withdarw address[] memory spenders = new address[](2); spenders[0] = platformAddress; spenders[1] = owner(); uint256[] memory value = new uint256[](2); value[0] = fundValue; value[1] = fundValue; uint256[] memory cut = new uint256[](2); cut[0] = platformCut; cut[1] = fundManagerCut - platformCut; // do withdraw _withdraw(cut, value, spenders); // add report fundManagerCashedOut = fundManagerCashedOut.add(fundManagerCut); } // calculate the current value of an address's shares in the fund function calculateAddressValue(address _address) public view returns (uint256) { if (totalShares == 0) return 0; return calculateFundValue().mul(addressToShares[_address]).div(totalShares); } // calculate the net profit/loss for an address in this fund function calculateAddressProfit(address _address) public view returns (int256) { uint256 currentAddressValue = calculateAddressValue(_address); return int256(currentAddressValue) - addressesNetDeposit[_address]; } // This method was added to easily record the funds token balances, may (should?) be removed in the future function getFundTokenHolding(IERC20 _token) external view returns (uint256) { if (_token == ETH_TOKEN_ADDRESS) return address(this).balance; return _token.balanceOf(address(this)); } /** * @dev Allows the manager to set whether or not only whitelisted addresses can deposit into * their fund * * @param _onlyWhitelist boolean representing whether only whitelisted addresses can deposit */ function setWhitelistOnly(bool _onlyWhitelist) external onlyOwner { onlyWhitelist = _onlyWhitelist; } /** * @dev Allows the fund manager to whitelist specific addresses to control * whos allowed to deposit into the fund * * @param _user The user address to whitelist * @param _allowed The status of _user, true means allowed to deposit, false means not allowed */ function setWhitelistAddress(address _user, bool _allowed) external onlyOwner { whitelist[_user] = _allowed; } /** * @dev Allows the fund manager to connect to a new permitted exchange portal * * @param _newExchangePortalAddress The address of the new permitted exchange portal to use */ function setNewExchangePortal(address _newExchangePortalAddress) public onlyOwner { // Require correct permitted address type require(permittedAddresses.isMatchTypes(_newExchangePortalAddress, 1), "WRONG_ADDRESS"); // Set new exchangePortal = ExchangePortalInterface(_newExchangePortalAddress); } /** * @dev Allows the fund manager to connect to a new permitted poolPortal * * @param _newPoolPortal The address of the new permitted pool portal to use */ function setNewPoolPortal(address _newPoolPortal) public onlyOwner { // Require correct permitted address type require(permittedAddresses.isMatchTypes(_newPoolPortal, 2), "WRONG_ADDRESS"); // Set new poolPortal = PoolPortalInterface(_newPoolPortal); } /** * @dev Allows the fund manager to connect to a new permitted defi portal * * @param _newDefiPortalAddress The address of the new permitted defi portal to use */ function setNewDefiPortal(address _newDefiPortalAddress) public onlyOwner { // Require correct permitted address type require(permittedAddresses.isMatchTypes(_newDefiPortalAddress, 3), "WRONG_ADDRESS"); // Set new defiPortal = DefiPortalInterface(_newDefiPortalAddress); } /** * @dev This method is present in the alpha testing phase in case for some reason there are funds * left in the SmartFund after all shares were withdrawn * * @param _token The address of the token to withdraw */ function emergencyWithdraw(address _token) external onlyOwner { require(totalShares == 0); if (_token == address(ETH_TOKEN_ADDRESS)) { msg.sender.transfer(address(this).balance); } else { IERC20(_token).transfer(msg.sender, IERC20(_token).balanceOf(address(this))); } } /** * @dev Approve 0 for a certain address * * NOTE: Some ERC20 has no standard approve logic, and not allow do new approve * if alredy approved. * * @param _token address of ERC20 * @param _spender address of spender */ function resetApprove(address _token, address _spender) external onlyOwner { IERC20(_token).approve(_spender, 0); } // Fallback payable function in order to be able to receive ether from other contracts fallback() external payable {} /** **************************** ERC20 Compliance **************************** **/ // Note that addressesNetDeposit does not get updated when transferring shares, since // this is used for updating off-chain data it doesn't affect the smart contract logic, // but is an issue that currently exists event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); uint8 public decimals = 18; string public symbol = "FND"; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Total number of shares in existence */ function totalSupply() external override view returns (uint256) { return totalShares; } /** * @dev Gets the balance of the specified address. * * @param _who The address to query the the balance of. * * @return A uint256 representing the amount owned by the passed address. */ function balanceOf(address _who) external override view returns (uint256) { return addressToShares[_who]; } /** * @dev Transfer shares for a specified address * * @param _to The address to transfer to. * @param _value The amount to be transferred. * * @return true upon success */ function transfer(address _to, uint256 _value) external override returns (bool) { require(_to != address(0)); require(_value <= addressToShares[msg.sender]); addressToShares[msg.sender] = addressToShares[msg.sender].sub(_value); addressToShares[_to] = addressToShares[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Transfer shares from one address to another * * @param _from The address which you want to send tokens from * @param _to The address which you want to transfer to * @param _value The amount of shares to be transferred * * @return true upon success */ function transferFrom(address _from, address _to, uint256 _value) external override returns (bool) { require(_to != address(0)); require(_value <= addressToShares[_from]); require(_value <= allowed[_from][msg.sender]); addressToShares[_from] = addressToShares[_from].sub(_value); addressToShares[_to] = addressToShares[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of shares on behalf of msg.sender. * 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 * * @param _spender The address which will spend the funds. * @param _value The amount of shares to be spent. * * @return true upon success */ function approve(address _spender, uint256 _value) external override returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of shares that an owner allowed to a spender. * * @param _owner The address which owns the funds. * @param _spender The address which will spend the funds. * * @return A uint256 specifying the amount of shares still available for the spender. */ function allowance(address _owner, address _spender) external override view returns (uint256) { return allowed[_owner][_spender]; } } /* Note: this smart fund inherits SmartFundCore and make core operations like deposit, calculate fund value etc in ETH */ contract SmartFundETH is SmartFundCore { using SafeMath for uint256; using SafeERC20 for IERC20; /** * @dev constructor * * @param _owner Address of the fund manager * @param _name Name of the fund, required for DetailedERC20 compliance * @param _successFee Percentage of profit that the fund manager receives * @param _platformAddress Address of platform to send fees to * @param _exchangePortalAddress Address of initial exchange portal * @param _poolPortalAddress Address of initial pool portal * @param _defiPortal Address of defi portal * @param _permittedAddresses Address of permittedAddresses contract * @param _isRequireTradeVerification If true fund will require verification from Merkle White list for each new asset */ constructor( address _owner, string memory _name, uint256 _successFee, address _platformAddress, address _exchangePortalAddress, address _poolPortalAddress, address _defiPortal, address _permittedAddresses, bool _isRequireTradeVerification ) SmartFundCore( _owner, _name, _successFee, _platformAddress, _exchangePortalAddress, _poolPortalAddress, _defiPortal, _permittedAddresses, address(0x00eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee), _isRequireTradeVerification ) public{} /** * @dev Deposits ether into the fund and allocates a number of shares to the sender * depending on the current number of shares, the funds value, and amount deposited * * @return The amount of shares allocated to the depositor */ function deposit() external payable returns (uint256) { // Check if the sender is allowed to deposit into the fund if (onlyWhitelist) require(whitelist[msg.sender]); // Require that the amount sent is not 0 require(msg.value != 0, "ZERO_DEPOSIT"); totalWeiDeposited += msg.value; // Calculate number of shares uint256 shares = calculateDepositToShares(msg.value); // If user would receive 0 shares, don't continue with deposit require(shares != 0, "ZERO_SHARES"); // Add shares to total totalShares = totalShares.add(shares); // Add shares to address addressToShares[msg.sender] = addressToShares[msg.sender].add(shares); addressesNetDeposit[msg.sender] += int256(msg.value); emit Deposit(msg.sender, msg.value, shares, totalShares); return shares; } /** * @dev Calculates the funds value in deposit token (Ether) * * @return The current total fund value */ function calculateFundValue() public override view returns (uint256) { uint256 ethBalance = address(this).balance; // If the fund only contains ether, return the funds ether balance if (tokenAddresses.length == 1) return ethBalance; // Otherwise, we get the value of all the other tokens in ether via exchangePortal // Calculate value for ERC20 address[] memory fromAddresses = new address[](tokenAddresses.length - 1); // Sub ETH uint256[] memory amounts = new uint256[](tokenAddresses.length - 1); uint index = 0; for (uint256 i = 1; i < tokenAddresses.length; i++) { fromAddresses[index] = tokenAddresses[i]; amounts[index] = IERC20(tokenAddresses[i]).balanceOf(address(this)); index++; } // Ask the Exchange Portal for the value of all the funds tokens in eth uint256 tokensValue = exchangePortal.getTotalValue( fromAddresses, amounts, address(ETH_TOKEN_ADDRESS) ); // Sum ETH + ERC20 return ethBalance + tokensValue; } /** * @dev get balance of input asset address in ETH ratio * * @param _token token address * * @return balance in ETH */ function getTokenValue(IERC20 _token) public override view returns (uint256) { // return ETH if (_token == ETH_TOKEN_ADDRESS){ return address(this).balance; } // return ERC20 in ETH else{ uint256 tokenBalance = _token.balanceOf(address(this)); return exchangePortal.getValue( address(_token), address(ETH_TOKEN_ADDRESS), tokenBalance ); } } } contract SmartFundETHFactory { address public platfromAddress; constructor(address _platfromAddress) public { platfromAddress = _platfromAddress; } function createSmartFund( address _owner, string memory _name, uint256 _successFee, address _exchangePortalAddress, address _poolPortalAddress, address _defiPortal, address _permittedAddresses, bool _isRequireTradeVerification ) public returns(address) { SmartFundETH smartFundETH = new SmartFundETH( _owner, _name, _successFee, platfromAddress, _exchangePortalAddress, _poolPortalAddress, _defiPortal, _permittedAddresses, _isRequireTradeVerification ); return address(smartFundETH); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_platfromAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_successFee","type":"uint256"},{"internalType":"address","name":"_exchangePortalAddress","type":"address"},{"internalType":"address","name":"_poolPortalAddress","type":"address"},{"internalType":"address","name":"_defiPortal","type":"address"},{"internalType":"address","name":"_permittedAddresses","type":"address"},{"internalType":"bool","name":"_isRequireTradeVerification","type":"bool"}],"name":"createSmartFund","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"platfromAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405161575f38038061575f8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b03199092169190911790556156fa806100656000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063263b42851461003b5780636dce1d721461013c575b600080fd5b610120600480360361010081101561005257600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561007d57600080fd5b82018360208201111561008f57600080fd5b803590602001918460018302840111640100000000831117156100b157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505082359350506001600160a01b03602083013581169260408101358216925060608101358216916080820135169060a001351515610144565b604080516001600160a01b039092168252519081900360200190f35b610120610276565b60008089898960008054906101000a90046001600160a01b03168a8a8a8a8a60405161016f90610285565b808a6001600160a01b0316815260200180602001898152602001886001600160a01b03168152602001876001600160a01b03168152602001866001600160a01b03168152602001856001600160a01b03168152602001846001600160a01b03168152602001831515815260200182810382528a818151815260200191508051906020019080838360005b838110156102115781810151838201526020016101f9565b50505050905090810190601f16801561023e5780820380516001836020036101000a031916815260200191505b509a5050505050505050505050604051809103906000f080158015610267573d6000803e3d6000fd5b509a9950505050505050505050565b6000546001600160a01b031681565b615432806102938339019056fe6000805460ff60a01b19168155600181905560028190556014600855612710600955600e805460ff1990811690915560076010556011829055601291825560178054909116909117905560c0604052600360808190526211939160ea1b60a0908152620000709160189190620004aa565b503480156200007e57600080fd5b5060405162005432380380620054328339818101604052610120811015620000a557600080fd5b815160208301805160405192949293830192919084640100000000821115620000cd57600080fd5b908301906020820185811115620000e357600080fd5b8251640100000000811182820188101715620000fe57600080fd5b82525081516020918201929091019080838360005b838110156200012d57818101518382015260200162000113565b50505050905090810190601f1680156200015b5780820380516001836020036101000a031916815260200191505b5060409081526020820151908201516060830151608084015160a085015160c086015160e09096015194975092955090939092888888888888888873eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee896000620001b862000399565b600080546001600160a01b0319166001600160a01b03831690811782556040519293509160008051602062005412833981519152908290a35060095488106200020057600080fd5b8851620002159060079060208c0190620004aa565b50600b889055600c8890556001600160a01b038a1662000240576200023a336200039d565b6200024b565b6200024b8a6200039d565b6001600160a01b0387166200027257600a80546001600160a01b031916331790556200028e565b600a80546001600160a01b0319166001600160a01b0389161790555b600d80546001810182556000919091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb501805473eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0319918216179091556003805482166001600160a01b0389811691909117909155600480548316888316179055600580548316878316179055600680548316868316179055601380549092169084161760ff60a01b1916600160a01b831515021790556200034b6200049b565b6001600160a01b03167fcfd2fe5515698e8142fdb719161e16367334fd3bf62518298b844bee5228fc1d60405160405180910390a25050505050505050505050505050505050505062000546565b3390565b620003a762000399565b6000546001600160a01b039081169116146200040a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116620004515760405162461bcd60e51b8152600401808060200182810382526026815260200180620053ec6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206200541283398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004ed57805160ff19168380011785556200051d565b828001600101855582156200051d579182015b828111156200051d57825182559160200191906001019062000500565b506200052b9291506200052f565b5090565b5b808211156200052b576000815560010162000530565b614e9680620005566000396000f3fe60806040526004361061038c5760003560e01c80638da5cb5b116101dc578063b20568a911610102578063dd62ed3e116100a0578063eb2b11cb1161006f578063eb2b11cb14611166578063f1c5d6c21461117b578063f2fde38b146111ae578063f47c84c5146111e15761038c565b8063dd62ed3e146110a2578063df498475146110dd578063e5df8b8414611110578063ea05a8c61461113a5761038c565b8063d0e30db0116100dc578063d0e30db01461105b578063d4718fbe14611063578063d997fa4214611078578063dbe55e561461108d5761038c565b8063b20568a914610d88578063c3248fa114610dbb578063c4e70e2e14610f745761038c565b80639c3b850c1161017a578063a734d06011610149578063a734d06014610cf2578063a88e099614610d07578063a9059cbb14610d1c578063a917f85614610d555761038c565b80639c3b850c14610b35578063a1668a5c14610b68578063a309e56014610b7d578063a51bf2f914610cbf5761038c565b806393984486116101b65780639398448614610a9d5780639479948f14610ad857806395d89b4114610aed5780639b19251a14610b025761038c565b80638da5cb5b14610a5e5780639121ba4a14610a73578063936c63d914610a885761038c565b80633f914aef116102c15780636d4ae6801161025f578063715018a61161022e578063715018a614610a0a5780637554fffd14610a1f5780637f37dbb914610a3457806387c3d73e14610a495761038c565b80636d4ae680146107705780636f9251d1146107d55780636ff1c9bc146109a457806370a08231146109d75761038c565b806350464eed1161029b57806350464eed146106fe57806354fd4d50146107135780635a0ad5cb14610728578063612b4f8d1461075b5761038c565b80633f914aef1461067b5780634701522e146106b657806349dc8dd2146106e95761038c565b806323b872dd1161032e578063310b458f11610308578063310b458f146105e0578063313ce5671461061157806333544e231461063c5780633a98ef39146106665761038c565b806323b872dd1461055e57806326232a2e146105a15780632e1a7d4d146105b65761038c565b8063095ea7b31161036a578063095ea7b31461049057806313baf1e6146104dd57806316fe4a081461051657806318160ddd146105495761038c565b8063011d6bb11461038e57806303171a35146103d357806306fdde0314610406575b005b34801561039a57600080fd5b506103c1600480360360208110156103b157600080fd5b50356001600160a01b03166111f6565b60408051918252519081900360200190f35b3480156103df57600080fd5b506103c1600480360360208110156103f657600080fd5b50356001600160a01b031661124c565b34801561041257600080fd5b5061041b61125e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561045557818101518382015260200161043d565b50505050905090810190601f1680156104825780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561049c57600080fd5b506104c9600480360360408110156104b357600080fd5b506001600160a01b0381351690602001356112ec565b604080519115158252519081900360200190f35b3480156104e957600080fd5b5061038c6004803603604081101561050057600080fd5b506001600160a01b038135169060200135611353565b34801561052257600080fd5b5061038c6004803603602081101561053957600080fd5b50356001600160a01b031661158d565b34801561055557600080fd5b506103c16116c8565b34801561056a57600080fd5b506104c96004803603606081101561058157600080fd5b506001600160a01b038135811691602081013590911690604001356116cf565b3480156105ad57600080fd5b506103c1611834565b3480156105c257600080fd5b5061038c600480360360208110156105d957600080fd5b503561183a565b3480156105ec57600080fd5b506105f5611ac8565b604080516001600160a01b039092168252519081900360200190f35b34801561061d57600080fd5b50610626611ad7565b6040805160ff9092168252519081900360200190f35b34801561064857600080fd5b506103c16004803603602081101561065f57600080fd5b5035611ae0565b34801561067257600080fd5b506103c1611b5b565b34801561068757600080fd5b5061038c6004803603604081101561069e57600080fd5b506001600160a01b0381351690602001351515611b61565b3480156106c257600080fd5b506106cb611be4565b60408051938452602084019290925282820152519081900360600190f35b3480156106f557600080fd5b506103c1611c60565b34801561070a57600080fd5b506105f5611c7b565b34801561071f57600080fd5b506103c1611c8a565b34801561073457600080fd5b506103c16004803603602081101561074b57600080fd5b50356001600160a01b0316611c90565b34801561076757600080fd5b506103c1611cbf565b34801561077c57600080fd5b50610785611cc5565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156107c15781810151838201526020016107a9565b505050509050019250505060405180910390f35b3480156107e157600080fd5b5061038c600480360360808110156107f857600080fd5b810190602081018135600160201b81111561081257600080fd5b82018360208201111561082457600080fd5b803590602001918460208302840111600160201b8311171561084557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561089457600080fd5b8201836020820111156108a657600080fd5b803590602001918460208302840111600160201b831117156108c757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561091657600080fd5b82018360208201111561092857600080fd5b803590602001918460208302840111600160201b8311171561094957600080fd5b919390929091602081019035600160201b81111561096657600080fd5b82018360208201111561097857600080fd5b803590602001918460018302840111600160201b8311171561099957600080fd5b509092509050611d27565b3480156109b057600080fd5b5061038c600480360360208110156109c757600080fd5b50356001600160a01b0316612630565b3480156109e357600080fd5b506103c1600480360360208110156109fa57600080fd5b50356001600160a01b03166127f4565b348015610a1657600080fd5b5061038c61280f565b348015610a2b57600080fd5b506103c16128b1565b348015610a4057600080fd5b506105f56128b7565b348015610a5557600080fd5b506104c96128c6565b348015610a6a57600080fd5b506105f56128d6565b348015610a7f57600080fd5b506103c16128e5565b348015610a9457600080fd5b506103c1612bd3565b348015610aa957600080fd5b5061038c60048036036040811015610ac057600080fd5b506001600160a01b0381358116916020013516612bd9565b348015610ae457600080fd5b506105f5612cb9565b348015610af957600080fd5b5061041b612cc8565b348015610b0e57600080fd5b506104c960048036036020811015610b2557600080fd5b50356001600160a01b0316612d23565b348015610b4157600080fd5b5061038c60048036036020811015610b5857600080fd5b50356001600160a01b0316612d38565b348015610b7457600080fd5b506103c1612e73565b348015610b8957600080fd5b5061038c6004803603610100811015610ba157600080fd5b6001600160a01b0382358116926020810135926040820135909216916060820135919081019060a081016080820135600160201b811115610be157600080fd5b820183602082011115610bf357600080fd5b803590602001918460208302840111600160201b83111715610c1457600080fd5b919390929091602081019035600160201b811115610c3157600080fd5b820183602082011115610c4357600080fd5b803590602001918460208302840111600160201b83111715610c6457600080fd5b919390929091602081019035600160201b811115610c8157600080fd5b820183602082011115610c9357600080fd5b803590602001918460018302840111600160201b83111715610cb457600080fd5b919350915035612e79565b348015610ccb57600080fd5b506103c160048036036020811015610ce257600080fd5b50356001600160a01b0316613396565b348015610cfe57600080fd5b5061038c61343c565b348015610d1357600080fd5b506104c9613632565b348015610d2857600080fd5b506104c960048036036040811015610d3f57600080fd5b506001600160a01b03813516906020013561363b565b348015610d6157600080fd5b506103c160048036036020811015610d7857600080fd5b50356001600160a01b0316613710565b348015610d9457600080fd5b5061038c60048036036020811015610dab57600080fd5b50356001600160a01b0316613722565b348015610dc757600080fd5b5061038c600480360360e0811015610dde57600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b811115610e1457600080fd5b820183602082011115610e2657600080fd5b803590602001918460208302840111600160201b83111715610e4757600080fd5b919390929091602081019035600160201b811115610e6457600080fd5b820183602082011115610e7657600080fd5b803590602001918460208302840111600160201b83111715610e9757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610ee657600080fd5b820183602082011115610ef857600080fd5b803590602001918460208302840111600160201b83111715610f1957600080fd5b919390929091602081019035600160201b811115610f3657600080fd5b820183602082011115610f4857600080fd5b803590602001918460018302840111600160201b83111715610f6957600080fd5b50909250905061385d565b348015610f8057600080fd5b5061038c600480360360a0811015610f9757600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b811115610fcd57600080fd5b820183602082011115610fdf57600080fd5b803590602001918460208302840111600160201b8311171561100057600080fd5b919390929091602081019035600160201b81111561101d57600080fd5b82018360208201111561102f57600080fd5b803590602001918460018302840111600160201b8311171561105057600080fd5b509092509050613e81565b6103c1614283565b34801561106f57600080fd5b506103c16143e1565b34801561108457600080fd5b506104c96143e7565b34801561109957600080fd5b506105f56143f7565b3480156110ae57600080fd5b506103c1600480360360408110156110c557600080fd5b506001600160a01b0381358116916020013516614406565b3480156110e957600080fd5b506104c96004803603602081101561110057600080fd5b50356001600160a01b0316614431565b34801561111c57600080fd5b506105f56004803603602081101561113357600080fd5b5035614446565b34801561114657600080fd5b5061038c6004803603602081101561115d57600080fd5b5035151561446d565b34801561117257600080fd5b506105f56144d8565b34801561118757600080fd5b506103c16004803603602081101561119e57600080fd5b50356001600160a01b03166144e7565b3480156111ba57600080fd5b5061038c600480360360208110156111d157600080fd5b50356001600160a01b0316614635565b3480156111ed57600080fd5b506103c161472d565b60006011546000141561120b57506000611247565b6011546001600160a01b038316600090815260146020526040902054611244919061123e906112386128e5565b90614733565b90614793565b90505b919050565b60166020526000908152604090205481565b6007805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156112e45780601f106112b9576101008083540402835291602001916112e4565b820191906000526020600020905b8154815290600101906020018083116112c757829003601f168201915b505050505081565b3360008181526019602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b61135b6147d5565b6000546001600160a01b039081169116146113ab576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156113d557600080fd5b6001600160a01b03821660009081526015602052604090205460ff166113fa57600080fd5b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b15801561144057600080fd5b505afa158015611454573d6000803e3d6000fd5b505050506040513d602081101561146a57600080fd5b50511561147657600080fd5b816001600160a01b0316600d828154811061148d57fe5b6000918252602090912001546001600160a01b0316146114ac57600080fd5b6001600160a01b0382166000908152601560205260409020805460ff19169055600d805460001981019190829081106114e157fe5b600091825260209091200154600d80546001600160a01b03909216918490811061150757fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600d818154811061154257fe5b600091825260209091200180546001600160a01b0319169055600d80548061156657fe5b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b6115956147d5565b6000546001600160a01b039081169116146115e5576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600654604080516350c9e9cb60e11b81526001600160a01b038481166004830152600360248301529151919092169163a193d396916044808301926020929190829003018186803b15801561163957600080fd5b505afa15801561164d573d6000803e3d6000fd5b505050506040513d602081101561166357600080fd5b50516116a6576040805162461bcd60e51b815260206004820152600d60248201526c57524f4e475f4144445245535360981b604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6011545b90565b60006001600160a01b0383166116e457600080fd5b6001600160a01b03841660009081526014602052604090205482111561170957600080fd5b6001600160a01b038416600090815260196020908152604080832033845290915290205482111561173957600080fd5b6001600160a01b03841660009081526014602052604090205461175c90836147d9565b6001600160a01b03808616600090815260146020526040808220939093559085168152205461178b908361481b565b6001600160a01b0380851660009081526014602090815260408083209490945591871681526019825282812033825290915220546117c990836147d9565b6001600160a01b03808616600081815260196020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b600c5481565b60115461187d576040805162461bcd60e51b815260206004820152600c60248201526b454d5054595f53484152455360a01b604482015290519081900360640190fd5b6009548111156118c8576040805162461bcd60e51b8152602060048201526011602482015270125390d3d4949150d517d4115490d15395607a1b604482015290519081900360640190fd5b600081156118d657816118da565b6009545b33600090815260146020526040812054600954929350916118ff9061123e8486614733565b905060008061190c611be4565b509092509050600061192c8261123e61192582876147d9565b8790614733565b6040805160018082528183019092529192506060919060208083019080368337019050509050338160008151811061196057fe5b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252606091816020016020820280368337019050509050601154816000815181106119ad57fe5b602090810291909101015260408051600180825281830190925260609181602001602082028036833701905050905083816000815181106119ea57fe5b602002602001018181525050611a01818385614875565b50601154600090611a169061123e8888614733565b600254909150611a26908261481b565b60025533600090815260166020526040902080548290039055601154611a4c90896147d9565b60115533600090815260146020526040902054611a6990896147d9565b336000818152601460209081526040918290209390935560115481518c815293840152805191927ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568929081900390910190a25050505050505050505050565b6004546001600160a01b031681565b60175460ff1681565b600080600060115460001415611b0257670de0b6b3a764000092505050611247565b611b0a611be4565b5090925090506000611b2683611b2084886147d9565b906147d9565b905080611b395760009350505050611247565b611b528161123e6011548861473390919063ffffffff16565b95945050505050565b60115481565b611b696147d5565b6000546001600160a01b03908116911614611bb9576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b6000806000611bf16128e5565b91506000611c0c60125460025461481b90919063ffffffff16565b600154039050808313611c26576000915060009350611c5a565b600954600b5482850391611c3f9161123e908490614733565b9250611c56601254846147d990919063ffffffff16565b9450505b50909192565b600080611c6b6128e5565b6001546002549091010391505090565b6005546001600160a01b031681565b60105481565b600080611c9c836111f6565b6001600160a01b0384166000908152601660205260409020549003915050919050565b60125481565b6060600d805480602002602001604051908101604052809291908181526020018280548015611d1d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611cff575b5050505050905090565b611d2f6147d5565b6000546001600160a01b03908116911614611d7f576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b60608060606000611da68a8a600560009054906101000a90046001600160a01b0316614ace565b905080156120fa57600560009054906101000a90046001600160a01b03166001600160a01b031663afc4a608828c8c8a8a8e8e6040518863ffffffff1660e01b8152600401808060200180602001806020018060200185810385528b818151815260200191508051906020019060200280838360005b83811015611e34578181015183820152602001611e1c565b5050505090500185810384528a818151815260200191508051906020019060200280838360005b83811015611e73578181015183820152602001611e5b565b505050509050018581038352898982818152602001925080828437600083820152601f01601f19169091018681038352878152602090810191508890880280828437600081840152601f19601f8201169050808301925050509a50505050505050505050506000604051808303818588803b158015611ef157600080fd5b505af1158015611f05573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526060811015611f2f57600080fd5b8101908080516040519392919084600160201b821115611f4e57600080fd5b908301906020820185811115611f6357600080fd5b8251600160201b811182820188101715611f7c57600080fd5b82525081516020918201929091019080838360005b83811015611fa9578181015183820152602001611f91565b50505050905090810190601f168015611fd65780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b821115611ff857600080fd5b90830190602082018581111561200d57600080fd5b82518660208202830111600160201b8211171561202957600080fd5b82525081516020918201928201910280838360005b8381101561205657818101518382015260200161203e565b5050505090500160405260200180516040519392919084600160201b82111561207e57600080fd5b90830190602082018581111561209357600080fd5b82518660208202830111600160201b821117156120af57600080fd5b82525081516020918201928201910280838360005b838110156120dc5781810151838201526020016120c4565b50505050905001604052505050809450819550829650505050612440565b600560009054906101000a90046001600160a01b03166001600160a01b031663b9d04fe08b8b89898d8d6040518763ffffffff1660e01b8152600401808060200180602001806020018060200185810385528b818151815260200191508051906020019060200280838360005b8381101561217f578181015183820152602001612167565b5050505090500185810384528a818151815260200191508051906020019060200280838360005b838110156121be5781810151838201526020016121a6565b505050509050018581038352898982818152602001925080828437600083820152601f01601f19169091018681038352878152602090810191508890880280828437600081840152601f19601f8201169050808301925050509a5050505050505050505050600060405180830381600087803b15801561223d57600080fd5b505af1158015612251573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052606081101561227a57600080fd5b8101908080516040519392919084600160201b82111561229957600080fd5b9083019060208201858111156122ae57600080fd5b8251600160201b8111828201881017156122c757600080fd5b82525081516020918201929091019080838360005b838110156122f45781810151838201526020016122dc565b50505050905090810190601f1680156123215780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b82111561234357600080fd5b90830190602082018581111561235857600080fd5b82518660208202830111600160201b8211171561237457600080fd5b82525081516020918201928201910280838360005b838110156123a1578181015183820152602001612389565b5050505090500160405260200180516040519392919084600160201b8211156123c957600080fd5b9083019060208201858111156123de57600080fd5b82518660208202830111600160201b821117156123fa57600080fd5b82525081516020918201928201910280838360005b8381101561242757818101518382015260200161240f565b5050505091909101604052509498509296509094505050505b60005b83518160ff1610156124765761246e848260ff168151811061246157fe5b6020026020010151614c00565b600101612443565b507f603b4f2d9b20ed8126794125935cb9c2f3066d39f665598d6ab74114569b13fa848b8b868660405180806020018060200180602001806020018060200186810386528b818151815260200191508051906020019080838360005b838110156124ea5781810151838201526020016124d2565b50505050905090810190601f1680156125175780820380516001836020036101000a031916815260200191505b5086810385528a5181528a51602091820191808d01910280838360005b8381101561254c578181015183820152602001612534565b50505050905001868103845289818151815260200191508051906020019060200280838360005b8381101561258b578181015183820152602001612573565b50505050905001868103835288818151815260200191508051906020019060200280838360005b838110156125ca5781810151838201526020016125b2565b50505050905001868103825287818151815260200191508051906020019060200280838360005b838110156126095781810151838201526020016125f1565b505050509050019a505050505050505050505060405180910390a150505050505050505050565b6126386147d5565b6000546001600160a01b03908116911614612688576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b6011541561269557600080fd5b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156126ec5760405133904780156108fc02916000818181858888f193505050501580156126e6573d6000803e3d6000fd5b506127f1565b806001600160a01b031663a9059cbb33836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561274957600080fd5b505afa15801561275d573d6000803e3d6000fd5b505050506040513d602081101561277357600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b1580156127c457600080fd5b505af11580156127d8573d6000803e3d6000fd5b505050506040513d60208110156127ee57600080fd5b50505b50565b6001600160a01b031660009081526014602052604090205490565b6128176147d5565b6000546001600160a01b03908116911614612867576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600b5481565b6013546001600160a01b031681565b600054600160a01b900460ff1681565b6000546001600160a01b031690565b600d546000904790600114156128fc5790506116cc565b600d546060906000190167ffffffffffffffff8111801561291c57600080fd5b50604051908082528060200260200182016040528015612946578160200160208202803683370190505b50600d549091506060906000190167ffffffffffffffff8111801561296a57600080fd5b50604051908082528060200260200182016040528015612994578160200160208202803683370190505b509050600060015b600d54811015612aaa57600d81815481106129b357fe5b9060005260206000200160009054906101000a90046001600160a01b03168483815181106129dd57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050600d8181548110612a0a57fe5b60009182526020918290200154604080516370a0823160e01b815230600482015290516001600160a01b03909216926370a0823192602480840193829003018186803b158015612a5957600080fd5b505afa158015612a6d573d6000803e3d6000fd5b505050506040513d6020811015612a8357600080fd5b50518351849084908110612a9357fe5b60209081029190910101526001918201910161299c565b50600354604051633ed0f67d60e21b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee604482018190526060600483019081528651606484015286516000946001600160a01b03169363fb43d9f493899389939192909182916024810191608490910190602080890191028083838e5b83811015612b35578181015183820152602001612b1d565b50505050905001838103825285818151815260200191508051906020019060200280838360005b83811015612b74578181015183820152602001612b5c565b505050509050019550505050505060206040518083038186803b158015612b9a57600080fd5b505afa158015612bae573d6000803e3d6000fd5b505050506040513d6020811015612bc457600080fd5b50519490940194505050505090565b60095481565b612be16147d5565b6000546001600160a01b03908116911614612c31576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b816001600160a01b031663095ea7b38260006040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612c8957600080fd5b505af1158015612c9d573d6000803e3d6000fd5b505050506040513d6020811015612cb357600080fd5b50505050565b6003546001600160a01b031681565b6018805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156112e45780601f106112b9576101008083540402835291602001916112e4565b600f6020526000908152604090205460ff1681565b612d406147d5565b6000546001600160a01b03908116911614612d90576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600654604080516350c9e9cb60e11b81526001600160a01b038481166004830152600160248301529151919092169163a193d396916044808301926020929190829003018186803b158015612de457600080fd5b505afa158015612df8573d6000803e3d6000fd5b505050506040513d6020811015612e0e57600080fd5b5051612e51576040805162461bcd60e51b815260206004820152600d60248201526c57524f4e475f4144445245535360981b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60025481565b612e816147d5565b6000546001600160a01b03908116911614612ed1576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b60008111612f15576040805162461bcd60e51b815260206004820152600c60248201526b04d494e5f52455455524e5f360a41b604482015290519081900360640190fd5b60006001600160a01b038c1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156130e7578a471015612f82576040805162461bcd60e51b815260206004820152600e60248201526d09c9ea8be8a9c9eaa8e90be8aa8960931b604482015290519081900360640190fd5b600360009054906101000a90046001600160a01b03166001600160a01b0316630990ba518c8e8e8e8e8e8e8e8e8e8e601360149054906101000a900460ff166040518d63ffffffff1660e01b8152600401808c6001600160a01b031681526020018b81526020018a6001600160a01b03168152602001898152602001806020018060200180602001851515815260200184810384528b8b82818152602001925060200280828437600083820152601f01601f19169091018581038452898152602090810191508a908a0280828437600083820152601f01601f191690910185810383528781526020019050878780828437600081840152601f19601f8201169050808301925050509e5050505050505050505050505050506020604051808303818588803b1580156130b357600080fd5b505af11580156130c7573d6000803e3d6000fd5b50505050506040513d60208110156130de57600080fd5b505190506132d9565b6003546040805163095ea7b360e01b81526001600160a01b039283166004820152602481018e90529051918e169163095ea7b3916044808201926020929091908290030181600087803b15801561313d57600080fd5b505af1158015613151573d6000803e3d6000fd5b505050506040513d602081101561316757600080fd5b810190808051906020019092919050505050600360009054906101000a90046001600160a01b03166001600160a01b0316630990ba518d8d8d8d8d8d8d8d8d8d601360149054906101000a900460ff166040518c63ffffffff1660e01b8152600401808c6001600160a01b031681526020018b81526020018a6001600160a01b03168152602001898152602001806020018060200180602001851515815260200184810384528b8b82818152602001925060200280828437600083820152601f01601f19169091018581038452898152602090810191508a908a0280828437600083820152601f01601f191690910185810383528781526020019050878780828437600081840152601f19601f8201169050808301925050509e505050505050505050505050505050602060405180830381600087803b1580156132aa57600080fd5b505af11580156132be573d6000803e3d6000fd5b505050506040513d60208110156132d457600080fd5b505190505b8181101561332e576040805162461bcd60e51b815260206004820152601d60248201527f52454345495645445f4c4553535f5448414e5f4d494e5f52455455524e000000604482015290519081900360640190fd5b6133378a614c00565b604080516001600160a01b03808f168252602082018e90528c16818301526060810183905290517f3c9f9e05a5650785677adb0f72e5645fb18750d08069c5f0c3b4ea72962c2fdb9181900360800190a1505050505050505050505050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156133c4575047611247565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b15801561340a57600080fd5b505afa15801561341e573d6000803e3d6000fd5b505050506040513d602081101561343457600080fd5b505192915050565b6134446147d5565b6000546001600160a01b03908116911614613494576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b60008061349f611be4565b50600c549193509150600090156134d0576134cb60095461123e600c548661473390919063ffffffff16565b6134d3565b60005b6040805160028082526060808301845293945090916020830190803683375050600a5482519293506001600160a01b03169183915060009061351157fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506135396128d6565b8160018151811061354657fe5b6001600160a01b0392909216602092830291909101909101526040805160028082526060828101909352816020016020820280368337019050509050838160008151811061359057fe5b60200260200101818152505083816001815181106135aa57fe5b6020908102919091010152604080516002808252606082810190935281602001602082028036833701905050905083816000815181106135e657fe5b6020026020010181815250508386038160018151811061360257fe5b602002602001018181525050613619818385614875565b50601254613627908761481b565b601255505050505050565b600e5460ff1681565b60006001600160a01b03831661365057600080fd5b3360009081526014602052604090205482111561366c57600080fd5b3360009081526014602052604090205461368690836147d9565b33600090815260146020526040808220929092556001600160a01b038516815220546136b2908361481b565b6001600160a01b0384166000818152601460209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60146020526000908152604090205481565b61372a6147d5565b6000546001600160a01b0390811691161461377a576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600654604080516350c9e9cb60e11b81526001600160a01b038481166004830152600260248301529151919092169163a193d396916044808301926020929190829003018186803b1580156137ce57600080fd5b505afa1580156137e2573d6000803e3d6000fd5b505050506040513d60208110156137f857600080fd5b505161383b576040805162461bcd60e51b815260206004820152600d60248201526c57524f4e475f4144445245535360981b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6138656147d5565b6000546001600160a01b039081169116146138b5576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600080613902898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506004548b92506001600160a01b03169050614ace565b90508015613b3757600460009054906101000a90046001600160a01b03166001600160a01b031663c3248fa1828e8e8e8e8e8e8e8e8e8e6040518c63ffffffff1660e01b8152600401808b81526020018a8152602001896001600160a01b031681526020018060200180602001806020018060200185810385528c8c828181526020019250602002808284376000838201819052601f909101601f191690920187810386528c5181528c51602091820193828f0193509102908190849084905b838110156139da5781810151838201526020016139c2565b505050509050018581038352898982818152602001925060200280828437600083820152601f01601f191690910186810383528781526020019050878780828437600081840152601f19601f8201169050808301925050509e5050505050505050505050505050506000604051808303818588803b158015613a5b57600080fd5b505af1158015613a6f573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040908152811015613a9957600080fd5b815160208301805160405192949293830192919084600160201b821115613abf57600080fd5b908301906020820185811115613ad457600080fd5b82518660208202830111600160201b82111715613af057600080fd5b82525081516020918201928201910280838360005b83811015613b1d578181015183820152602001613b05565b505050509050016040525050508098508193505050613d5f565b600460009054906101000a90046001600160a01b03166001600160a01b031663c3248fa18d8d8d8d8d8d8d8d8d8d6040518b63ffffffff1660e01b8152600401808b81526020018a8152602001896001600160a01b031681526020018060200180602001806020018060200185810385528c8c828181526020019250602002808284376000838201819052601f909101601f191690920187810386528c5181528c51602091820193828f0193509102908190849084905b83811015613c06578181015183820152602001613bee565b505050509050018581038352898982818152602001925060200280828437600083820152601f01601f191690910186810383528781526020019050878780828437600081840152601f19601f8201169050808301925050509e505050505050505050505050505050600060405180830381600087803b158015613c8857600080fd5b505af1158015613c9c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040908152811015613cc557600080fd5b815160208301805160405192949293830192919084600160201b821115613ceb57600080fd5b908301906020820185811115613d0057600080fd5b82518660208202830111600160201b82111715613d1c57600080fd5b82525081516020918201928201910280838360005b83811015613d49578181015183820152602001613d31565b5050505090500160405250505080985081935050505b60008211613da8576040805162461bcd60e51b815260206004820152601160248201527022a6a82a2cafa827a7a62fa922aa2aa92760791b604482015290519081900360640190fd5b613db18a614c00565b7f5577632910cbe4b7fccce2e0ee2761f54f5314ff95cd0bf2b3508f03295ef9368a838b8b8b60405180866001600160a01b03168152602001858152602001806020018060200183810383528686828181526020019250602002808284376000838201819052601f909101601f1916909201858103845286518152865160209182019382890193509102908190849084905b83811015613e5b578181015183820152602001613e43565b5050505090500197505050505050505060405180910390a1505050505050505050505050565b613e896147d5565b6000546001600160a01b03908116911614613ed9576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600480546040805163095ea7b360e01b81526001600160a01b0392831693810193909352602483018a9052519087169163095ea7b39160448083019260209291908290030181600087803b158015613f3057600080fd5b505af1158015613f44573d6000803e3d6000fd5b505050506040513d6020811015613f5a57600080fd5b505060048054604051636273871760e11b8152918201898152602483018990526001600160a01b03888116604485015260a06064850190815260a485018890526060948594929092169263c4e70e2e928d928d928d928d928d928d928d9290608481019060c401876020880280828437600083820152601f01601f191690910184810383528581526020019050858580828437600081840152601f19601f8201169050808301925050509950505050505050505050600060405180830381600087803b15801561402957600080fd5b505af115801561403d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561406657600080fd5b8101908080516040519392919084600160201b82111561408557600080fd5b90830190602082018581111561409a57600080fd5b82518660208202830111600160201b821117156140b657600080fd5b82525081516020918201928201910280838360005b838110156140e35781810151838201526020016140cb565b5050505090500160405260200180516040519392919084600160201b82111561410b57600080fd5b90830190602082018581111561412057600080fd5b82518660208202830111600160201b8211171561413c57600080fd5b82525081516020918201928201910280838360005b83811015614169578181015183820152602001614151565b505050509050016040525050509150915060005b82518160ff1610156141a35761419b838260ff168151811061246157fe5b60010161417d565b507f2db27c5c73722c4d363acff8ca3cd09a9e3c57c1c410631f8f6e4005e7fcde15878a848460405180856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561422257818101518382015260200161420a565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015614261578181015183820152602001614249565b50505050905001965050505050505060405180910390a1505050505050505050565b600e5460009060ff16156142ad57336000908152600f602052604090205460ff166142ad57600080fd5b346142ee576040805162461bcd60e51b815260206004820152600c60248201526b16915493d7d1115413d4d25560a21b604482015290519081900360640190fd5b600180543490810190915560009061430590611ae0565b905080614347576040805162461bcd60e51b815260206004820152600b60248201526a5a45524f5f53484152455360a81b604482015290519081900360640190fd5b601154614354908261481b565b60115533600090815260146020526040902054614371908261481b565b336000818152601460209081526040808320949094556016815290839020805434908101909155601154845191825291810185905280840191909152915190917f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e919081900360600190a2905090565b60015481565b601354600160a01b900460ff1681565b600a546001600160a01b031681565b6001600160a01b03918216600090815260196020908152604080832093909416825291909152205490565b60156020526000908152604090205460ff1681565b600d818154811061445357fe5b6000918252602090912001546001600160a01b0316905081565b6144756147d5565b6000546001600160a01b039081169116146144c5576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600e805460ff1916911515919091179055565b6006546001600160a01b031681565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415614515575047611247565b6000826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561456457600080fd5b505afa158015614578573d6000803e3d6000fd5b505050506040513d602081101561458e57600080fd5b505160035460408051636cbbd94160e11b81526001600160a01b03878116600483015273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee602483015260448201859052915193945091169163d977b28291606480820192602092909190829003018186803b15801561460057600080fd5b505afa158015614614573d6000803e3d6000fd5b505050506040513d602081101561462a57600080fd5b505191506112479050565b61463d6147d5565b6000546001600160a01b0390811691161461468d576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b6001600160a01b0381166146d25760405162461bcd60e51b8152600401808060200182810382526026815260200180614dfa6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60085481565b6000826147425750600061134d565b8282028284828161474f57fe5b041461478c5760405162461bcd60e51b8152600401808060200182810382526021815260200180614e206021913960400191505060405180910390fd5b9392505050565b600061478c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614cfd565b3390565b600061478c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614d9f565b60008282018381101561478c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600060015b600d5460ff82161015614a24576000600d8260ff168154811061489957fe5b6000918252602080832090910154604080516370a0823160e01b815230600482015290516001600160a01b03909216945084926370a0823192602480840193829003018186803b1580156148ec57600080fd5b505afa158015614900573d6000803e3d6000fd5b505050506040513d602081101561491657600080fd5b5051905060005b85518160ff161015614a1957600061496e888360ff168151811061493d57fe5b602002602001015161123e8b8560ff168151811061495757fe5b60200260200101518661473390919063ffffffff16565b90508015614a1057836001600160a01b031663a9059cbb888460ff168151811061499457fe5b6020026020010151836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156149e357600080fd5b505af11580156149f7573d6000803e3d6000fd5b505050506040513d6020811015614a0d57600080fd5b50505b5060010161491d565b50505060010161487a565b504760005b83518160ff161015614ac5576000614a63868360ff1681518110614a4957fe5b602002602001015161123e898560ff168151811061495757fe5b90508015614abc57848260ff1681518110614a7a57fe5b60200260200101516001600160a01b03166108fc829081150290604051600060405180830381858888f19350505050158015614aba573d6000803e3d6000fd5b505b50600101614a29565b50509392505050565b6000805b84518160ff161015614bf85773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0316858260ff1681518110614b0b57fe5b60200260200101516001600160a01b031614614bd657848160ff1681518110614b3057fe5b60200260200101516001600160a01b031663095ea7b384868460ff1681518110614b5657fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015614ba457600080fd5b505af1158015614bb8573d6000803e3d6000fd5b505050506040513d6020811015614bce57600080fd5b50614bf09050565b838160ff1681518110614be557fe5b602002602001015191505b600101614ad2565b509392505050565b6001600160a01b03811660009081526015602052604090205460ff1680614c4357506001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145b15614c4d576127f1565b6001600160a01b0381166000818152601560205260408120805460ff19166001908117909155600d80549182018155918290527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b03191690921790915554600854811115614cf9576040805162461bcd60e51b815260206004820152600a6024820152694d41585f544f4b454e5360b01b604482015290519081900360640190fd5b5050565b60008183614d895760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614d4e578181015183820152602001614d36565b50505050905090810190601f168015614d7b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614d9557fe5b0495945050505050565b60008184841115614df15760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315614d4e578181015183820152602001614d36565b50505090039056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220f079a55f0d4520870b38b04f021cea40d8a8d4caaa756b2aa58e8d93d3d3f56f64736f6c634300060c00334f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573738be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220e8ab8d6695f13d669fb3a4fc64b002bea3f288c1f750baf42d91b6a14f96ff2364736f6c634300060c0033000000000000000000000000c9d742f23b4f10a3da83821481d1b4ed8a596109
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063263b42851461003b5780636dce1d721461013c575b600080fd5b610120600480360361010081101561005257600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561007d57600080fd5b82018360208201111561008f57600080fd5b803590602001918460018302840111640100000000831117156100b157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505082359350506001600160a01b03602083013581169260408101358216925060608101358216916080820135169060a001351515610144565b604080516001600160a01b039092168252519081900360200190f35b610120610276565b60008089898960008054906101000a90046001600160a01b03168a8a8a8a8a60405161016f90610285565b808a6001600160a01b0316815260200180602001898152602001886001600160a01b03168152602001876001600160a01b03168152602001866001600160a01b03168152602001856001600160a01b03168152602001846001600160a01b03168152602001831515815260200182810382528a818151815260200191508051906020019080838360005b838110156102115781810151838201526020016101f9565b50505050905090810190601f16801561023e5780820380516001836020036101000a031916815260200191505b509a5050505050505050505050604051809103906000f080158015610267573d6000803e3d6000fd5b509a9950505050505050505050565b6000546001600160a01b031681565b615432806102938339019056fe6000805460ff60a01b19168155600181905560028190556014600855612710600955600e805460ff1990811690915560076010556011829055601291825560178054909116909117905560c0604052600360808190526211939160ea1b60a0908152620000709160189190620004aa565b503480156200007e57600080fd5b5060405162005432380380620054328339818101604052610120811015620000a557600080fd5b815160208301805160405192949293830192919084640100000000821115620000cd57600080fd5b908301906020820185811115620000e357600080fd5b8251640100000000811182820188101715620000fe57600080fd5b82525081516020918201929091019080838360005b838110156200012d57818101518382015260200162000113565b50505050905090810190601f1680156200015b5780820380516001836020036101000a031916815260200191505b5060409081526020820151908201516060830151608084015160a085015160c086015160e09096015194975092955090939092888888888888888873eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee896000620001b862000399565b600080546001600160a01b0319166001600160a01b03831690811782556040519293509160008051602062005412833981519152908290a35060095488106200020057600080fd5b8851620002159060079060208c0190620004aa565b50600b889055600c8890556001600160a01b038a1662000240576200023a336200039d565b6200024b565b6200024b8a6200039d565b6001600160a01b0387166200027257600a80546001600160a01b031916331790556200028e565b600a80546001600160a01b0319166001600160a01b0389161790555b600d80546001810182556000919091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb501805473eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0319918216179091556003805482166001600160a01b0389811691909117909155600480548316888316179055600580548316878316179055600680548316868316179055601380549092169084161760ff60a01b1916600160a01b831515021790556200034b6200049b565b6001600160a01b03167fcfd2fe5515698e8142fdb719161e16367334fd3bf62518298b844bee5228fc1d60405160405180910390a25050505050505050505050505050505050505062000546565b3390565b620003a762000399565b6000546001600160a01b039081169116146200040a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116620004515760405162461bcd60e51b8152600401808060200182810382526026815260200180620053ec6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206200541283398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004ed57805160ff19168380011785556200051d565b828001600101855582156200051d579182015b828111156200051d57825182559160200191906001019062000500565b506200052b9291506200052f565b5090565b5b808211156200052b576000815560010162000530565b614e9680620005566000396000f3fe60806040526004361061038c5760003560e01c80638da5cb5b116101dc578063b20568a911610102578063dd62ed3e116100a0578063eb2b11cb1161006f578063eb2b11cb14611166578063f1c5d6c21461117b578063f2fde38b146111ae578063f47c84c5146111e15761038c565b8063dd62ed3e146110a2578063df498475146110dd578063e5df8b8414611110578063ea05a8c61461113a5761038c565b8063d0e30db0116100dc578063d0e30db01461105b578063d4718fbe14611063578063d997fa4214611078578063dbe55e561461108d5761038c565b8063b20568a914610d88578063c3248fa114610dbb578063c4e70e2e14610f745761038c565b80639c3b850c1161017a578063a734d06011610149578063a734d06014610cf2578063a88e099614610d07578063a9059cbb14610d1c578063a917f85614610d555761038c565b80639c3b850c14610b35578063a1668a5c14610b68578063a309e56014610b7d578063a51bf2f914610cbf5761038c565b806393984486116101b65780639398448614610a9d5780639479948f14610ad857806395d89b4114610aed5780639b19251a14610b025761038c565b80638da5cb5b14610a5e5780639121ba4a14610a73578063936c63d914610a885761038c565b80633f914aef116102c15780636d4ae6801161025f578063715018a61161022e578063715018a614610a0a5780637554fffd14610a1f5780637f37dbb914610a3457806387c3d73e14610a495761038c565b80636d4ae680146107705780636f9251d1146107d55780636ff1c9bc146109a457806370a08231146109d75761038c565b806350464eed1161029b57806350464eed146106fe57806354fd4d50146107135780635a0ad5cb14610728578063612b4f8d1461075b5761038c565b80633f914aef1461067b5780634701522e146106b657806349dc8dd2146106e95761038c565b806323b872dd1161032e578063310b458f11610308578063310b458f146105e0578063313ce5671461061157806333544e231461063c5780633a98ef39146106665761038c565b806323b872dd1461055e57806326232a2e146105a15780632e1a7d4d146105b65761038c565b8063095ea7b31161036a578063095ea7b31461049057806313baf1e6146104dd57806316fe4a081461051657806318160ddd146105495761038c565b8063011d6bb11461038e57806303171a35146103d357806306fdde0314610406575b005b34801561039a57600080fd5b506103c1600480360360208110156103b157600080fd5b50356001600160a01b03166111f6565b60408051918252519081900360200190f35b3480156103df57600080fd5b506103c1600480360360208110156103f657600080fd5b50356001600160a01b031661124c565b34801561041257600080fd5b5061041b61125e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561045557818101518382015260200161043d565b50505050905090810190601f1680156104825780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561049c57600080fd5b506104c9600480360360408110156104b357600080fd5b506001600160a01b0381351690602001356112ec565b604080519115158252519081900360200190f35b3480156104e957600080fd5b5061038c6004803603604081101561050057600080fd5b506001600160a01b038135169060200135611353565b34801561052257600080fd5b5061038c6004803603602081101561053957600080fd5b50356001600160a01b031661158d565b34801561055557600080fd5b506103c16116c8565b34801561056a57600080fd5b506104c96004803603606081101561058157600080fd5b506001600160a01b038135811691602081013590911690604001356116cf565b3480156105ad57600080fd5b506103c1611834565b3480156105c257600080fd5b5061038c600480360360208110156105d957600080fd5b503561183a565b3480156105ec57600080fd5b506105f5611ac8565b604080516001600160a01b039092168252519081900360200190f35b34801561061d57600080fd5b50610626611ad7565b6040805160ff9092168252519081900360200190f35b34801561064857600080fd5b506103c16004803603602081101561065f57600080fd5b5035611ae0565b34801561067257600080fd5b506103c1611b5b565b34801561068757600080fd5b5061038c6004803603604081101561069e57600080fd5b506001600160a01b0381351690602001351515611b61565b3480156106c257600080fd5b506106cb611be4565b60408051938452602084019290925282820152519081900360600190f35b3480156106f557600080fd5b506103c1611c60565b34801561070a57600080fd5b506105f5611c7b565b34801561071f57600080fd5b506103c1611c8a565b34801561073457600080fd5b506103c16004803603602081101561074b57600080fd5b50356001600160a01b0316611c90565b34801561076757600080fd5b506103c1611cbf565b34801561077c57600080fd5b50610785611cc5565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156107c15781810151838201526020016107a9565b505050509050019250505060405180910390f35b3480156107e157600080fd5b5061038c600480360360808110156107f857600080fd5b810190602081018135600160201b81111561081257600080fd5b82018360208201111561082457600080fd5b803590602001918460208302840111600160201b8311171561084557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561089457600080fd5b8201836020820111156108a657600080fd5b803590602001918460208302840111600160201b831117156108c757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561091657600080fd5b82018360208201111561092857600080fd5b803590602001918460208302840111600160201b8311171561094957600080fd5b919390929091602081019035600160201b81111561096657600080fd5b82018360208201111561097857600080fd5b803590602001918460018302840111600160201b8311171561099957600080fd5b509092509050611d27565b3480156109b057600080fd5b5061038c600480360360208110156109c757600080fd5b50356001600160a01b0316612630565b3480156109e357600080fd5b506103c1600480360360208110156109fa57600080fd5b50356001600160a01b03166127f4565b348015610a1657600080fd5b5061038c61280f565b348015610a2b57600080fd5b506103c16128b1565b348015610a4057600080fd5b506105f56128b7565b348015610a5557600080fd5b506104c96128c6565b348015610a6a57600080fd5b506105f56128d6565b348015610a7f57600080fd5b506103c16128e5565b348015610a9457600080fd5b506103c1612bd3565b348015610aa957600080fd5b5061038c60048036036040811015610ac057600080fd5b506001600160a01b0381358116916020013516612bd9565b348015610ae457600080fd5b506105f5612cb9565b348015610af957600080fd5b5061041b612cc8565b348015610b0e57600080fd5b506104c960048036036020811015610b2557600080fd5b50356001600160a01b0316612d23565b348015610b4157600080fd5b5061038c60048036036020811015610b5857600080fd5b50356001600160a01b0316612d38565b348015610b7457600080fd5b506103c1612e73565b348015610b8957600080fd5b5061038c6004803603610100811015610ba157600080fd5b6001600160a01b0382358116926020810135926040820135909216916060820135919081019060a081016080820135600160201b811115610be157600080fd5b820183602082011115610bf357600080fd5b803590602001918460208302840111600160201b83111715610c1457600080fd5b919390929091602081019035600160201b811115610c3157600080fd5b820183602082011115610c4357600080fd5b803590602001918460208302840111600160201b83111715610c6457600080fd5b919390929091602081019035600160201b811115610c8157600080fd5b820183602082011115610c9357600080fd5b803590602001918460018302840111600160201b83111715610cb457600080fd5b919350915035612e79565b348015610ccb57600080fd5b506103c160048036036020811015610ce257600080fd5b50356001600160a01b0316613396565b348015610cfe57600080fd5b5061038c61343c565b348015610d1357600080fd5b506104c9613632565b348015610d2857600080fd5b506104c960048036036040811015610d3f57600080fd5b506001600160a01b03813516906020013561363b565b348015610d6157600080fd5b506103c160048036036020811015610d7857600080fd5b50356001600160a01b0316613710565b348015610d9457600080fd5b5061038c60048036036020811015610dab57600080fd5b50356001600160a01b0316613722565b348015610dc757600080fd5b5061038c600480360360e0811015610dde57600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b811115610e1457600080fd5b820183602082011115610e2657600080fd5b803590602001918460208302840111600160201b83111715610e4757600080fd5b919390929091602081019035600160201b811115610e6457600080fd5b820183602082011115610e7657600080fd5b803590602001918460208302840111600160201b83111715610e9757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610ee657600080fd5b820183602082011115610ef857600080fd5b803590602001918460208302840111600160201b83111715610f1957600080fd5b919390929091602081019035600160201b811115610f3657600080fd5b820183602082011115610f4857600080fd5b803590602001918460018302840111600160201b83111715610f6957600080fd5b50909250905061385d565b348015610f8057600080fd5b5061038c600480360360a0811015610f9757600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b811115610fcd57600080fd5b820183602082011115610fdf57600080fd5b803590602001918460208302840111600160201b8311171561100057600080fd5b919390929091602081019035600160201b81111561101d57600080fd5b82018360208201111561102f57600080fd5b803590602001918460018302840111600160201b8311171561105057600080fd5b509092509050613e81565b6103c1614283565b34801561106f57600080fd5b506103c16143e1565b34801561108457600080fd5b506104c96143e7565b34801561109957600080fd5b506105f56143f7565b3480156110ae57600080fd5b506103c1600480360360408110156110c557600080fd5b506001600160a01b0381358116916020013516614406565b3480156110e957600080fd5b506104c96004803603602081101561110057600080fd5b50356001600160a01b0316614431565b34801561111c57600080fd5b506105f56004803603602081101561113357600080fd5b5035614446565b34801561114657600080fd5b5061038c6004803603602081101561115d57600080fd5b5035151561446d565b34801561117257600080fd5b506105f56144d8565b34801561118757600080fd5b506103c16004803603602081101561119e57600080fd5b50356001600160a01b03166144e7565b3480156111ba57600080fd5b5061038c600480360360208110156111d157600080fd5b50356001600160a01b0316614635565b3480156111ed57600080fd5b506103c161472d565b60006011546000141561120b57506000611247565b6011546001600160a01b038316600090815260146020526040902054611244919061123e906112386128e5565b90614733565b90614793565b90505b919050565b60166020526000908152604090205481565b6007805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156112e45780601f106112b9576101008083540402835291602001916112e4565b820191906000526020600020905b8154815290600101906020018083116112c757829003601f168201915b505050505081565b3360008181526019602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b61135b6147d5565b6000546001600160a01b039081169116146113ab576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156113d557600080fd5b6001600160a01b03821660009081526015602052604090205460ff166113fa57600080fd5b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b15801561144057600080fd5b505afa158015611454573d6000803e3d6000fd5b505050506040513d602081101561146a57600080fd5b50511561147657600080fd5b816001600160a01b0316600d828154811061148d57fe5b6000918252602090912001546001600160a01b0316146114ac57600080fd5b6001600160a01b0382166000908152601560205260409020805460ff19169055600d805460001981019190829081106114e157fe5b600091825260209091200154600d80546001600160a01b03909216918490811061150757fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600d818154811061154257fe5b600091825260209091200180546001600160a01b0319169055600d80548061156657fe5b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b6115956147d5565b6000546001600160a01b039081169116146115e5576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600654604080516350c9e9cb60e11b81526001600160a01b038481166004830152600360248301529151919092169163a193d396916044808301926020929190829003018186803b15801561163957600080fd5b505afa15801561164d573d6000803e3d6000fd5b505050506040513d602081101561166357600080fd5b50516116a6576040805162461bcd60e51b815260206004820152600d60248201526c57524f4e475f4144445245535360981b604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6011545b90565b60006001600160a01b0383166116e457600080fd5b6001600160a01b03841660009081526014602052604090205482111561170957600080fd5b6001600160a01b038416600090815260196020908152604080832033845290915290205482111561173957600080fd5b6001600160a01b03841660009081526014602052604090205461175c90836147d9565b6001600160a01b03808616600090815260146020526040808220939093559085168152205461178b908361481b565b6001600160a01b0380851660009081526014602090815260408083209490945591871681526019825282812033825290915220546117c990836147d9565b6001600160a01b03808616600081815260196020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b600c5481565b60115461187d576040805162461bcd60e51b815260206004820152600c60248201526b454d5054595f53484152455360a01b604482015290519081900360640190fd5b6009548111156118c8576040805162461bcd60e51b8152602060048201526011602482015270125390d3d4949150d517d4115490d15395607a1b604482015290519081900360640190fd5b600081156118d657816118da565b6009545b33600090815260146020526040812054600954929350916118ff9061123e8486614733565b905060008061190c611be4565b509092509050600061192c8261123e61192582876147d9565b8790614733565b6040805160018082528183019092529192506060919060208083019080368337019050509050338160008151811061196057fe5b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252606091816020016020820280368337019050509050601154816000815181106119ad57fe5b602090810291909101015260408051600180825281830190925260609181602001602082028036833701905050905083816000815181106119ea57fe5b602002602001018181525050611a01818385614875565b50601154600090611a169061123e8888614733565b600254909150611a26908261481b565b60025533600090815260166020526040902080548290039055601154611a4c90896147d9565b60115533600090815260146020526040902054611a6990896147d9565b336000818152601460209081526040918290209390935560115481518c815293840152805191927ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568929081900390910190a25050505050505050505050565b6004546001600160a01b031681565b60175460ff1681565b600080600060115460001415611b0257670de0b6b3a764000092505050611247565b611b0a611be4565b5090925090506000611b2683611b2084886147d9565b906147d9565b905080611b395760009350505050611247565b611b528161123e6011548861473390919063ffffffff16565b95945050505050565b60115481565b611b696147d5565b6000546001600160a01b03908116911614611bb9576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b6000806000611bf16128e5565b91506000611c0c60125460025461481b90919063ffffffff16565b600154039050808313611c26576000915060009350611c5a565b600954600b5482850391611c3f9161123e908490614733565b9250611c56601254846147d990919063ffffffff16565b9450505b50909192565b600080611c6b6128e5565b6001546002549091010391505090565b6005546001600160a01b031681565b60105481565b600080611c9c836111f6565b6001600160a01b0384166000908152601660205260409020549003915050919050565b60125481565b6060600d805480602002602001604051908101604052809291908181526020018280548015611d1d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611cff575b5050505050905090565b611d2f6147d5565b6000546001600160a01b03908116911614611d7f576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b60608060606000611da68a8a600560009054906101000a90046001600160a01b0316614ace565b905080156120fa57600560009054906101000a90046001600160a01b03166001600160a01b031663afc4a608828c8c8a8a8e8e6040518863ffffffff1660e01b8152600401808060200180602001806020018060200185810385528b818151815260200191508051906020019060200280838360005b83811015611e34578181015183820152602001611e1c565b5050505090500185810384528a818151815260200191508051906020019060200280838360005b83811015611e73578181015183820152602001611e5b565b505050509050018581038352898982818152602001925080828437600083820152601f01601f19169091018681038352878152602090810191508890880280828437600081840152601f19601f8201169050808301925050509a50505050505050505050506000604051808303818588803b158015611ef157600080fd5b505af1158015611f05573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526060811015611f2f57600080fd5b8101908080516040519392919084600160201b821115611f4e57600080fd5b908301906020820185811115611f6357600080fd5b8251600160201b811182820188101715611f7c57600080fd5b82525081516020918201929091019080838360005b83811015611fa9578181015183820152602001611f91565b50505050905090810190601f168015611fd65780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b821115611ff857600080fd5b90830190602082018581111561200d57600080fd5b82518660208202830111600160201b8211171561202957600080fd5b82525081516020918201928201910280838360005b8381101561205657818101518382015260200161203e565b5050505090500160405260200180516040519392919084600160201b82111561207e57600080fd5b90830190602082018581111561209357600080fd5b82518660208202830111600160201b821117156120af57600080fd5b82525081516020918201928201910280838360005b838110156120dc5781810151838201526020016120c4565b50505050905001604052505050809450819550829650505050612440565b600560009054906101000a90046001600160a01b03166001600160a01b031663b9d04fe08b8b89898d8d6040518763ffffffff1660e01b8152600401808060200180602001806020018060200185810385528b818151815260200191508051906020019060200280838360005b8381101561217f578181015183820152602001612167565b5050505090500185810384528a818151815260200191508051906020019060200280838360005b838110156121be5781810151838201526020016121a6565b505050509050018581038352898982818152602001925080828437600083820152601f01601f19169091018681038352878152602090810191508890880280828437600081840152601f19601f8201169050808301925050509a5050505050505050505050600060405180830381600087803b15801561223d57600080fd5b505af1158015612251573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052606081101561227a57600080fd5b8101908080516040519392919084600160201b82111561229957600080fd5b9083019060208201858111156122ae57600080fd5b8251600160201b8111828201881017156122c757600080fd5b82525081516020918201929091019080838360005b838110156122f45781810151838201526020016122dc565b50505050905090810190601f1680156123215780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084600160201b82111561234357600080fd5b90830190602082018581111561235857600080fd5b82518660208202830111600160201b8211171561237457600080fd5b82525081516020918201928201910280838360005b838110156123a1578181015183820152602001612389565b5050505090500160405260200180516040519392919084600160201b8211156123c957600080fd5b9083019060208201858111156123de57600080fd5b82518660208202830111600160201b821117156123fa57600080fd5b82525081516020918201928201910280838360005b8381101561242757818101518382015260200161240f565b5050505091909101604052509498509296509094505050505b60005b83518160ff1610156124765761246e848260ff168151811061246157fe5b6020026020010151614c00565b600101612443565b507f603b4f2d9b20ed8126794125935cb9c2f3066d39f665598d6ab74114569b13fa848b8b868660405180806020018060200180602001806020018060200186810386528b818151815260200191508051906020019080838360005b838110156124ea5781810151838201526020016124d2565b50505050905090810190601f1680156125175780820380516001836020036101000a031916815260200191505b5086810385528a5181528a51602091820191808d01910280838360005b8381101561254c578181015183820152602001612534565b50505050905001868103845289818151815260200191508051906020019060200280838360005b8381101561258b578181015183820152602001612573565b50505050905001868103835288818151815260200191508051906020019060200280838360005b838110156125ca5781810151838201526020016125b2565b50505050905001868103825287818151815260200191508051906020019060200280838360005b838110156126095781810151838201526020016125f1565b505050509050019a505050505050505050505060405180910390a150505050505050505050565b6126386147d5565b6000546001600160a01b03908116911614612688576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b6011541561269557600080fd5b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156126ec5760405133904780156108fc02916000818181858888f193505050501580156126e6573d6000803e3d6000fd5b506127f1565b806001600160a01b031663a9059cbb33836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561274957600080fd5b505afa15801561275d573d6000803e3d6000fd5b505050506040513d602081101561277357600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b1580156127c457600080fd5b505af11580156127d8573d6000803e3d6000fd5b505050506040513d60208110156127ee57600080fd5b50505b50565b6001600160a01b031660009081526014602052604090205490565b6128176147d5565b6000546001600160a01b03908116911614612867576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600b5481565b6013546001600160a01b031681565b600054600160a01b900460ff1681565b6000546001600160a01b031690565b600d546000904790600114156128fc5790506116cc565b600d546060906000190167ffffffffffffffff8111801561291c57600080fd5b50604051908082528060200260200182016040528015612946578160200160208202803683370190505b50600d549091506060906000190167ffffffffffffffff8111801561296a57600080fd5b50604051908082528060200260200182016040528015612994578160200160208202803683370190505b509050600060015b600d54811015612aaa57600d81815481106129b357fe5b9060005260206000200160009054906101000a90046001600160a01b03168483815181106129dd57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050600d8181548110612a0a57fe5b60009182526020918290200154604080516370a0823160e01b815230600482015290516001600160a01b03909216926370a0823192602480840193829003018186803b158015612a5957600080fd5b505afa158015612a6d573d6000803e3d6000fd5b505050506040513d6020811015612a8357600080fd5b50518351849084908110612a9357fe5b60209081029190910101526001918201910161299c565b50600354604051633ed0f67d60e21b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee604482018190526060600483019081528651606484015286516000946001600160a01b03169363fb43d9f493899389939192909182916024810191608490910190602080890191028083838e5b83811015612b35578181015183820152602001612b1d565b50505050905001838103825285818151815260200191508051906020019060200280838360005b83811015612b74578181015183820152602001612b5c565b505050509050019550505050505060206040518083038186803b158015612b9a57600080fd5b505afa158015612bae573d6000803e3d6000fd5b505050506040513d6020811015612bc457600080fd5b50519490940194505050505090565b60095481565b612be16147d5565b6000546001600160a01b03908116911614612c31576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b816001600160a01b031663095ea7b38260006040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612c8957600080fd5b505af1158015612c9d573d6000803e3d6000fd5b505050506040513d6020811015612cb357600080fd5b50505050565b6003546001600160a01b031681565b6018805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156112e45780601f106112b9576101008083540402835291602001916112e4565b600f6020526000908152604090205460ff1681565b612d406147d5565b6000546001600160a01b03908116911614612d90576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600654604080516350c9e9cb60e11b81526001600160a01b038481166004830152600160248301529151919092169163a193d396916044808301926020929190829003018186803b158015612de457600080fd5b505afa158015612df8573d6000803e3d6000fd5b505050506040513d6020811015612e0e57600080fd5b5051612e51576040805162461bcd60e51b815260206004820152600d60248201526c57524f4e475f4144445245535360981b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60025481565b612e816147d5565b6000546001600160a01b03908116911614612ed1576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b60008111612f15576040805162461bcd60e51b815260206004820152600c60248201526b04d494e5f52455455524e5f360a41b604482015290519081900360640190fd5b60006001600160a01b038c1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156130e7578a471015612f82576040805162461bcd60e51b815260206004820152600e60248201526d09c9ea8be8a9c9eaa8e90be8aa8960931b604482015290519081900360640190fd5b600360009054906101000a90046001600160a01b03166001600160a01b0316630990ba518c8e8e8e8e8e8e8e8e8e8e601360149054906101000a900460ff166040518d63ffffffff1660e01b8152600401808c6001600160a01b031681526020018b81526020018a6001600160a01b03168152602001898152602001806020018060200180602001851515815260200184810384528b8b82818152602001925060200280828437600083820152601f01601f19169091018581038452898152602090810191508a908a0280828437600083820152601f01601f191690910185810383528781526020019050878780828437600081840152601f19601f8201169050808301925050509e5050505050505050505050505050506020604051808303818588803b1580156130b357600080fd5b505af11580156130c7573d6000803e3d6000fd5b50505050506040513d60208110156130de57600080fd5b505190506132d9565b6003546040805163095ea7b360e01b81526001600160a01b039283166004820152602481018e90529051918e169163095ea7b3916044808201926020929091908290030181600087803b15801561313d57600080fd5b505af1158015613151573d6000803e3d6000fd5b505050506040513d602081101561316757600080fd5b810190808051906020019092919050505050600360009054906101000a90046001600160a01b03166001600160a01b0316630990ba518d8d8d8d8d8d8d8d8d8d601360149054906101000a900460ff166040518c63ffffffff1660e01b8152600401808c6001600160a01b031681526020018b81526020018a6001600160a01b03168152602001898152602001806020018060200180602001851515815260200184810384528b8b82818152602001925060200280828437600083820152601f01601f19169091018581038452898152602090810191508a908a0280828437600083820152601f01601f191690910185810383528781526020019050878780828437600081840152601f19601f8201169050808301925050509e505050505050505050505050505050602060405180830381600087803b1580156132aa57600080fd5b505af11580156132be573d6000803e3d6000fd5b505050506040513d60208110156132d457600080fd5b505190505b8181101561332e576040805162461bcd60e51b815260206004820152601d60248201527f52454345495645445f4c4553535f5448414e5f4d494e5f52455455524e000000604482015290519081900360640190fd5b6133378a614c00565b604080516001600160a01b03808f168252602082018e90528c16818301526060810183905290517f3c9f9e05a5650785677adb0f72e5645fb18750d08069c5f0c3b4ea72962c2fdb9181900360800190a1505050505050505050505050565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156133c4575047611247565b604080516370a0823160e01b815230600482015290516001600160a01b038416916370a08231916024808301926020929190829003018186803b15801561340a57600080fd5b505afa15801561341e573d6000803e3d6000fd5b505050506040513d602081101561343457600080fd5b505192915050565b6134446147d5565b6000546001600160a01b03908116911614613494576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b60008061349f611be4565b50600c549193509150600090156134d0576134cb60095461123e600c548661473390919063ffffffff16565b6134d3565b60005b6040805160028082526060808301845293945090916020830190803683375050600a5482519293506001600160a01b03169183915060009061351157fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506135396128d6565b8160018151811061354657fe5b6001600160a01b0392909216602092830291909101909101526040805160028082526060828101909352816020016020820280368337019050509050838160008151811061359057fe5b60200260200101818152505083816001815181106135aa57fe5b6020908102919091010152604080516002808252606082810190935281602001602082028036833701905050905083816000815181106135e657fe5b6020026020010181815250508386038160018151811061360257fe5b602002602001018181525050613619818385614875565b50601254613627908761481b565b601255505050505050565b600e5460ff1681565b60006001600160a01b03831661365057600080fd5b3360009081526014602052604090205482111561366c57600080fd5b3360009081526014602052604090205461368690836147d9565b33600090815260146020526040808220929092556001600160a01b038516815220546136b2908361481b565b6001600160a01b0384166000818152601460209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60146020526000908152604090205481565b61372a6147d5565b6000546001600160a01b0390811691161461377a576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600654604080516350c9e9cb60e11b81526001600160a01b038481166004830152600260248301529151919092169163a193d396916044808301926020929190829003018186803b1580156137ce57600080fd5b505afa1580156137e2573d6000803e3d6000fd5b505050506040513d60208110156137f857600080fd5b505161383b576040805162461bcd60e51b815260206004820152600d60248201526c57524f4e475f4144445245535360981b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6138656147d5565b6000546001600160a01b039081169116146138b5576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600080613902898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506004548b92506001600160a01b03169050614ace565b90508015613b3757600460009054906101000a90046001600160a01b03166001600160a01b031663c3248fa1828e8e8e8e8e8e8e8e8e8e6040518c63ffffffff1660e01b8152600401808b81526020018a8152602001896001600160a01b031681526020018060200180602001806020018060200185810385528c8c828181526020019250602002808284376000838201819052601f909101601f191690920187810386528c5181528c51602091820193828f0193509102908190849084905b838110156139da5781810151838201526020016139c2565b505050509050018581038352898982818152602001925060200280828437600083820152601f01601f191690910186810383528781526020019050878780828437600081840152601f19601f8201169050808301925050509e5050505050505050505050505050506000604051808303818588803b158015613a5b57600080fd5b505af1158015613a6f573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040908152811015613a9957600080fd5b815160208301805160405192949293830192919084600160201b821115613abf57600080fd5b908301906020820185811115613ad457600080fd5b82518660208202830111600160201b82111715613af057600080fd5b82525081516020918201928201910280838360005b83811015613b1d578181015183820152602001613b05565b505050509050016040525050508098508193505050613d5f565b600460009054906101000a90046001600160a01b03166001600160a01b031663c3248fa18d8d8d8d8d8d8d8d8d8d6040518b63ffffffff1660e01b8152600401808b81526020018a8152602001896001600160a01b031681526020018060200180602001806020018060200185810385528c8c828181526020019250602002808284376000838201819052601f909101601f191690920187810386528c5181528c51602091820193828f0193509102908190849084905b83811015613c06578181015183820152602001613bee565b505050509050018581038352898982818152602001925060200280828437600083820152601f01601f191690910186810383528781526020019050878780828437600081840152601f19601f8201169050808301925050509e505050505050505050505050505050600060405180830381600087803b158015613c8857600080fd5b505af1158015613c9c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040908152811015613cc557600080fd5b815160208301805160405192949293830192919084600160201b821115613ceb57600080fd5b908301906020820185811115613d0057600080fd5b82518660208202830111600160201b82111715613d1c57600080fd5b82525081516020918201928201910280838360005b83811015613d49578181015183820152602001613d31565b5050505090500160405250505080985081935050505b60008211613da8576040805162461bcd60e51b815260206004820152601160248201527022a6a82a2cafa827a7a62fa922aa2aa92760791b604482015290519081900360640190fd5b613db18a614c00565b7f5577632910cbe4b7fccce2e0ee2761f54f5314ff95cd0bf2b3508f03295ef9368a838b8b8b60405180866001600160a01b03168152602001858152602001806020018060200183810383528686828181526020019250602002808284376000838201819052601f909101601f1916909201858103845286518152865160209182019382890193509102908190849084905b83811015613e5b578181015183820152602001613e43565b5050505090500197505050505050505060405180910390a1505050505050505050505050565b613e896147d5565b6000546001600160a01b03908116911614613ed9576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600480546040805163095ea7b360e01b81526001600160a01b0392831693810193909352602483018a9052519087169163095ea7b39160448083019260209291908290030181600087803b158015613f3057600080fd5b505af1158015613f44573d6000803e3d6000fd5b505050506040513d6020811015613f5a57600080fd5b505060048054604051636273871760e11b8152918201898152602483018990526001600160a01b03888116604485015260a06064850190815260a485018890526060948594929092169263c4e70e2e928d928d928d928d928d928d928d9290608481019060c401876020880280828437600083820152601f01601f191690910184810383528581526020019050858580828437600081840152601f19601f8201169050808301925050509950505050505050505050600060405180830381600087803b15801561402957600080fd5b505af115801561403d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561406657600080fd5b8101908080516040519392919084600160201b82111561408557600080fd5b90830190602082018581111561409a57600080fd5b82518660208202830111600160201b821117156140b657600080fd5b82525081516020918201928201910280838360005b838110156140e35781810151838201526020016140cb565b5050505090500160405260200180516040519392919084600160201b82111561410b57600080fd5b90830190602082018581111561412057600080fd5b82518660208202830111600160201b8211171561413c57600080fd5b82525081516020918201928201910280838360005b83811015614169578181015183820152602001614151565b505050509050016040525050509150915060005b82518160ff1610156141a35761419b838260ff168151811061246157fe5b60010161417d565b507f2db27c5c73722c4d363acff8ca3cd09a9e3c57c1c410631f8f6e4005e7fcde15878a848460405180856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561422257818101518382015260200161420a565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015614261578181015183820152602001614249565b50505050905001965050505050505060405180910390a1505050505050505050565b600e5460009060ff16156142ad57336000908152600f602052604090205460ff166142ad57600080fd5b346142ee576040805162461bcd60e51b815260206004820152600c60248201526b16915493d7d1115413d4d25560a21b604482015290519081900360640190fd5b600180543490810190915560009061430590611ae0565b905080614347576040805162461bcd60e51b815260206004820152600b60248201526a5a45524f5f53484152455360a81b604482015290519081900360640190fd5b601154614354908261481b565b60115533600090815260146020526040902054614371908261481b565b336000818152601460209081526040808320949094556016815290839020805434908101909155601154845191825291810185905280840191909152915190917f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e919081900360600190a2905090565b60015481565b601354600160a01b900460ff1681565b600a546001600160a01b031681565b6001600160a01b03918216600090815260196020908152604080832093909416825291909152205490565b60156020526000908152604090205460ff1681565b600d818154811061445357fe5b6000918252602090912001546001600160a01b0316905081565b6144756147d5565b6000546001600160a01b039081169116146144c5576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b600e805460ff1916911515919091179055565b6006546001600160a01b031681565b60006001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415614515575047611247565b6000826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561456457600080fd5b505afa158015614578573d6000803e3d6000fd5b505050506040513d602081101561458e57600080fd5b505160035460408051636cbbd94160e11b81526001600160a01b03878116600483015273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee602483015260448201859052915193945091169163d977b28291606480820192602092909190829003018186803b15801561460057600080fd5b505afa158015614614573d6000803e3d6000fd5b505050506040513d602081101561462a57600080fd5b505191506112479050565b61463d6147d5565b6000546001600160a01b0390811691161461468d576040805162461bcd60e51b81526020600482018190526024820152600080516020614e41833981519152604482015290519081900360640190fd5b6001600160a01b0381166146d25760405162461bcd60e51b8152600401808060200182810382526026815260200180614dfa6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60085481565b6000826147425750600061134d565b8282028284828161474f57fe5b041461478c5760405162461bcd60e51b8152600401808060200182810382526021815260200180614e206021913960400191505060405180910390fd5b9392505050565b600061478c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614cfd565b3390565b600061478c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614d9f565b60008282018381101561478c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600060015b600d5460ff82161015614a24576000600d8260ff168154811061489957fe5b6000918252602080832090910154604080516370a0823160e01b815230600482015290516001600160a01b03909216945084926370a0823192602480840193829003018186803b1580156148ec57600080fd5b505afa158015614900573d6000803e3d6000fd5b505050506040513d602081101561491657600080fd5b5051905060005b85518160ff161015614a1957600061496e888360ff168151811061493d57fe5b602002602001015161123e8b8560ff168151811061495757fe5b60200260200101518661473390919063ffffffff16565b90508015614a1057836001600160a01b031663a9059cbb888460ff168151811061499457fe5b6020026020010151836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156149e357600080fd5b505af11580156149f7573d6000803e3d6000fd5b505050506040513d6020811015614a0d57600080fd5b50505b5060010161491d565b50505060010161487a565b504760005b83518160ff161015614ac5576000614a63868360ff1681518110614a4957fe5b602002602001015161123e898560ff168151811061495757fe5b90508015614abc57848260ff1681518110614a7a57fe5b60200260200101516001600160a01b03166108fc829081150290604051600060405180830381858888f19350505050158015614aba573d6000803e3d6000fd5b505b50600101614a29565b50509392505050565b6000805b84518160ff161015614bf85773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0316858260ff1681518110614b0b57fe5b60200260200101516001600160a01b031614614bd657848160ff1681518110614b3057fe5b60200260200101516001600160a01b031663095ea7b384868460ff1681518110614b5657fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015614ba457600080fd5b505af1158015614bb8573d6000803e3d6000fd5b505050506040513d6020811015614bce57600080fd5b50614bf09050565b838160ff1681518110614be557fe5b602002602001015191505b600101614ad2565b509392505050565b6001600160a01b03811660009081526015602052604090205460ff1680614c4357506001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145b15614c4d576127f1565b6001600160a01b0381166000818152601560205260408120805460ff19166001908117909155600d80549182018155918290527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b03191690921790915554600854811115614cf9576040805162461bcd60e51b815260206004820152600a6024820152694d41585f544f4b454e5360b01b604482015290519081900360640190fd5b5050565b60008183614d895760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614d4e578181015183820152602001614d36565b50505050905090810190601f168015614d7b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614d9557fe5b0495945050505050565b60008184841115614df15760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315614d4e578181015183820152602001614d36565b50505090039056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220f079a55f0d4520870b38b04f021cea40d8a8d4caaa756b2aa58e8d93d3d3f56f64736f6c634300060c00334f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573738be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220e8ab8d6695f13d669fb3a4fc64b002bea3f288c1f750baf42d91b6a14f96ff2364736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c9d742f23b4f10a3da83821481d1b4ed8a596109
-----Decoded View---------------
Arg [0] : _platfromAddress (address): 0xC9d742f23b4F10A3dA83821481D1B4ED8a596109
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c9d742f23b4f10a3da83821481d1b4ed8a596109
Deployed Bytecode Sourcemap
56568:797:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56737:625;;;;;;;;;;;;;;;;-1:-1:-1;;;;;56737:625:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;56737:625:0;;-1:-1:-1;;56737:625:0;;;-1:-1:-1;;;;;;;56737:625:0;;;;;;;;;;;;;;-1:-1:-1;56737:625:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;56737:625:0;;;;;;;;;;;;;;56602:30;;;:::i;56737:625::-;57034:7;57053:25;57106:6;57121:5;57135:11;57155:15;;;;;;;;-1:-1:-1;;;;;57155:15:0;57179:22;57210:18;57237:11;57257:19;57285:27;57081:238;;;;;:::i;:::-;;;-1:-1:-1;;;;;57081:238:0;;;;;;;;;;;;;;-1:-1:-1;;;;;57081:238:0;;;;;;-1:-1:-1;;;;;57081:238:0;;;;;;-1:-1:-1;;;;;57081:238:0;;;;;;-1:-1:-1;;;;;57081:238:0;;;;;;-1:-1:-1;;;;;57081:238:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;57053:266:0;56737:625;-1:-1:-1;;;;;;;;;;56737:625:0:o;56602:30::-;;;-1:-1:-1;;;;;56602:30:0;;:::o;-1:-1:-1:-;;;;;;;;:::o
Swarm Source
ipfs://e8ab8d6695f13d669fb3a4fc64b002bea3f288c1f750baf42d91b6a14f96ff23
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
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.