Contract Overview
Balance:
0 Ether
More Info
My Name Tag:
Not Available
[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
Contract Name:
PublicLock
Compiler Version
v0.5.12+commit.7709ece9
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-01-08 */ // File: contracts\interfaces\IERC721.sol pragma solidity 0.5.12; /// @title ERC-721 Non-Fungible Token Standard /// @dev See https://eips.ethereum.org/EIPS/eip-721 /// Note: the ERC-165 identifier for this interface is 0x80ac58cd interface IERC721 { /// @dev This emits when ownership of any NFT changes by any mechanism. /// This event emits when NFTs are created (`from` == 0) and destroyed /// (`to` == 0). Exception: during contract creation, any number of NFTs /// may be created and assigned without emitting Transfer. At the time of /// any transfer, the approved address for that NFT (if any) is reset to none. event Transfer(address indexed _from, address indexed _to, uint indexed _tokenId); /// @dev This emits when the approved address for an NFT is changed or /// reaffirmed. The zero address indicates there is no approved address. /// When a Transfer event emits, this also indicates that the approved /// address for that NFT (if any) is reset to none. event Approval(address indexed _owner, address indexed _approved, uint indexed _tokenId); /// @dev This emits when an operator is enabled or disabled for an owner. /// The operator can manage all NFTs of the owner. event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE /// THEY MAY BE PERMANENTLY LOST /// @dev Throws unless `msg.sender` is the current owner, an authorized /// operator, or the approved address for this NFT. Throws if `_from` is /// not the current owner. Throws if `_to` is the zero address. Throws if /// `_tokenId` is not a valid NFT. /// @param _from The current owner of the NFT /// @param _to The new owner /// @param _tokenId The NFT to transfer function transferFrom(address _from, address _to, uint _tokenId) external; /// @notice Set or reaffirm the approved address for an NFT /// @dev The zero address indicates there is no approved address. /// @dev Throws unless `msg.sender` is the current NFT owner, or an authorized /// operator of the current owner. /// @param _approved The new approved NFT controller /// @param _tokenId The NFT to approve function approve(address _approved, uint _tokenId) external payable; /// @notice Transfers the ownership of an NFT from one address to another address /// @dev Throws unless `msg.sender` is the current owner, an authorized /// operator, or the approved address for this NFT. Throws if `_from` is /// not the current owner. Throws if `_to` is the zero address. Throws if /// `_tokenId` is not a valid NFT. When transfer is complete, this function /// checks if `_to` is a smart contract (code size > 0). If so, it calls /// `onERC721Received` on `_to` and throws if the return value is not /// `bytes4(keccak256('onERC721Received(address,address,uint,bytes)'))`. /// @param _from The current owner of the NFT /// @param _to The new owner /// @param _tokenId The NFT to transfer /// @param data Additional data with no specified format, sent in call to `_to` function safeTransferFrom(address _from, address _to, uint _tokenId, bytes calldata data) external; /// @notice Transfers the ownership of an NFT from one address to another address /// @dev This works identically to the other function with an extra data parameter, /// except this function just sets data to '' /// @param _from The current owner of the NFT /// @param _to The new owner /// @param _tokenId The NFT to transfer function safeTransferFrom(address _from, address _to, uint _tokenId) external; /// @notice Enable or disable approval for a third party ('operator') to manage /// all of `msg.sender`'s assets. /// @dev Emits the ApprovalForAll event. The contract MUST allow /// multiple operators per owner. /// @param _operator Address to add to the set of authorized operators. /// @param _approved True if the operator is approved, false to revoke approval function setApprovalForAll(address _operator, bool _approved) external; /// @notice Count all NFTs assigned to an owner /// @dev NFTs assigned to the zero address are considered invalid, and this /// function throws for queries about the zero address. /// @param _owner An address for whom to query the balance /// @return The number of NFTs owned by `_owner`, possibly zero function balanceOf(address _owner) external view returns (uint); /// @notice Find the owner of an NFT /// @dev NFTs assigned to zero address are considered invalid, and queries /// about them do throw. /// @param _tokenId The identifier for an NFT /// @return The address of the owner of the NFT function ownerOf(uint _tokenId) external view returns (address); /// @notice Get the approved address for a single NFT /// @dev Throws if `_tokenId` is not a valid NFT /// @param _tokenId The NFT to find the approved address for /// @return The approved address for this NFT, or the zero address if there is none function getApproved(uint _tokenId) external view returns (address); /// @notice Query if an address is an authorized operator for another address /// @param _owner The address that owns the NFTs /// @param _operator The address that acts on behalf of the owner /// @return True if `_operator` is an approved operator for `_owner`, false otherwise function isApprovedForAll(address _owner, address _operator) external view returns (bool); /// @notice A descriptive name for a collection of NFTs in this contract function name() external view returns (string memory _name); } // File: contracts\interfaces\IERC721Enumerable.sol pragma solidity 0.5.12; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable { function totalSupply( ) external view returns (uint256); function tokenOfOwnerByIndex( address _owner, uint256 _index ) external view returns (uint256 _tokenId); function tokenByIndex( uint256 _index ) external view returns (uint256); } // File: contracts\interfaces\IPublicLock.sol pragma solidity ^0.5.0; /** * @title The PublicLock Interface * @author Nick Furfaro (unlock-protocol.com) */ contract IPublicLock is IERC721Enumerable, IERC721 { // See indentationissue description here: // https://github.com/duaraghav8/Ethlint/issues/268 // solium-disable indentation ///=================================================================== /// Events event Destroy( uint balance, address indexed owner ); event Disable(); event Withdrawal( address indexed sender, address indexed tokenAddress, address indexed beneficiary, uint amount ); event CancelKey( uint indexed tokenId, address indexed owner, address indexed sendTo, uint refund ); event RefundPenaltyChanged( uint freeTrialLength, uint refundPenaltyBasisPoints ); event PriceChanged( uint oldKeyPrice, uint keyPrice ); event ExpireKey(uint indexed tokenId); event NewLockSymbol( string symbol ); event TransferFeeChanged( uint transferFeeBasisPoints ); /// @notice emits anytime the nonce used for off-chain approvals changes. event NonceChanged( address indexed keyOwner, uint nextAvailableNonce ); ///=================================================================== /// Functions /** * @notice The version number of the current implementation on this network. * @return The current version number. */ function publicLockVersion() public pure returns (uint); /** * @notice Gets the current balance of the account provided. * @param _tokenAddress The token type to retrieve the balance of. * @param _account The account to get the balance of. * @return The number of tokens of the given type for the given address, possibly 0. */ function getBalance( address _tokenAddress, address _account ) external view returns (uint); /** * @notice Used to disable lock before migrating keys and/or destroying contract. * @dev Throws if called by other than the owner. * @dev Throws if lock contract has already been disabled. */ function disableLock() external; /** * @notice Used to clean up old lock contracts from the blockchain. * TODO: add a check to ensure all keys are INVALID! * @dev Throws if called by other than owner. * @dev Throws if lock has not yet been disabled. */ function destroyLock() external; /** * @dev Called by owner to withdraw all funds from the lock and send them to the `beneficiary`. * @dev Throws if called by other than the owner or beneficiary * @param _tokenAddress specifies the token address to withdraw or 0 for ETH. This is usually * the same as `tokenAddress` in MixinFunds. * @param _amount specifies the max amount to withdraw, which may be reduced when * considering the available balance. Set to 0 or MAX_UINT to withdraw everything. * -- however be wary of draining funds as it breaks the `cancelAndRefund` and `fullRefund` * use cases. */ function withdraw( address _tokenAddress, uint _amount ) external; /** * A function which lets the owner of the lock to change the price for future purchases. * @dev Throws if called by other than owner * @dev Throws if lock has been disabled * @param _keyPrice The new price to set for keys */ function updateKeyPrice( uint _keyPrice ) external; /** * A function which lets the owner of the lock update the beneficiary account, * which receives funds on withdrawal. * @dev Throws if called by other than owner of beneficiary * @dev Throws if _beneficiary is address(0) * @param _beneficiary The new address to set as the beneficiary */ function updateBeneficiary( address _beneficiary ) external; /** * A function which lets the owner of the lock expire a users' key. * @dev Throws if called by other than lock owner * @dev Throws if key owner does not have a valid key * @param _owner The address of the key owner */ function expireKeyFor( address _owner ) external; /** * Checks if the user has a non-expired key. * @param _owner The address of the key owner */ function getHasValidKey( address _owner ) external view returns (bool); /** * @notice Find the tokenId for a given user * @return The tokenId of the NFT, else revert * @dev Throws if key owner does not have a valid key * @param _account The address of the key owner */ function getTokenIdFor( address _account ) external view returns (uint); /** * A function which returns a subset of the keys for this Lock as an array * @param _page the page of key owners requested when faceted by page size * @param _pageSize the number of Key Owners requested per page * @dev Throws if there are no key owners yet */ function getOwnersByPage( uint _page, uint _pageSize ) external view returns (address[] memory); /** * Checks if the given address owns the given tokenId. * @param _tokenId The tokenId of the key to check * @param _owner The potential key owners address */ function isKeyOwner( uint _tokenId, address _owner ) external view returns (bool); /** * @dev Returns the key's ExpirationTimestamp field for a given owner. * @param _owner address of the user for whom we search the key * @dev Throws if owner has never owned a key for this lock */ function keyExpirationTimestampFor( address _owner ) external view returns (uint timestamp); /** * Public function which returns the total number of unique owners (both expired * and valid). This may be larger than totalSupply. */ function numberOfOwners() external view returns (uint); /** * Allows the Lock owner to assign a descriptive name for this Lock. * @param _lockName The new name for the lock * @dev Throws if called by other than the lock owner */ function updateLockName( string calldata _lockName ) external; /** * Allows the Lock owner to assign a Symbol for this Lock. * @param _lockSymbol The new Symbol for the lock * @dev Throws if called by other than the lock owner */ function updateLockSymbol( string calldata _lockSymbol ) external; /** * @dev Gets the token symbol * @return string representing the token symbol */ function symbol() external view returns(string memory); /** * Allows the Lock owner to update the baseTokenURI for this Lock. * @dev Throws if called by other than the lock owner * @param _baseTokenURI String representing the base of the URI for this lock. */ function setBaseTokenURI( string calldata _baseTokenURI ) external; /** @notice A distinct Uniform Resource Identifier (URI) for a given asset. * @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC * 3986. The URI may point to a JSON file that conforms to the "ERC721 * Metadata JSON Schema". * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md * @param _tokenId The tokenID we're inquiring about * @return String representing the URI for the requested token */ function tokenURI( uint256 _tokenId ) external view returns(string memory); /** * Allows the Lock owner to give a collection of users a key with no charge. * Each key may be assigned a different expiration date. * @dev Throws if called by other than the lock-owner * @param _recipients An array of receiving addresses * @param _expirationTimestamps An array of expiration Timestamps for the keys being granted */ function grantKeys( address[] calldata _recipients, uint[] calldata _expirationTimestamps ) external; /** * @dev Purchase function * @param _value the number of tokens to pay for this purchase >= the current keyPrice - any applicable discount * (_value is ignored when using ETH) * @param _recipient address of the recipient of the purchased key * @param _referrer address of the user making the referral * @param _data arbitrary data populated by the front-end which initiated the sale * @dev Throws if lock is disabled. Throws if lock is sold-out. Throws if _recipient == address(0). * @dev Setting _value to keyPrice exactly doubles as a security feature. That way if the lock owner increases the * price while my transaction is pending I can't be charged more than I expected (only applicable to ERC-20 when more * than keyPrice is approved for spending). */ function purchase( uint256 _value, address _recipient, address _referrer, bytes calldata _data ) external payable; /** * Allow the Lock owner to change the transfer fee. * @dev Throws if called by other than lock-owner * @param _transferFeeBasisPoints The new transfer fee in basis-points(bps). * Ex: 200 bps = 2% */ function updateTransferFee( uint _transferFeeBasisPoints ) external; /** * Determines how much of a fee a key owner would need to pay in order to * transfer the key to another account. This is pro-rated so the fee goes down * overtime. * @dev Throws if _owner does not have a valid key * @param _owner The owner of the key check the transfer fee for. * @param _time The amount of time to calculate the fee for. * @return The transfer fee in seconds. */ function getTransferFee( address _owner, uint _time ) external view returns (uint); /** * @dev Invoked by the lock owner to destroy the user's key and perform a refund and cancellation of the key * @param _keyOwner The key owner to whom we wish to send a refund to * @param amount The amount to refund the key-owner * @dev Throws if called by other than owner * @dev Throws if _keyOwner does not have a valid key */ function fullRefund( address _keyOwner, uint amount ) external; /** * @notice Destroys the msg.sender's key and sends a refund based on the amount of time remaining. */ function cancelAndRefund() external; /** * @dev Cancels a key owned by a different user and sends the funds to the msg.sender. * @param _keyOwner this user's key will be canceled * @param _signature getCancelAndRefundApprovalHash signed by the _keyOwner */ function cancelAndRefundFor( address _keyOwner, bytes calldata _signature ) external; /** * @notice Sets the minimum nonce for a valid off-chain approval message from the * senders account. * @dev This can be used to invalidate a previously signed message. */ function invalidateOffchainApproval( uint _nextAvailableNonce ) external; /** * Allow the owner to change the refund penalty. * @dev Throws if called by other than owner * @param _freeTrialLength The new duration of free trials for this lock * @param _refundPenaltyBasisPoints The new refund penaly in basis-points(bps) */ function updateRefundPenalty( uint _freeTrialLength, uint _refundPenaltyBasisPoints ) external; /** * @dev Determines how much of a refund a key owner would receive if they issued * @param _owner The key owner to get the refund value for. * a cancelAndRefund block.timestamp. * Note that due to the time required to mine a tx, the actual refund amount will be lower * than what the user reads from this call. */ function getCancelAndRefundValueFor( address _owner ) external view returns (uint refund); function keyOwnerToNonce(address ) external view returns (uint256 ); /** * @dev returns the hash to sign in order to allow another user to cancel on your behalf. * @param _keyOwner The key owner's address * @param _txSender The address cancelling the key on behalf of the key-owner * @return approvalHash The returned hash */ function getCancelAndRefundApprovalHash( address _keyOwner, address _txSender ) external view returns (bytes32 approvalHash); ///=================================================================== /// Auto-generated getter functions from public state variables function beneficiary() external view returns (address ); function erc1820() external view returns (address ); function expirationDuration() external view returns (uint256 ); function freeTrialLength() external view returns (uint256 ); function isAlive() external view returns (bool ); function keyCancelInterfaceId() external view returns (bytes32 ); function keySoldInterfaceId() external view returns (bytes32 ); function keyPrice() external view returns (uint256 ); function maxNumberOfKeys() external view returns (uint256 ); function owners(uint256 ) external view returns (address ); function refundPenaltyBasisPoints() external view returns (uint256 ); function tokenAddress() external view returns (address ); function transferFeeBasisPoints() external view returns (uint256 ); function unlockProtocol() external view returns (address ); function BASIS_POINTS_DEN() external view returns (uint256 ); ///=================================================================== /** * @notice Allows the key owner to safely share their key (parent key) by * transferring a portion of the remaining time to a new key (child key). * @dev Throws if key is not valid. * @dev Throws if `_to` is the zero address * @param _to The recipient of the shared key * @param _tokenId the key to share * @param _timeShared The amount of time shared * checks if `_to` is a smart contract (code size > 0). If so, it calls * `onERC721Received` on `_to` and throws if the return value is not * `bytes4(keccak256('onERC721Received(address,address,uint,bytes)'))`. * @dev Emit Transfer event */ function shareKey( address _to, uint _tokenId, uint _timeShared ) external; /// @notice A descriptive name for a collection of NFTs in this contract function name() external view returns (string memory _name); ///=================================================================== /// From Openzeppelin's Ownable.sol function owner() external view returns (address ); function isOwner() external view returns (bool ); function renounceOwnership() external; function transferOwnership(address newOwner) external; ///=================================================================== /// From ERC165.sol function supportsInterface(bytes4 interfaceId) external view returns (bool ); ///=================================================================== } // File: @openzeppelin\upgrades\contracts\Initializable.sol pragma solidity >=0.4.24 <0.6.0; /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized"); bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = true; } _; if (isTopLevelCall) { initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. uint256 cs; assembly { cs := extcodesize(address) } return cs == 0; } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } // File: node_modules\@openzeppelin\contracts-ethereum-package\contracts\GSN\Context.sol pragma solidity ^0.5.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract Context is Initializable { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: @openzeppelin\contracts-ethereum-package\contracts\ownership\Ownable.sol pragma solidity ^0.5.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functions to restrict their use to * the owner. */ contract Ownable is Initializable, Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function initialize(address sender) public initializer { _owner = sender; emit OwnershipTransferred(address(0), _owner); } /** * @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(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return _msgSender() == _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 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 onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[50] private ______gap; } // File: node_modules\@openzeppelin\contracts-ethereum-package\contracts\introspection\IERC165.sol pragma solidity ^0.5.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: @openzeppelin\contracts-ethereum-package\contracts\introspection\ERC165.sol pragma solidity ^0.5.0; /** * @dev Implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ contract ERC165 is Initializable, IERC165 { /* * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 */ bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; function initialize() public initializer { // Derived contracts need only register support for their own interfaces, // we register support for ERC165 itself here _registerInterface(_INTERFACE_ID_ERC165); } /** * @dev See {IERC165-supportsInterface}. * * Time complexity O(1), guaranteed to always use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) public view returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } uint256[50] private ______gap; } // File: @openzeppelin\contracts-ethereum-package\contracts\token\ERC20\IERC20.sol pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File: @openzeppelin\contracts-ethereum-package\contracts\utils\Address.sol pragma solidity ^0.5.5; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing 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. */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. // 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 != 0x0 && codehash != accountHash); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. * * _Available since v2.4.0._ */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } } // File: node_modules\@openzeppelin\contracts-ethereum-package\contracts\math\SafeMath.sol pragma solidity ^0.5.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // File: @openzeppelin\contracts-ethereum-package\contracts\token\ERC20\SafeERC20.sol pragma solidity ^0.5.0; /** * @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"); } } } // File: contracts\mixins\MixinFunds.sol pragma solidity 0.5.12; /** * @title An implementation of the money related functions. * @author HardlyDifficult (unlock-protocol.com) */ contract MixinFunds { using Address for address payable; using SafeERC20 for IERC20; /** * The token-type that this Lock is priced in. If 0, then use ETH, else this is * a ERC20 token address. */ address public tokenAddress; function initialize( address _tokenAddress ) public { tokenAddress = _tokenAddress; require( _tokenAddress == address(0) || IERC20(_tokenAddress).totalSupply() > 0, 'INVALID_TOKEN' ); } /** * Gets the current balance of the account provided. */ function getBalance( address _tokenAddress, address _account ) public view returns (uint) { if(_tokenAddress == address(0)) { return _account.balance; } else { return IERC20(_tokenAddress).balanceOf(_account); } } /** * Ensures that the msg.sender has paid at least the price stated. * * With ETH, this means the function originally called was `payable` and the * transaction included at least the amount requested. * * Security: be wary of re-entrancy when calling this function. */ function _chargeAtLeast( uint _price ) internal returns (uint) { if(_price > 0) { if(tokenAddress == address(0)) { require(msg.value >= _price, 'NOT_ENOUGH_FUNDS'); return msg.value; } else { IERC20 token = IERC20(tokenAddress); token.safeTransferFrom(msg.sender, address(this), _price); return _price; } } } /** * Transfers funds from the contract to the account provided. * * Security: be wary of re-entrancy when calling this function. */ function _transfer( address _tokenAddress, address _to, uint _amount ) internal { if(_amount > 0) { if(_tokenAddress == address(0)) { // https://diligence.consensys.net/blog/2019/09/stop-using-soliditys-transfer-now/ address(uint160(_to)).sendValue(_amount); } else { IERC20 token = IERC20(_tokenAddress); token.safeTransfer(_to, _amount); } } } } // File: contracts\mixins\MixinDisableAndDestroy.sol pragma solidity 0.5.12; /** * @title Mixin allowing the Lock owner to disable a Lock (preventing new purchases) * and then destroy it. * @author HardlyDifficult * @dev `Mixins` are a design pattern seen in the 0x contracts. It simply * separates logically groupings of code to ease readability. */ contract MixinDisableAndDestroy is IERC721, Ownable, MixinFunds { // Used to disable payable functions when deprecating an old lock bool public isAlive; event Destroy( uint balance, address indexed owner ); event Disable(); function initialize( ) public { isAlive = true; } // Only allow usage when contract is Alive modifier onlyIfAlive() { require(isAlive, 'LOCK_DEPRECATED'); _; } /** * @dev Used to disable lock before migrating keys and/or destroying contract */ function disableLock() external onlyOwner onlyIfAlive { emit Disable(); isAlive = false; } /** * @dev Used to clean up old lock contracts from the blockchain * TODO: add a check to ensure all keys are INVALID! */ function destroyLock() external onlyOwner { require(isAlive == false, 'DISABLE_FIRST'); emit Destroy(address(this).balance, msg.sender); // this will send any ETH or ERC20 held by the lock to the owner _transfer(tokenAddress, msg.sender, getBalance(tokenAddress, address(this))); selfdestruct(msg.sender); // Note we don't clean up the `locks` data in Unlock.sol as it should not be necessary // and leaves some data behind ('Unlock.LockBalances') which may be helpful. } } // File: contracts\interfaces\IUnlock.sol pragma solidity 0.5.12; /** * @title The Unlock Interface * @author Nick Furfaro (unlock-protocol.com) **/ interface IUnlock { // Events event NewLock( address indexed lockOwner, address indexed newLockAddress ); event ConfigUnlock( address publicLockAddress, string globalTokenSymbol, string globalTokenURI ); event ResetTrackedValue( uint grossNetworkProduct, uint totalDiscountGranted ); // Use initialize instead of a constructor to support proxies (for upgradeability via zos). function initialize(address _owner) external; /** * @dev Create lock * This deploys a lock for a creator. It also keeps track of the deployed lock. * @param _tokenAddress set to the ERC20 token address, or 0 for ETH. * @param _salt an identifier for the Lock, which is unique for the user. * This may be implemented as a sequence ID or with RNG. It's used with `create2` * to know the lock's address before the transaction is mined. */ function createLock( uint _expirationDuration, address _tokenAddress, uint _keyPrice, uint _maxNumberOfKeys, string calldata _lockName, bytes12 _salt ) external; /** * This function keeps track of the added GDP, as well as grants of discount tokens * to the referrer, if applicable. * The number of discount tokens granted is based on the value of the referal, * the current growth rate and the lock's discount token distribution rate * This function is invoked by a previously deployed lock only. */ function recordKeyPurchase( uint _value, address _referrer // solhint-disable-line no-unused-vars ) external; /** * This function will keep track of consumed discounts by a given user. * It will also grant discount tokens to the creator who is granting the discount based on the * amount of discount and compensation rate. * This function is invoked by a previously deployed lock only. */ function recordConsumedDiscount( uint _discount, uint _tokens // solhint-disable-line no-unused-vars ) external; /** * This function returns the discount available for a user, when purchasing a * a key from a lock. * This does not modify the state. It returns both the discount and the number of tokens * consumed to grant that discount. */ function computeAvailableDiscountFor( address _purchaser, // solhint-disable-line no-unused-vars uint _keyPrice // solhint-disable-line no-unused-vars ) external view returns (uint discount, uint tokens); // Function to read the globalTokenURI field. function globalBaseTokenURI() external view returns (string memory); // Function to read the globalTokenSymbol field. function globalTokenSymbol() external view returns (string memory); /** Function for the owner to update configuration variables. * Should throw if called by other than owner. */ function configUnlock( address _publicLockAddress, string calldata _symbol, string calldata _URI ) external; // Allows the owner to change the value tracking variables as needed. function resetTrackedValue( uint _grossNetworkProduct, uint _totalDiscountGranted ) external; } // File: contracts\mixins\MixinLockCore.sol pragma solidity 0.5.12; /** * @title Mixin for core lock data and functions. * @author HardlyDifficult * @dev `Mixins` are a design pattern seen in the 0x contracts. It simply * separates logically groupings of code to ease readability. */ contract MixinLockCore is Ownable, MixinFunds, MixinDisableAndDestroy { event PriceChanged( uint oldKeyPrice, uint keyPrice ); event Withdrawal( address indexed sender, address indexed tokenAddress, address indexed beneficiary, uint amount ); // Unlock Protocol address // TODO: should we make that private/internal? IUnlock public unlockProtocol; // Duration in seconds for which the keys are valid, after creation // should we take a smaller type use less gas? // TODO: add support for a timestamp instead of duration uint public expirationDuration; // price in wei of the next key // TODO: allow support for a keyPriceCalculator which could set prices dynamically uint public keyPrice; // Max number of keys sold if the keyReleaseMechanism is public uint public maxNumberOfKeys; // A count of how many new key purchases there have been uint public totalSupply; // The account which will receive funds on withdrawal address public beneficiary; // The denominator component for values specified in basis points. uint public constant BASIS_POINTS_DEN = 10000; // Ensure that the Lock has not sold all of its keys. modifier notSoldOut() { require(maxNumberOfKeys > totalSupply, 'LOCK_SOLD_OUT'); _; } modifier onlyOwnerOrBeneficiary() { require( msg.sender == owner() || msg.sender == beneficiary, 'ONLY_LOCK_OWNER_OR_BENEFICIARY' ); _; } function initialize( address _beneficiary, uint _expirationDuration, uint _keyPrice, uint _maxNumberOfKeys ) internal { require(_expirationDuration <= 100 * 365 * 24 * 60 * 60, 'MAX_EXPIRATION_100_YEARS'); unlockProtocol = IUnlock(msg.sender); // Make sure we link back to Unlock's smart contract. beneficiary = _beneficiary; expirationDuration = _expirationDuration; keyPrice = _keyPrice; maxNumberOfKeys = _maxNumberOfKeys; } // The version number of the current implementation on this network function publicLockVersion( ) public pure returns (uint) { return 5; } /** * @dev Called by owner to withdraw all funds from the lock and send them to the `beneficiary`. * @param _tokenAddress specifies the token address to withdraw or 0 for ETH. This is usually * the same as `tokenAddress` in MixinFunds. * @param _amount specifies the max amount to withdraw, which may be reduced when * considering the available balance. Set to 0 or MAX_UINT to withdraw everything. * * TODO: consider allowing anybody to trigger this as long as it goes to owner anyway? * -- however be wary of draining funds as it breaks the `cancelAndRefund` and `fullRefund` * use cases. */ function withdraw( address _tokenAddress, uint _amount ) external onlyOwnerOrBeneficiary { uint balance = getBalance(_tokenAddress, address(this)); uint amount; if(_amount == 0 || _amount > balance) { require(balance > 0, 'NOT_ENOUGH_FUNDS'); amount = balance; } else { amount = _amount; } emit Withdrawal(msg.sender, _tokenAddress, beneficiary, amount); // Security: re-entrancy not a risk as this is the last line of an external function _transfer(_tokenAddress, beneficiary, amount); } /** * A function which lets the owner of the lock to change the price for future purchases. */ function updateKeyPrice( uint _keyPrice ) external onlyOwner onlyIfAlive { uint oldKeyPrice = keyPrice; keyPrice = _keyPrice; emit PriceChanged(oldKeyPrice, keyPrice); } /** * A function which lets the owner of the lock update the beneficiary account, * which receives funds on withdrawal. */ function updateBeneficiary( address _beneficiary ) external onlyOwnerOrBeneficiary { require(_beneficiary != address(0), 'INVALID_ADDRESS'); beneficiary = _beneficiary; } } // File: contracts\mixins\MixinKeys.sol pragma solidity 0.5.12; /** * @title Mixin for managing `Key` data. * @author HardlyDifficult * @dev `Mixins` are a design pattern seen in the 0x contracts. It simply * separates logically groupings of code to ease readability. */ contract MixinKeys is Ownable, MixinLockCore { // The struct for a key struct Key { uint tokenId; uint expirationTimestamp; } // Called when the Lock owner expires a user's Key event ExpireKey(uint indexed tokenId); // Keys // Each owner can have at most exactly one key // TODO: could we use public here? (this could be confusing though because it getter will // return 0 values when missing a key) mapping (address => Key) internal keyByOwner; // Each tokenId can have at most exactly one owner at a time. // Returns 0 if the token does not exist // TODO: once we decouple tokenId from owner address (incl in js), then we can consider // merging this with totalSupply into an array instead. mapping (uint => address) public ownerOf; // Addresses of owners are also stored in an array. // Addresses are never removed by design to avoid abuses around referals address[] public owners; // Ensures that an owner owns or has owned a key in the past modifier ownsOrHasOwnedKey( address _owner ) { require( keyByOwner[_owner].expirationTimestamp > 0, 'HAS_NEVER_OWNED_KEY' ); _; } // Ensures that an owner has a valid key modifier hasValidKey( address _owner ) { require( getHasValidKey(_owner), 'KEY_NOT_VALID' ); _; } // Ensures that a key has an owner modifier isKey( uint _tokenId ) { require( ownerOf[_tokenId] != address(0), 'NO_SUCH_KEY' ); _; } // Ensure that the caller owns the key modifier onlyKeyOwner( uint _tokenId ) { require( isKeyOwner(_tokenId, msg.sender), 'ONLY_KEY_OWNER' ); _; } /** * A function which lets the owner of the lock expire a users' key. */ function expireKeyFor( address _owner ) public onlyOwner hasValidKey(_owner) { Key storage key = keyByOwner[_owner]; key.expirationTimestamp = block.timestamp; // Effectively expiring the key emit ExpireKey(key.tokenId); } /** * In the specific case of a Lock, each owner can own only at most 1 key. * @return The number of NFTs owned by `_owner`, either 0 or 1. */ function balanceOf( address _owner ) external view returns (uint) { require(_owner != address(0), 'INVALID_ADDRESS'); return getHasValidKey(_owner) ? 1 : 0; } /** * Checks if the user has a non-expired key. */ function getHasValidKey( address _owner ) public view returns (bool) { return keyByOwner[_owner].expirationTimestamp > block.timestamp; } /** * @notice Find the tokenId for a given user * @return The tokenId of the NFT, else revert */ function getTokenIdFor( address _account ) public view hasValidKey(_account) returns (uint) { return keyByOwner[_account].tokenId; } /** * A function which returns a subset of the keys for this Lock as an array * @param _page the page of key owners requested when faceted by page size * @param _pageSize the number of Key Owners requested per page */ function getOwnersByPage(uint _page, uint _pageSize) public view returns (address[] memory) { require(owners.length > 0, 'NO_OUTSTANDING_KEYS'); uint pageSize = _pageSize; uint _startIndex = _page * pageSize; uint endOfPageIndex; if (_startIndex + pageSize > owners.length) { endOfPageIndex = owners.length; pageSize = owners.length - _startIndex; } else { endOfPageIndex = (_startIndex + pageSize); } // new temp in-memory array to hold pageSize number of requested owners: address[] memory ownersByPage = new address[](pageSize); uint pageIndex = 0; // Build the requested set of owners into a new temporary array: for (uint i = _startIndex; i < endOfPageIndex; i++) { ownersByPage[pageIndex] = owners[i]; pageIndex++; } return ownersByPage; } /** * Checks if the given address owns the given tokenId. */ function isKeyOwner( uint _tokenId, address _owner ) public view returns (bool) { return ownerOf[_tokenId] == _owner; } /** * @dev Returns the key's ExpirationTimestamp field for a given owner. * @param _owner address of the user for whom we search the key */ function keyExpirationTimestampFor( address _owner ) public view ownsOrHasOwnedKey(_owner) returns (uint timestamp) { return keyByOwner[_owner].expirationTimestamp; } /** * Public function which returns the total number of unique owners (both expired * and valid). This may be larger than totalSupply. */ function numberOfOwners() public view returns (uint) { return owners.length; } /** * Assigns the key a new tokenId (from totalSupply) if it does not already have * one assigned. */ function _assignNewTokenId( Key storage _key ) internal { if (_key.tokenId == 0) { // This is a brand new owner // We increment the tokenId counter totalSupply++; // we assign the incremented `totalSupply` as the tokenId for the new key _key.tokenId = totalSupply; } } /** * Records the owner of a given tokenId */ function _recordOwner( address _owner, uint _tokenId ) internal { if (ownerOf[_tokenId] != _owner) { // TODO: this may include duplicate entries owners.push(_owner); // We register the owner of the tokenID ownerOf[_tokenId] = _owner; } } } // File: contracts\mixins\MixinApproval.sol pragma solidity 0.5.12; /** * @title Mixin for the Approval related functions needed to meet the ERC721 * standard. * @author HardlyDifficult * @dev `Mixins` are a design pattern seen in the 0x contracts. It simply * separates logically groupings of code to ease readability. */ contract MixinApproval is IERC721, MixinDisableAndDestroy, MixinKeys { // Keeping track of approved transfers // This is a mapping of addresses which have approved // the transfer of a key to another address where their key can be transfered // Note: the approver may actually NOT have a key... and there can only // be a single approved beneficiary // Note 2: for transfer, both addresses will be different // Note 3: for sales (new keys on restricted locks), both addresses will be the same mapping (uint => address) private approved; // Keeping track of approved operators for a Key owner. // Since an owner can have up to 1 Key, this is similiar to above // but the approval does not reset when a transfer occurs. mapping (address => mapping (address => bool)) private ownerToOperatorApproved; // Ensure that the caller has a key // or that the caller has been approved // for ownership of that key modifier onlyKeyOwnerOrApproved( uint _tokenId ) { require( isKeyOwner(_tokenId, msg.sender) || _isApproved(_tokenId, msg.sender) || isApprovedForAll(ownerOf[_tokenId], msg.sender), 'ONLY_KEY_OWNER_OR_APPROVED'); _; } /** * This approves _approved to get ownership of _tokenId. * Note: that since this is used for both purchase and transfer approvals * the approved token may not exist. */ function approve( address _approved, uint _tokenId ) external payable onlyIfAlive onlyKeyOwnerOrApproved(_tokenId) { require(msg.sender != _approved, 'APPROVE_SELF'); approved[_tokenId] = _approved; emit Approval(ownerOf[_tokenId], _approved, _tokenId); } /** * @dev Sets or unsets the approval of a given operator * An operator is allowed to transfer all tokens of the sender on their behalf * @param _to operator address to set the approval * @param _approved representing the status of the approval to be set */ function setApprovalForAll( address _to, bool _approved ) external onlyIfAlive { require(_to != msg.sender, 'APPROVE_SELF'); ownerToOperatorApproved[msg.sender][_to] = _approved; emit ApprovalForAll(msg.sender, _to, _approved); } /** * Will return the approved recipient for a key, if any. */ function getApproved( uint _tokenId ) external view returns (address) { address approvedRecipient = approved[_tokenId]; require(approvedRecipient != address(0), 'NONE_APPROVED'); return approvedRecipient; } /** * @dev Tells whether an operator is approved by a given owner * @param _owner owner address which you want to query the approval of * @param _operator operator address which you want to query the approval of * @return bool whether the given operator is approved by the given owner */ function isApprovedForAll( address _owner, address _operator ) public view returns (bool) { return ownerToOperatorApproved[_owner][_operator]; } /** * @dev Checks if the given user is approved to transfer the tokenId. */ function _isApproved( uint _tokenId, address _user ) internal view returns (bool) { return approved[_tokenId] == _user; } /** * @dev Function to clear current approval of a given token ID * @param _tokenId uint256 ID of the token to be transferred */ function _clearApproval( uint256 _tokenId ) internal { if (approved[_tokenId] != address(0)) { approved[_tokenId] = address(0); } } } // File: contracts\mixins\MixinERC721Enumerable.sol pragma solidity 0.5.12; /** * @title Implements the ERC-721 Enumerable extension. */ contract MixinERC721Enumerable is IERC721Enumerable, ERC165, MixinLockCore, // Implements totalSupply MixinKeys { function initialize() public { /** * register the supported interface to conform to ERC721Enumerable via ERC165 * 0x780e9d63 === * bytes4(keccak256('totalSupply()')) ^ * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ * bytes4(keccak256('tokenByIndex(uint256)')) */ _registerInterface(0x780e9d63); } /// @notice Enumerate valid NFTs /// @dev Throws if `_index` >= `totalSupply()`. /// @param _index A counter less than `totalSupply()` /// @return The token identifier for the `_index`th NFT, /// (sort order not specified) function tokenByIndex( uint256 _index ) external view returns (uint256) { require(_index < totalSupply, 'OUT_OF_RANGE'); return _index; } /// @notice Enumerate NFTs assigned to an owner /// @dev Throws if `_index` >= `balanceOf(_owner)` or if /// `_owner` is the zero address, representing invalid NFTs. /// @param _owner An address where we are interested in NFTs owned by them /// @param _index A counter less than `balanceOf(_owner)` /// @return The token identifier for the `_index`th NFT assigned to `_owner`, /// (sort order not specified) function tokenOfOwnerByIndex( address _owner, uint256 _index ) external view returns (uint256) { require(_index == 0, 'ONLY_ONE_KEY_PER_OWNER'); return getTokenIdFor(_owner); } } // File: contracts\interfaces\IUnlockEventHooks.sol pragma solidity 0.5.12; interface IUnlockEventHooks { /** * @notice If the lock owner has registered an implementer for this interface with ERC-1820 * then this hook is called with every key sold. * @dev Use the interface name `keccak256("IUnlockEventHooks_keySold")` * which is 4d99da10ff5120f726d35edd8dbd417bbe55d90453b8432acd284e650ee2c6f0 * @param from the msg.sender making the purchase * @param to the account which will be granted a key * @param referrer the account which referred this key sale * @param pricePaid the amount paid for the key, in the lock's currency (ETH or a ERC-20 token) * @param data arbitrary data populated by the front-end which initiated the sale */ function keySold( address from, address to, address referrer, uint256 pricePaid, bytes calldata data ) external; /** * @notice If the lock owner has registered an implementer for this interface with ERC-1820 * then this hook is called with every key cancel. * @dev Use the interface name `keccak256("IUnlockEventHooks_keyCancel")` * which is 0xd6342b4bfdf66164985c9f5fe235f643a035ee12f507d7bd0f8c89e07e790f68 * @param operator the msg.sender issuing the cancel * @param to the account which had the key canceled * @param refund the amount sent to the `to` account (ETH or a ERC-20 token) */ function keyCancel( address operator, address to, uint256 refund ) external; } // File: @openzeppelin\contracts\introspection\IERC1820Registry.sol pragma solidity ^0.5.0; /** * @dev Interface of the global ERC1820 Registry, as defined in the * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register * implementers for interfaces in this registry, as well as query support. * * Implementers may be shared by multiple accounts, and can also implement more * than a single interface for each account. Contracts can implement interfaces * for themselves, but externally-owned accounts (EOA) must delegate this to a * contract. * * {IERC165} interfaces can also be queried via the registry. * * For an in-depth explanation and source code analysis, see the EIP text. */ interface IERC1820Registry { /** * @dev Sets `newManager` as the manager for `account`. A manager of an * account is able to set interface implementers for it. * * By default, each account is its own manager. Passing a value of `0x0` in * `newManager` will reset the manager to this initial state. * * Emits a {ManagerChanged} event. * * Requirements: * * - the caller must be the current manager for `account`. */ function setManager(address account, address newManager) external; /** * @dev Returns the manager for `account`. * * See {setManager}. */ function getManager(address account) external view returns (address); /** * @dev Sets the `implementer` contract as `account`'s implementer for * `interfaceHash`. * * `account` being the zero address is an alias for the caller's address. * The zero address can also be used in `implementer` to remove an old one. * * See {interfaceHash} to learn how these are created. * * Emits an {InterfaceImplementerSet} event. * * Requirements: * * - the caller must be the current manager for `account`. * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not * end in 28 zeroes). * - `implementer` must implement {IERC1820Implementer} and return true when * queried for support, unless `implementer` is the caller. See * {IERC1820Implementer-canImplementInterfaceForAddress}. */ function setInterfaceImplementer(address account, bytes32 interfaceHash, address implementer) external; /** * @dev Returns the implementer of `interfaceHash` for `account`. If no such * implementer is registered, returns the zero address. * * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28 * zeroes), `account` will be queried for support of it. * * `account` being the zero address is an alias for the caller's address. */ function getInterfaceImplementer(address account, bytes32 interfaceHash) external view returns (address); /** * @dev Returns the interface hash for an `interfaceName`, as defined in the * corresponding * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP]. */ function interfaceHash(string calldata interfaceName) external pure returns (bytes32); /** * @notice Updates the cache with whether the contract implements an ERC165 interface or not. * @param account Address of the contract for which to update the cache. * @param interfaceId ERC165 interface for which to update the cache. */ function updateERC165Cache(address account, bytes4 interfaceId) external; /** * @notice Checks whether a contract implements an ERC165 interface or not. * If the result is not cached a direct lookup on the contract address is performed. * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling * {updateERC165Cache} with the contract address. * @param account Address of the contract to check. * @param interfaceId ERC165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool); /** * @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache. * @param account Address of the contract to check. * @param interfaceId ERC165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool); event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer); event ManagerChanged(address indexed account, address indexed newManager); } // File: contracts\mixins\MixinEventHooks.sol pragma solidity 0.5.12; /** * @title Implements callback hooks for Locks. * @author Nick Mancuso (unlock-protocol.com) */ contract MixinEventHooks is MixinLockCore { IERC1820Registry public constant erc1820 = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24); // `keccak256("IUnlockEventHooks_keySold")` bytes32 public constant keySoldInterfaceId = 0x4d99da10ff5120f726d35edd8dbd417bbe55d90453b8432acd284e650ee2c6f0; // `keccak256("IUnlockEventHooks_keyCancel")` bytes32 public constant keyCancelInterfaceId = 0xd6342b4bfdf66164985c9f5fe235f643a035ee12f507d7bd0f8c89e07e790f68; /** * @dev called anytime a key is sold in order to inform the hook if there is one registered. */ function _onKeySold( address _to, address _referrer, uint256 _pricePaid, bytes memory _data ) internal { address implementer = erc1820.getInterfaceImplementer(beneficiary, keySoldInterfaceId); if(implementer != address(0)) { IUnlockEventHooks(implementer).keySold(msg.sender, _to, _referrer, _pricePaid, _data); } } /** * @dev called anytime a key is canceled in order to inform the hook if there is one registered. */ function _onKeyCancel( address _to, uint256 _refund ) internal { address implementer = erc1820.getInterfaceImplementer(beneficiary, keyCancelInterfaceId); if(implementer != address(0)) { IUnlockEventHooks(implementer).keyCancel(msg.sender, _to, _refund); } } } // File: contracts\mixins\MixinGrantKeys.sol pragma solidity 0.5.12; /** * @title Mixin allowing the Lock owner to grant / gift keys to users. * @author HardlyDifficult * @dev `Mixins` are a design pattern seen in the 0x contracts. It simply * separates logically groupings of code to ease readability. */ contract MixinGrantKeys is IERC721, Ownable, MixinKeys { /** * Allows the Lock owner to give a collection of users a key with no charge. * Each key may be assigned a different expiration date. */ function grantKeys( address[] calldata _recipients, uint[] calldata _expirationTimestamps ) external onlyOwner { for(uint i = 0; i < _recipients.length; i++) { address recipient = _recipients[i]; uint expirationTimestamp = _expirationTimestamps[i]; require(recipient != address(0), 'INVALID_ADDRESS'); Key storage toKey = keyByOwner[recipient]; require(expirationTimestamp > toKey.expirationTimestamp, 'ALREADY_OWNS_KEY'); _assignNewTokenId(toKey); _recordOwner(recipient, toKey.tokenId); toKey.expirationTimestamp = expirationTimestamp; // trigger event emit Transfer( address(0), // This is a creation. recipient, toKey.tokenId ); } } } // File: contracts\UnlockUtils.sol pragma solidity 0.5.12; // This contract provides some utility methods for use with the unlock protocol smart contracts. // Borrowed from: // https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.5.sol#L943 library UnlockUtils { function strConcat( string memory _a, string memory _b, string memory _c, string memory _d ) internal pure returns (string memory _concatenatedString) { bytes memory _ba = bytes(_a); bytes memory _bb = bytes(_b); bytes memory _bc = bytes(_c); bytes memory _bd = bytes(_d); string memory abcd = new string(_ba.length + _bb.length + _bc.length + _bd.length); bytes memory babcd = bytes(abcd); uint k = 0; uint i = 0; for (i = 0; i < _ba.length; i++) { babcd[k++] = _ba[i]; } for (i = 0; i < _bb.length; i++) { babcd[k++] = _bb[i]; } for (i = 0; i < _bc.length; i++) { babcd[k++] = _bc[i]; } for (i = 0; i < _bd.length; i++) { babcd[k++] = _bd[i]; } return string(babcd); } function uint2Str( uint _i ) internal pure returns (string memory _uintAsString) { // make a copy of the param to avoid security/no-assign-params error uint c = _i; if (_i == 0) { return '0'; } uint j = _i; uint len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint k = len - 1; while (c != 0) { bstr[k--] = byte(uint8(48 + c % 10)); c /= 10; } return string(bstr); } function address2Str( address _addr ) internal pure returns(string memory) { bytes32 value = bytes32(uint256(_addr)); bytes memory alphabet = '0123456789abcdef'; bytes memory str = new bytes(42); str[0] = '0'; str[1] = 'x'; for (uint i = 0; i < 20; i++) { str[2+i*2] = alphabet[uint8(value[i + 12] >> 4)]; str[3+i*2] = alphabet[uint8(value[i + 12] & 0x0f)]; } return string(str); } } // File: contracts\mixins\MixinLockMetadata.sol pragma solidity 0.5.12; /** * @title Mixin for metadata about the Lock. * @author HardlyDifficult * @dev `Mixins` are a design pattern seen in the 0x contracts. It simply * separates logically groupings of code to ease readability. */ contract MixinLockMetadata is IERC721, ERC165, Ownable, MixinLockCore, MixinKeys { using UnlockUtils for uint; using UnlockUtils for address; using UnlockUtils for string; /// A descriptive name for a collection of NFTs in this contract.Defaults to "Unlock-Protocol" but is settable by lock owner string public name; /// An abbreviated name for NFTs in this contract. Defaults to "KEY" but is settable by lock owner string private lockSymbol; // the base Token URI for this Lock. If not set by lock owner, the global URI stored in Unlock is used. string private baseTokenURI; event NewLockSymbol( string symbol ); function initialize( string memory _lockName ) internal { ERC165.initialize(); name = _lockName; // registering the optional erc721 metadata interface with ERC165.sol using // the ID specified in the standard: https://eips.ethereum.org/EIPS/eip-721 _registerInterface(0x5b5e139f); } /** * Allows the Lock owner to assign a descriptive name for this Lock. */ function updateLockName( string calldata _lockName ) external onlyOwner { name = _lockName; } /** * Allows the Lock owner to assign a Symbol for this Lock. */ function updateLockSymbol( string calldata _lockSymbol ) external onlyOwner { lockSymbol = _lockSymbol; emit NewLockSymbol(_lockSymbol); } /** * @dev Gets the token symbol * @return string representing the token name */ function symbol() external view returns(string memory) { if(bytes(lockSymbol).length == 0) { return unlockProtocol.globalTokenSymbol(); } else { return lockSymbol; } } /** * Allows the Lock owner to update the baseTokenURI for this Lock. */ function setBaseTokenURI( string calldata _baseTokenURI ) external onlyOwner { baseTokenURI = _baseTokenURI; } /** @notice A distinct Uniform Resource Identifier (URI) for a given asset. * @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC * 3986. The URI may point to a JSON file that conforms to the "ERC721 * Metadata JSON Schema". * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md */ function tokenURI( uint256 _tokenId ) external view isKey(_tokenId) returns(string memory) { string memory URI; if(bytes(baseTokenURI).length == 0) { URI = unlockProtocol.globalBaseTokenURI(); } else { URI = baseTokenURI; } return URI.strConcat( address(this).address2Str(), '/', _tokenId.uint2Str() ); } } // File: contracts\mixins\MixinPurchase.sol pragma solidity 0.5.12; /** * @title Mixin for the purchase-related functions. * @author HardlyDifficult * @dev `Mixins` are a design pattern seen in the 0x contracts. It simply * separates logically groupings of code to ease readability. */ contract MixinPurchase is MixinFunds, MixinDisableAndDestroy, MixinLockCore, MixinKeys, MixinEventHooks { using SafeMath for uint; /** * @dev Purchase function * @param _value the number of tokens to pay for this purchase >= the current keyPrice - any applicable discount * (_value is ignored when using ETH) * @param _recipient address of the recipient of the purchased key * @param _referrer address of the user making the referral * @param _data arbitrary data populated by the front-end which initiated the sale * @dev Setting _value to keyPrice exactly doubles as a security feature. That way if the lock owner increases the * price while my transaction is pending I can't be charged more than I expected (only applicable to ERC-20 when more * than keyPrice is approved for spending). */ function purchase( uint256 _value, address _recipient, address _referrer, bytes calldata _data ) external payable onlyIfAlive notSoldOut { require(_recipient != address(0), 'INVALID_ADDRESS'); // Assign the key Key storage toKey = keyByOwner[_recipient]; if (toKey.tokenId == 0) { // Assign a new tokenId (if a new owner or previously transfered) _assignNewTokenId(toKey); _recordOwner(_recipient, toKey.tokenId); } if (toKey.expirationTimestamp >= block.timestamp) { // This is an existing owner trying to extend their key toKey.expirationTimestamp = toKey.expirationTimestamp.add(expirationDuration); } else { // SafeAdd is not required here since expirationDuration is capped to a tiny value // (relative to the size of a uint) toKey.expirationTimestamp = block.timestamp + expirationDuration; } // Let's get the actual price for the key from the Unlock smart contract uint discount; uint tokens; uint inMemoryKeyPrice = keyPrice; (discount, tokens) = unlockProtocol.computeAvailableDiscountFor(_recipient, inMemoryKeyPrice); if (discount > inMemoryKeyPrice) { inMemoryKeyPrice = 0; } else { // SafeSub not required as the if statement already confirmed `inMemoryKeyPrice - discount` cannot underflow inMemoryKeyPrice -= discount; } if (discount > 0) { unlockProtocol.recordConsumedDiscount(discount, tokens); } unlockProtocol.recordKeyPurchase(inMemoryKeyPrice, getHasValidKey(_referrer) ? _referrer : address(0)); // trigger event emit Transfer( address(0), // This is a creation. _recipient, toKey.tokenId ); // We explicitly allow for greater amounts of ETH or tokens to allow 'donations' if(tokenAddress != address(0)) { require(_value >= inMemoryKeyPrice, 'INSUFFICIENT_VALUE'); inMemoryKeyPrice = _value; } // Security: after state changes to minimize risk of re-entrancy uint pricePaid = _chargeAtLeast(inMemoryKeyPrice); // Security: last line to minimize risk of re-entrancy _onKeySold(_recipient, _referrer, pricePaid, _data); } } // File: @openzeppelin\contracts-ethereum-package\contracts\cryptography\ECDSA.sol pragma solidity ^0.5.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * NOTE: This call _does not revert_ if the signature is invalid, or * if the signer is otherwise unable to be retrieved. In those scenarios, * the zero address is returned. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { // Check the signature length if (signature.length != 65) { return (address(0)); } // Divide the signature in r, s and v variables bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. // solhint-disable-next-line no-inline-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return address(0); } if (v != 27 && v != 28) { return address(0); } // If the signature is valid (and not malleable), return the signer address return ecrecover(hash, v, r, s); } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * replicates the behavior of the * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`] * JSON-RPC method. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } } // File: contracts\mixins\MixinSignatures.sol pragma solidity 0.5.12; contract MixinSignatures { /// @notice emits anytime the nonce used for off-chain approvals changes. event NonceChanged( address indexed keyOwner, uint nextAvailableNonce ); // Stores a nonce per user to use for signed messages mapping(address => uint) public keyOwnerToNonce; /// @notice Validates an off-chain approval signature. /// @dev If valid the nonce is consumed, else revert. modifier consumeOffchainApproval( bytes32 _hash, bytes memory _signature, address _keyOwner ) { require( ECDSA.recover( ECDSA.toEthSignedMessageHash(_hash), _signature ) == _keyOwner, 'INVALID_SIGNATURE' ); keyOwnerToNonce[_keyOwner]++; emit NonceChanged(_keyOwner, keyOwnerToNonce[_keyOwner]); _; } /** * @notice Sets the minimum nonce for a valid off-chain approval message from the * senders account. * @dev This can be used to invalidate a previously signed message. */ function invalidateOffchainApproval( uint _nextAvailableNonce ) external { require(_nextAvailableNonce > keyOwnerToNonce[msg.sender], 'NONCE_ALREADY_USED'); keyOwnerToNonce[msg.sender] = _nextAvailableNonce; emit NonceChanged(msg.sender, _nextAvailableNonce); } } // File: contracts\mixins\MixinRefunds.sol pragma solidity 0.5.12; contract MixinRefunds is Ownable, MixinSignatures, MixinFunds, MixinLockCore, MixinKeys, MixinEventHooks { using SafeMath for uint; // CancelAndRefund will return funds based on time remaining minus this penalty. // This is calculated as `proRatedRefund * refundPenaltyBasisPoints / BASIS_POINTS_DEN`. uint public refundPenaltyBasisPoints; uint public freeTrialLength; event CancelKey( uint indexed tokenId, address indexed owner, address indexed sendTo, uint refund ); event RefundPenaltyChanged( uint freeTrialLength, uint refundPenaltyBasisPoints ); function initialize() public { // default to 10% refundPenaltyBasisPoints = 1000; } /** * @dev Invoked by the lock owner to destroy the user's ket and perform a refund and cancellation * of the key */ function fullRefund(address _keyOwner, uint amount) external onlyOwner hasValidKey(_keyOwner) { _cancelAndRefund(_keyOwner, amount); } /** * @dev Destroys the user's key and sends a refund based on the amount of time remaining. */ function cancelAndRefund() external { uint refund = _getCancelAndRefundValue(msg.sender); _cancelAndRefund(msg.sender, refund); } /** * @dev Cancels a key owned by a different user and sends the funds to the msg.sender. * @param _keyOwner this user's key will be canceled * @param _signature getCancelAndRefundApprovalHash signed by the _keyOwner */ function cancelAndRefundFor( address _keyOwner, bytes calldata _signature ) external consumeOffchainApproval(getCancelAndRefundApprovalHash(_keyOwner, msg.sender), _signature, _keyOwner) { uint refund = _getCancelAndRefundValue(_keyOwner); _cancelAndRefund(_keyOwner, refund); } /** * Allow the owner to change the refund penalty. */ function updateRefundPenalty( uint _freeTrialLength, uint _refundPenaltyBasisPoints ) external onlyOwner { emit RefundPenaltyChanged( _freeTrialLength, _refundPenaltyBasisPoints ); freeTrialLength = _freeTrialLength; refundPenaltyBasisPoints = _refundPenaltyBasisPoints; } /** * @dev Determines how much of a refund a key owner would receive if they issued * a cancelAndRefund block.timestamp. * Note that due to the time required to mine a tx, the actual refund amount will be lower * than what the user reads from this call. */ function getCancelAndRefundValueFor( address _owner ) external view returns (uint refund) { return _getCancelAndRefundValue(_owner); } /** * @dev returns the hash to sign in order to allow another user to cancel on your behalf. */ function getCancelAndRefundApprovalHash( address _keyOwner, address _txSender ) public view returns (bytes32 approvalHash) { return keccak256( abi.encodePacked( // Approval is specific to this Lock address(this), // Approval enables only one cancel call keyOwnerToNonce[_keyOwner], // Approval allows only one account to broadcast the tx _txSender ) ); } /** * @dev cancels the key for the given keyOwner and sends the refund to the msg.sender. */ function _cancelAndRefund( address _keyOwner, uint refund ) internal { Key storage key = keyByOwner[_keyOwner]; emit CancelKey(key.tokenId, _keyOwner, msg.sender, refund); // expirationTimestamp is a proxy for hasKey, setting this to `block.timestamp` instead // of 0 so that we can still differentiate hasKey from hasValidKey. key.expirationTimestamp = block.timestamp; if (refund > 0) { // Security: doing this last to avoid re-entrancy concerns _transfer(tokenAddress, _keyOwner, refund); } _onKeyCancel(_keyOwner, refund); } /** * @dev Determines how much of a refund a key owner would receive if they issued * a cancelAndRefund now. * @param _owner The owner of the key check the refund value for. */ function _getCancelAndRefundValue( address _owner ) private view hasValidKey(_owner) returns (uint refund) { Key storage key = keyByOwner[_owner]; // Math: safeSub is not required since `hasValidKey` confirms timeRemaining is positive uint timeRemaining = key.expirationTimestamp - block.timestamp; if(timeRemaining + freeTrialLength >= expirationDuration) { refund = keyPrice; } else { // Math: using safeMul in case keyPrice or timeRemaining is very large refund = keyPrice.mul(timeRemaining) / expirationDuration; } // Apply the penalty if this is not a free trial if(freeTrialLength == 0 || timeRemaining + freeTrialLength < expirationDuration) { uint penalty = keyPrice.mul(refundPenaltyBasisPoints) / BASIS_POINTS_DEN; if (refund > penalty) { // Math: safeSub is not required since the if confirms this won't underflow refund -= penalty; } else { refund = 0; } } } } // File: @openzeppelin\contracts-ethereum-package\contracts\token\ERC721\IERC721Receiver.sol pragma solidity ^0.5.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ contract IERC721Receiver { /** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a {IERC721-safeTransferFrom}. This function MUST return the function selector, * otherwise the caller will revert the transaction. The selector to be * returned can be obtained as `this.onERC721Received.selector`. This * function MAY throw to revert and reject the transfer. * Note: the ERC721 contract address is always the message sender. * @param operator The address which called `safeTransferFrom` function * @param from The address which previously owned the token * @param tokenId The NFT identifier which is being transferred * @param data Additional data with no specified format * @return bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` */ function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data) public returns (bytes4); } // File: contracts\mixins\MixinTransfer.sol pragma solidity 0.5.12; /** * @title Mixin for the transfer-related functions needed to meet the ERC721 * standard. * @author Nick Furfaro * @dev `Mixins` are a design pattern seen in the 0x contracts. It simply * separates logically groupings of code to ease readability. */ contract MixinTransfer is MixinFunds, MixinLockCore, MixinKeys, MixinApproval { using SafeMath for uint; using Address for address; event TransferFeeChanged( uint transferFeeBasisPoints ); event TimestampChanged( uint indexed _tokenId, uint _amount, bool _timeAdded ); // 0x150b7a02 == bytes4(keccak256('onERC721Received(address,address,uint256,bytes)')) bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; // The fee relative to keyPrice to charge when transfering a Key to another account // (potentially on a 0x marketplace). // This is calculated as `keyPrice * transferFeeBasisPoints / BASIS_POINTS_DEN`. uint public transferFeeBasisPoints; /** * @notice Allows the key owner to safely share their key (parent key) by * transferring a portion of the remaining time to a new key (child key). * @param _to The recipient of the shared key * @param _tokenId the key to share * @param _timeShared The amount of time shared */ function shareKey( address _to, uint _tokenId, uint _timeShared ) public onlyIfAlive onlyKeyOwnerOrApproved(_tokenId) { require(transferFeeBasisPoints < BASIS_POINTS_DEN, 'KEY_TRANSFERS_DISABLED'); require(_to != address(0), 'INVALID_ADDRESS'); address keyOwner = ownerOf[_tokenId]; require(getHasValidKey(keyOwner), 'KEY_NOT_VALID'); Key storage fromKey = keyByOwner[keyOwner]; Key storage toKey = keyByOwner[_to]; uint iDTo = toKey.tokenId; uint time; // get the remaining time for the origin key uint timeRemaining = fromKey.expirationTimestamp - block.timestamp; // get the transfer fee based on amount of time wanted share uint fee = getTransferFee(keyOwner, _timeShared); uint timePlusFee = _timeShared.add(fee); // ensure that we don't try to share too much if(timePlusFee < timeRemaining) { // now we can safely set the time time = _timeShared; // deduct time from parent key, including transfer fee _timeMachine(_tokenId, timePlusFee, false); } else { // we have to recalculate the fee here fee = getTransferFee(keyOwner, timeRemaining); time = timeRemaining - fee; fromKey.expirationTimestamp = block.timestamp; // Effectively expiring the key emit ExpireKey(_tokenId); } if (toKey.tokenId == 0) { _assignNewTokenId(toKey); _recordOwner(_to, iDTo); emit Transfer( address(0), // This is a creation or time-sharing _to, iDTo ); } // add time to new key _timeMachine(iDTo, time, true); // trigger event emit Transfer( keyOwner, _to, iDTo ); require(_checkOnERC721Received(keyOwner, _to, _tokenId, ''), 'NON_COMPLIANT_ERC721_RECEIVER'); } function transferFrom( address _from, address _recipient, uint _tokenId ) public onlyIfAlive hasValidKey(_from) onlyKeyOwnerOrApproved(_tokenId) { require(transferFeeBasisPoints < BASIS_POINTS_DEN, 'KEY_TRANSFERS_DISABLED'); require(_recipient != address(0), 'INVALID_ADDRESS'); uint fee = getTransferFee(_from, 0); Key storage fromKey = keyByOwner[_from]; Key storage toKey = keyByOwner[_recipient]; uint id = fromKey.tokenId; uint previousExpiration = toKey.expirationTimestamp; // subtract the fee from the senders key before the transfer _timeMachine(id, fee, false); if (toKey.tokenId == 0) { toKey.tokenId = fromKey.tokenId; _recordOwner(_recipient, toKey.tokenId); } if (previousExpiration <= block.timestamp) { // The recipient did not have a key, or had a key but it expired. The new expiration is the // sender's key expiration // an expired key is no longer a valid key, so the new tokenID is the sender's tokenID toKey.expirationTimestamp = fromKey.expirationTimestamp; toKey.tokenId = fromKey.tokenId; _recordOwner(_recipient, _tokenId); } else { // The recipient has a non expired key. We just add them the corresponding remaining time // SafeSub is not required since the if confirms `previousExpiration - block.timestamp` cannot underflow toKey.expirationTimestamp = fromKey .expirationTimestamp.add(previousExpiration - block.timestamp); } // Effectively expiring the key for the previous owner fromKey.expirationTimestamp = block.timestamp; // Set the tokenID to 0 for the previous owner to avoid duplicates fromKey.tokenId = 0; // Clear any previous approvals _clearApproval(_tokenId); // trigger event emit Transfer( _from, _recipient, _tokenId ); } /** * @notice Transfers the ownership of an NFT from one address to another address * @dev This works identically to the other function with an extra data parameter, * except this function just sets data to '' * @param _from The current owner of the NFT * @param _to The new owner * @param _tokenId The NFT to transfer */ function safeTransferFrom( address _from, address _to, uint _tokenId ) external { safeTransferFrom(_from, _to, _tokenId, ''); } /** * @notice Transfers the ownership of an NFT from one address to another address. * When transfer is complete, this functions * checks if `_to` is a smart contract (code size > 0). If so, it calls * `onERC721Received` on `_to` and throws if the return value is not * `bytes4(keccak256('onERC721Received(address,address,uint,bytes)'))`. * @param _from The current owner of the NFT * @param _to The new owner * @param _tokenId The NFT to transfer * @param _data Additional data with no specified format, sent in call to `_to` */ function safeTransferFrom( address _from, address _to, uint _tokenId, bytes memory _data ) public onlyIfAlive onlyKeyOwnerOrApproved(_tokenId) hasValidKey(ownerOf[_tokenId]) { transferFrom(_from, _to, _tokenId); require(_checkOnERC721Received(_from, _to, _tokenId, _data), 'NON_COMPLIANT_ERC721_RECEIVER'); } /** * Allow the Lock owner to change the transfer fee. */ function updateTransferFee( uint _transferFeeBasisPoints ) external onlyOwner { emit TransferFeeChanged( _transferFeeBasisPoints ); transferFeeBasisPoints = _transferFeeBasisPoints; } /** * Determines how much of a fee a key owner would need to pay in order to * transfer the key to another account. This is pro-rated so the fee goes down * overtime. * @param _owner The owner of the key check the transfer fee for. */ function getTransferFee( address _owner, uint _time ) public view hasValidKey(_owner) returns (uint) { Key storage key = keyByOwner[_owner]; uint timeToTransfer; uint fee; // Math: safeSub is not required since `hasValidKey` confirms timeToTransfer is positive // this is for standard key transfers if(_time == 0) { timeToTransfer = key.expirationTimestamp - block.timestamp; } else { timeToTransfer = _time; } fee = timeToTransfer.mul(transferFeeBasisPoints) / BASIS_POINTS_DEN; return fee; } /** * @notice Modify the expirationTimestamp of a key * by a given amount. * @param _tokenId The ID of the key to modify. * @param _deltaT The amount of time in seconds by which * to modify the keys expirationTimestamp * @param _addTime Choose whether to increase or decrease * expirationTimestamp (false == decrease, true == increase) * @dev Throws if owner does not have a valid key. */ function _timeMachine( uint _tokenId, uint256 _deltaT, bool _addTime ) internal { address tokenOwner = ownerOf[_tokenId]; require(tokenOwner != address(0), 'NON_EXISTENT_KEY'); Key storage key = keyByOwner[tokenOwner]; uint formerTimestamp = key.expirationTimestamp; bool validKey = getHasValidKey(tokenOwner); if(_addTime) { if(validKey) { key.expirationTimestamp = formerTimestamp.add(_deltaT); } else { key.expirationTimestamp = block.timestamp.add(_deltaT); } } else { key.expirationTimestamp = formerTimestamp.sub(_deltaT); } emit TimestampChanged(_tokenId, _deltaT, _addTime); } /** * @dev Internal function to invoke `onERC721Received` on a target address * The call is not executed if the target address is not a contract * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) internal returns (bool) { if (!to.isContract()) { return true; } bytes4 retval = IERC721Receiver(to).onERC721Received( msg.sender, from, tokenId, _data); return (retval == _ERC721_RECEIVED); } } // File: contracts\PublicLock.sol pragma solidity 0.5.12; /** * @title The Lock contract * @author Julien Genestoux (unlock-protocol.com) * @dev ERC165 allows our contract to be queried to determine whether it implements a given interface. * Every ERC-721 compliant contract must implement the ERC165 interface. * https://eips.ethereum.org/EIPS/eip-721 */ contract PublicLock is IERC721Enumerable, IERC721, IPublicLock, Initializable, ERC165, Ownable, MixinSignatures, MixinFunds, MixinDisableAndDestroy, MixinLockCore, MixinKeys, MixinLockMetadata, MixinERC721Enumerable, MixinEventHooks, MixinGrantKeys, MixinPurchase, MixinApproval, MixinTransfer, MixinRefunds { function initialize( address _owner, uint _expirationDuration, address _tokenAddress, uint _keyPrice, uint _maxNumberOfKeys, string memory _lockName ) public initializer() { Ownable.initialize(_owner); MixinFunds.initialize(_tokenAddress); MixinDisableAndDestroy.initialize(); MixinLockCore.initialize(_owner, _expirationDuration, _keyPrice, _maxNumberOfKeys); MixinLockMetadata.initialize(_lockName); MixinERC721Enumerable.initialize(); MixinRefunds.initialize(); // registering the interface for erc721 with ERC165.sol using // the ID specified in the standard: https://eips.ethereum.org/EIPS/eip-721 _registerInterface(0x80ac58cd); } }
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"sendTo","type":"address"},{"indexed":false,"internalType":"uint256","name":"refund","type":"uint256"}],"name":"CancelKey","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"Destroy","type":"event"},{"anonymous":false,"inputs":[],"name":"Disable","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ExpireKey","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"symbol","type":"string"}],"name":"NewLockSymbol","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"keyOwner","type":"address"},{"indexed":false,"internalType":"uint256","name":"nextAvailableNonce","type":"uint256"}],"name":"NonceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldKeyPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"keyPrice","type":"uint256"}],"name":"PriceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"freeTrialLength","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"refundPenaltyBasisPoints","type":"uint256"}],"name":"RefundPenaltyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"_timeAdded","type":"bool"}],"name":"TimestampChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"transferFeeBasisPoints","type":"uint256"}],"name":"TransferFeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"},{"constant":true,"inputs":[],"name":"BASIS_POINTS_DEN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_approved","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"cancelAndRefund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_keyOwner","type":"address"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"cancelAndRefundFor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"destroyLock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"disableLock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"erc1820","outputs":[{"internalType":"contract IERC1820Registry","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"expirationDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"expireKeyFor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"freeTrialLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_keyOwner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"fullRefund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"_account","type":"address"}],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_keyOwner","type":"address"},{"internalType":"address","name":"_txSender","type":"address"}],"name":"getCancelAndRefundApprovalHash","outputs":[{"internalType":"bytes32","name":"approvalHash","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"getCancelAndRefundValueFor","outputs":[{"internalType":"uint256","name":"refund","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"getHasValidKey","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_page","type":"uint256"},{"internalType":"uint256","name":"_pageSize","type":"uint256"}],"name":"getOwnersByPage","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getTokenIdFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_time","type":"uint256"}],"name":"getTransferFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"_recipients","type":"address[]"},{"internalType":"uint256[]","name":"_expirationTimestamps","type":"uint256[]"}],"name":"grantKeys","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_expirationDuration","type":"uint256"},{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_keyPrice","type":"uint256"},{"internalType":"uint256","name":"_maxNumberOfKeys","type":"uint256"},{"internalType":"string","name":"_lockName","type":"string"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_nextAvailableNonce","type":"uint256"}],"name":"invalidateOffchainApproval","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isAlive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_owner","type":"address"}],"name":"isKeyOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"keyCancelInterfaceId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"keyExpirationTimestampFor","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"keyOwnerToNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"keyPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"keySoldInterfaceId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxNumberOfKeys","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"numberOfOwners","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"owners","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"publicLockVersion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"address","name":"_referrer","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"purchase","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"refundPenaltyBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_baseTokenURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_timeShared","type":"uint256"}],"name":"shareKey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"transferFeeBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"unlockProtocol","outputs":[{"internalType":"contract IUnlock","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"updateBeneficiary","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_keyPrice","type":"uint256"}],"name":"updateKeyPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_lockName","type":"string"}],"name":"updateLockName","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_lockSymbol","type":"string"}],"name":"updateLockSymbol","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_freeTrialLength","type":"uint256"},{"internalType":"uint256","name":"_refundPenaltyBasisPoints","type":"uint256"}],"name":"updateRefundPenalty","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_transferFeeBasisPoints","type":"uint256"}],"name":"updateTransferFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052615592806100136000396000f3fe6080604052600436106103ef5760003560e01c806374b6c10611610208578063a843a4e711610118578063d1bbd49c116100ab578063f12c6b6e1161007a578063f12c6b6e146111e0578063f2fde38b1461121f578063f3fef3a314611252578063f7514bce1461128b578063fc42b58f146112c4576103ef565b8063d1bbd49c14611140578063d4fac45d14611155578063e7e2736e14611190578063e985e9c5146111a5576103ef565b8063b8968bb4116100e7578063b8968bb414611043578063c1c98d03146110ce578063c4d66de8146110e3578063c87b56dd14611116576103ef565b8063a843a4e714610f15578063abdf82ce14610f2a578063b3084f0814610f5d578063b88d4fde14610f72576103ef565b8063936d2aa41161019b578063994a8a711161016a578063994a8a7114610e445780639d76ea5814610e7d5780639f98d3cb14610e92578063a22cb46514610ec5578063a375cb0514610f00576103ef565b8063936d2aa414610dd257806393fd184414610de757806395d89b4114610dfc578063970aaeb714610e11576103ef565b80638577a6d5116101d75780638577a6d514610d435780638d0361fc14610d6d5780638da5cb5b14610da85780638f32d59b14610dbd576103ef565b806374b6c10614610bd3578063782a4ade14610be85780637c7c425314610c635780638129fc1c14610d2e576103ef565b806335576ad0116103035780634fd24d30116102965780636352211e116102655780636352211e14610a525780636d8ea5b414610a7c5780636eadde4314610aaf57806370a0823114610b8b578063715018a614610bbe576103ef565b80634fd24d301461097a57806352d6a8e41461098f578063550ef3a8146109c257806356e0d51f14610a3d576103ef565b80634136aa35116102d25780634136aa35146108c557806342842e0e146108da5780634bc5a1351461091d5780634f6ccce714610950576103ef565b806335576ad0146107c857806338af3eed146107f257806339f46986146108075780633f33133a14610837576103ef565b806310e56973116103865780631f1ec029116103555780631f1ec029146106925780632009dc65146106bc57806323b872dd146106d15780632f745c591461071457806330176e131461074d576103ef565b806310e569731461062c57806311a4c03a1461065357806318160ddd14610668578063183767da1461067d576103ef565b8063095ea7b3116103c2578063095ea7b3146105365780630aaffd2a146105645780630f15023b1461059757806310803b72146105ac576103ef565b806301ffc9a7146103f4578063025e7c271461043c57806306fdde0314610482578063081812fc1461050c575b600080fd5b34801561040057600080fd5b506104286004803603602081101561041757600080fd5b50356001600160e01b0319166112fd565b604080519115158252519081900360200190f35b34801561044857600080fd5b506104666004803603602081101561045f57600080fd5b5035611320565b604080516001600160a01b039092168252519081900360200190f35b34801561048e57600080fd5b50610497611347565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104d15781810151838201526020016104b9565b50505050905090810190601f1680156104fe5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561051857600080fd5b506104666004803603602081101561052f57600080fd5b50356113d5565b6105626004803603604081101561054c57600080fd5b506001600160a01b038135169060200135611435565b005b34801561057057600080fd5b506105626004803603602081101561058757600080fd5b50356001600160a01b03166115cb565b3480156105a357600080fd5b506104666116bc565b3480156105b857600080fd5b506105dc600480360360408110156105cf57600080fd5b50803590602001356116cb565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610618578181015183820152602001610600565b505050509050019250505060405180910390f35b34801561063857600080fd5b506106416117e3565b60408051918252519081900360200190f35b34801561065f57600080fd5b506106416117e9565b34801561067457600080fd5b506106416117ef565b34801561068957600080fd5b506106416117f5565b34801561069e57600080fd5b50610562600480360360208110156106b557600080fd5b50356117fb565b3480156106c857600080fd5b506105626118d9565b3480156106dd57600080fd5b50610562600480360360608110156106f457600080fd5b506001600160a01b038135811691602081013590911690604001356118f3565b34801561072057600080fd5b506106416004803603604081101561073757600080fd5b506001600160a01b038135169060200135611bac565b34801561075957600080fd5b506105626004803603602081101561077057600080fd5b810190602081018135600160201b81111561078a57600080fd5b82018360208201111561079c57600080fd5b803590602001918460018302840111600160201b831117156107bd57600080fd5b509092509050611c0a565b3480156107d457600080fd5b50610562600480360360208110156107eb57600080fd5b5035611c62565b3480156107fe57600080fd5b50610466611d04565b34801561081357600080fd5b506105626004803603604081101561082a57600080fd5b5080359060200135611d13565b6105626004803603608081101561084d57600080fd5b8135916001600160a01b03602082013581169260408301359091169190810190608081016060820135600160201b81111561088757600080fd5b82018360208201111561089957600080fd5b803590602001918460018302840111600160201b831117156108ba57600080fd5b509092509050611da0565b3480156108d157600080fd5b50610428612179565b3480156108e657600080fd5b50610562600480360360608110156108fd57600080fd5b506001600160a01b03813581169160208101359091169060400135612189565b34801561092957600080fd5b506106416004803603602081101561094057600080fd5b50356001600160a01b03166121a4565b34801561095c57600080fd5b506106416004803603602081101561097357600080fd5b50356121b6565b34801561098657600080fd5b50610641612201565b34801561099b57600080fd5b50610641600480360360208110156109b257600080fd5b50356001600160a01b0316612207565b3480156109ce57600080fd5b50610562600480360360208110156109e557600080fd5b810190602081018135600160201b8111156109ff57600080fd5b820183602082011115610a1157600080fd5b803590602001918460018302840111600160201b83111715610a3257600080fd5b509092509050612212565b348015610a4957600080fd5b50610641612265565b348015610a5e57600080fd5b5061046660048036036020811015610a7557600080fd5b503561226b565b348015610a8857600080fd5b5061042860048036036020811015610a9f57600080fd5b50356001600160a01b0316612286565b348015610abb57600080fd5b50610562600480360360c0811015610ad257600080fd5b6001600160a01b03823581169260208101359260408201359092169160608201359160808101359181019060c0810160a0820135600160201b811115610b1757600080fd5b820183602082011115610b2957600080fd5b803590602001918460018302840111600160201b83111715610b4a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506122a6945050505050565b348015610b9757600080fd5b5061064160048036036020811015610bae57600080fd5b50356001600160a01b031661239d565b348015610bca57600080fd5b5061056261240c565b348015610bdf57600080fd5b5061064161249d565b348015610bf457600080fd5b5061056260048036036020811015610c0b57600080fd5b810190602081018135600160201b811115610c2557600080fd5b820183602082011115610c3757600080fd5b803590602001918460018302840111600160201b83111715610c5857600080fd5b5090925090506124a3565b348015610c6f57600080fd5b5061056260048036036040811015610c8657600080fd5b810190602081018135600160201b811115610ca057600080fd5b820183602082011115610cb257600080fd5b803590602001918460208302840111600160201b83111715610cd357600080fd5b919390929091602081019035600160201b811115610cf057600080fd5b820183602082011115610d0257600080fd5b803590602001918460208302840111600160201b83111715610d2357600080fd5b50909250905061255b565b348015610d3a57600080fd5b506105626126ec565b348015610d4f57600080fd5b5061056260048036036020811015610d6657600080fd5b50356126f4565b348015610d7957600080fd5b5061064160048036036040811015610d9057600080fd5b506001600160a01b0381358116916020013516612773565b348015610db457600080fd5b506104666127d7565b348015610dc957600080fd5b506104286127e7565b348015610dde57600080fd5b5061064161280d565b348015610df357600080fd5b50610641612831565b348015610e0857600080fd5b50610497612837565b348015610e1d57600080fd5b5061064160048036036020811015610e3457600080fd5b50356001600160a01b0316612a26565b348015610e5057600080fd5b5061042860048036036040811015610e6757600080fd5b50803590602001356001600160a01b0316612a90565b348015610e8957600080fd5b50610466612ab1565b348015610e9e57600080fd5b5061056260048036036020811015610eb557600080fd5b50356001600160a01b0316612ac0565b348015610ed157600080fd5b5061056260048036036040811015610ee857600080fd5b506001600160a01b0381351690602001351515612b9f565b348015610f0c57600080fd5b50610641612caa565b348015610f2157600080fd5b50610562612cb0565b348015610f3657600080fd5b5061064160048036036020811015610f4d57600080fd5b50356001600160a01b0316612da0565b348015610f6957600080fd5b50610641612e25565b348015610f7e57600080fd5b5061056260048036036080811015610f9557600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b811115610fcf57600080fd5b820183602082011115610fe157600080fd5b803590602001918460018302840111600160201b8311171561100257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612e49945050505050565b34801561104f57600080fd5b506105626004803603604081101561106657600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561109057600080fd5b8201836020820111156110a257600080fd5b803590602001918460018302840111600160201b831117156110c357600080fd5b509092509050612ffc565b3480156110da57600080fd5b50610562613117565b3480156110ef57600080fd5b506105626004803603602081101561110657600080fd5b50356001600160a01b03166131e6565b34801561112257600080fd5b506104976004803603602081101561113957600080fd5b50356132b5565b34801561114c57600080fd5b50610641613542565b34801561116157600080fd5b506106416004803603604081101561117857600080fd5b506001600160a01b0381358116916020013516613547565b34801561119c57600080fd5b506104666135f1565b3480156111b157600080fd5b50610428600480360360408110156111c857600080fd5b506001600160a01b0381358116916020013516613609565b3480156111ec57600080fd5b506105626004803603606081101561120357600080fd5b506001600160a01b038135169060208101359060400135613637565b34801561122b57600080fd5b506105626004803603602081101561124257600080fd5b50356001600160a01b03166139bd565b34801561125e57600080fd5b506105626004803603604081101561127557600080fd5b506001600160a01b038135169060200135613a0d565b34801561129757600080fd5b50610562600480360360408110156112ae57600080fd5b506001600160a01b038135169060200135613b67565b3480156112d057600080fd5b50610641600480360360408110156112e757600080fd5b506001600160a01b038135169060200135613c03565b6001600160e01b0319811660009081526033602052604090205460ff165b919050565b60a3818154811061132d57fe5b6000918252602090912001546001600160a01b0316905081565b60a4805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156113cd5780601f106113a2576101008083540402835291602001916113cd565b820191906000526020600020905b8154815290600101906020018083116113b057829003601f168201915b505050505081565b600081815260a760205260408120546001600160a01b03168061142f576040805162461bcd60e51b815260206004820152600d60248201526c1393d39157d054141493d59151609a1b604482015290519081900360640190fd5b92915050565b609a54600160a01b900460ff16611485576040805162461bcd60e51b815260206004820152600f60248201526e1313d0d2d7d11154149150d0551151608a1b604482015290519081900360640190fd5b806114908133612a90565b806114a057506114a08133613cac565b806114c85750600081815260a260205260409020546114c8906001600160a01b031633613609565b611516576040805162461bcd60e51b815260206004820152601a60248201527913d3931657d2d15657d3d5d3915497d3d497d054141493d5915160321b604482015290519081900360640190fd5b336001600160a01b0384161415611563576040805162461bcd60e51b815260206004820152600c60248201526b20a8282927ab22afa9a2a62360a11b604482015290519081900360640190fd5b600082815260a76020908152604080832080546001600160a01b0319166001600160a01b0388811691821790925560a2909352818420549151869492909116917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6115d36127d7565b6001600160a01b0316336001600160a01b031614806115fc575060a0546001600160a01b031633145b61164d576040805162461bcd60e51b815260206004820152601e60248201527f4f4e4c595f4c4f434b5f4f574e45525f4f525f42454e45464943494152590000604482015290519081900360640190fd5b6001600160a01b03811661169a576040805162461bcd60e51b815260206004820152600f60248201526e494e56414c49445f4144445245535360881b604482015290519081900360640190fd5b60a080546001600160a01b0319166001600160a01b0392909216919091179055565b609b546001600160a01b031681565b60a354606090611718576040805162461bcd60e51b81526020600482015260136024820152724e4f5f4f55545354414e44494e475f4b45595360681b604482015290519081900360640190fd5b60a354829084820290600090828401111561173b575060a3548181039250611740565b508082015b60608360405190808252806020026020018201604052801561176c578160200160208202803883390190505b5090506000835b838110156117d65760a3818154811061178857fe5b9060005260206000200160009054906101000a90046001600160a01b03168383815181106117b257fe5b6001600160a01b039092166020928302919091019091015260019182019101611773565b5090979650505050505050565b609d5481565b609c5481565b609f5481565b60a95481565b6118036127e7565b611842576040805162461bcd60e51b815260206004820181905260248201526000805160206154c6833981519152604482015290519081900360640190fd5b609a54600160a01b900460ff16611892576040805162461bcd60e51b815260206004820152600f60248201526e1313d0d2d7d11154149150d0551151608a1b604482015290519081900360640190fd5b609d805490829055604080518281526020810184905281517f8aa4fa52648a6d15edce8a179c792c86f3719d0cc3c572cf90f91948f0f2cb68929181900390910190a15050565b60006118e433613ccd565b90506118f03382613dd4565b50565b609a54600160a01b900460ff16611943576040805162461bcd60e51b815260206004820152600f60248201526e1313d0d2d7d11154149150d0551151608a1b604482015290519081900360640190fd5b8261194d81612286565b61198e576040805162461bcd60e51b815260206004820152600d60248201526c12d15657d393d517d590531251609a1b604482015290519081900360640190fd5b816119998133612a90565b806119a957506119a98133613cac565b806119d15750600081815260a260205260409020546119d1906001600160a01b031633613609565b611a1f576040805162461bcd60e51b815260206004820152601a60248201527913d3931657d2d15657d3d5d3915497d3d497d054141493d5915160321b604482015290519081900360640190fd5b61271060a95410611a70576040805162461bcd60e51b815260206004820152601660248201527512d15657d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b6001600160a01b038416611abd576040805162461bcd60e51b815260206004820152600f60248201526e494e56414c49445f4144445245535360881b604482015290519081900360640190fd5b6000611aca866000613c03565b6001600160a01b03808816600090815260a1602052604080822092891682528120825460018201549495509293909291611b079083908790613e59565b8254611b1d578354808455611b1d908a90613f7b565b428111611b41576001808501549084015583548355611b3c8989613f7b565b611b5e565b6001840154611b589042830363ffffffff61400316565b60018401555b42600185015560008455611b718861405d565b87896001600160a01b03168b6001600160a01b031660008051602061551483398151915260405160405180910390a450505050505050505050565b60008115611bfa576040805162461bcd60e51b815260206004820152601660248201527527a7262cafa7a722afa5a2acafa822a92fa7aba722a960511b604482015290519081900360640190fd5b611c0383612a26565b9392505050565b611c126127e7565b611c51576040805162461bcd60e51b815260206004820181905260248201526000805160206154c6833981519152604482015290519081900360640190fd5b611c5d60a68383615342565b505050565b336000908152609960205260409020548111611cba576040805162461bcd60e51b81526020600482015260126024820152711393d390d157d053149150511657d554d15160721b604482015290519081900360640190fd5b33600081815260996020908152604091829020849055815184815291517ff5d035b703f1ad8d403dd02e821d04257acafc5f6c5d70a3907bd8abf33a2e0f9281900390910190a250565b60a0546001600160a01b031681565b611d1b6127e7565b611d5a576040805162461bcd60e51b815260206004820181905260248201526000805160206154c6833981519152604482015290519081900360640190fd5b604080518381526020810183905281517fd6867bc538320e67d7bdc35860c27c08486eb490b4fd9b820fff18fb28381d3c929181900390910190a160ab9190915560aa55565b609a54600160a01b900460ff16611df0576040805162461bcd60e51b815260206004820152600f60248201526e1313d0d2d7d11154149150d0551151608a1b604482015290519081900360640190fd5b609f54609e5411611e38576040805162461bcd60e51b815260206004820152600d60248201526c1313d0d2d7d4d3d31117d3d555609a1b604482015290519081900360640190fd5b6001600160a01b038416611e85576040805162461bcd60e51b815260206004820152600f60248201526e494e56414c49445f4144445245535360881b604482015290519081900360640190fd5b6001600160a01b038416600090815260a1602052604090208054611eba57611eac81614098565b611eba858260000154613f7b565b42816001015410611ee657609c546001820154611edc9163ffffffff61400316565b6001820155611ef1565b609c54420160018201555b609d54609b5460408051630cb175e360e01b81526001600160a01b03898116600483015260248201859052825160009586959094921692630cb175e3926044808301939192829003018186803b158015611f4a57600080fd5b505afa158015611f5e573d6000803e3d6000fd5b505050506040513d6040811015611f7457600080fd5b508051602090910151909350915080831115611f9257506000611f96565b8290035b821561200957609b5460408051633652466360e01b8152600481018690526024810185905290516001600160a01b039092169163365246639160448082019260009290919082900301818387803b158015611ff057600080fd5b505af1158015612004573d6000803e3d6000fd5b505050505b609b546001600160a01b031663939d9f1f826120248a612286565b61202f576000612031565b895b6040518363ffffffff1660e01b815260040180838152602001826001600160a01b03166001600160a01b0316815260200192505050600060405180830381600087803b15801561208057600080fd5b505af1158015612094573d6000803e3d6000fd5b505085546040519092506001600160a01b038b169150600090600080516020615514833981519152908290a4609a546001600160a01b03161561211e578089101561211b576040805162461bcd60e51b8152602060048201526012602482015271494e53554646494349454e545f56414c554560701b604482015290519081900360640190fd5b50875b6000612129826140ad565b905061216d8989838a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061413b92505050565b50505050505050505050565b609a54600160a01b900460ff1681565b611c5d83838360405180602001604052806000815250612e49565b60996020526000908152604090205481565b6000609f5482106121fd576040805162461bcd60e51b815260206004820152600c60248201526b4f55545f4f465f52414e474560a01b604482015290519081900360640190fd5b5090565b61271081565b600061142f82613ccd565b61221a6127e7565b612259576040805162461bcd60e51b815260206004820181905260248201526000805160206154c6833981519152604482015290519081900360640190fd5b611c5d60a48383615342565b60aa5481565b60a2602052600090815260409020546001600160a01b031681565b6001600160a01b0316600090815260a16020526040902060010154421090565b600054610100900460ff16806122bf57506122bf6142f1565b806122cd575060005460ff16155b6123085760405162461bcd60e51b815260040180806020018281038252602e8152602001806154e6602e913960400191505060405180910390fd5b600054610100900460ff16158015612333576000805460ff1961ff0019909116610100171660011790555b61233c876142f7565b612345856131e6565b61234d6143e8565b612359878786866143fd565b61236282614493565b61236a6144bf565b6123726126ec565b6123826380ac58cd60e01b6144d1565b8015612394576000805461ff00191690555b50505050505050565b60006001600160a01b0382166123ec576040805162461bcd60e51b815260206004820152600f60248201526e494e56414c49445f4144445245535360881b604482015290519081900360640190fd5b6123f582612286565b612400576000612403565b60015b60ff1692915050565b6124146127e7565b612453576040805162461bcd60e51b815260206004820181905260248201526000805160206154c6833981519152604482015290519081900360640190fd5b6066546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3606680546001600160a01b0319169055565b609e5481565b6124ab6127e7565b6124ea576040805162461bcd60e51b815260206004820181905260248201526000805160206154c6833981519152604482015290519081900360640190fd5b6124f660a58383615342565b507f8868e22e84ebf32da89b2ebcb0ac642816304ea3863b257f240df9098719cb97828260405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a15050565b6125636127e7565b6125a2576040805162461bcd60e51b815260206004820181905260248201526000805160206154c6833981519152604482015290519081900360640190fd5b60005b838110156126e55760008585838181106125bb57fe5b905060200201356001600160a01b0316905060008484848181106125db57fe5b60200291909101359150506001600160a01b038216612633576040805162461bcd60e51b815260206004820152600f60248201526e494e56414c49445f4144445245535360881b604482015290519081900360640190fd5b6001600160a01b038216600090815260a16020526040902060018101548211612696576040805162461bcd60e51b815260206004820152601060248201526f414c52454144595f4f574e535f4b455960801b604482015290519081900360640190fd5b61269f81614098565b6126ad838260000154613f7b565b6001810182905580546040516001600160a01b03851690600090600080516020615514833981519152908290a45050506001016125a5565b5050505050565b6103e860aa55565b6126fc6127e7565b61273b576040805162461bcd60e51b815260206004820181905260248201526000805160206154c6833981519152604482015290519081900360640190fd5b6040805182815290517f0496ed1e61eb69727f9659a8e859288db4758ffb1f744d1c1424634f90a257f49181900360200190a160a955565b6001600160a01b039190911660009081526099602090815260409182902054825130606090811b82850152603482019290925293901b6bffffffffffffffffffffffff19166054840152815180840360480181526068909301909152815191012090565b6066546001600160a01b03165b90565b6066546000906001600160a01b03166127fe614555565b6001600160a01b031614905090565b7fd6342b4bfdf66164985c9f5fe235f643a035ee12f507d7bd0f8c89e07e790f6881565b60a35490565b60a5546060906002600019610100600184161502019091160461299457609b60009054906101000a90046001600160a01b03166001600160a01b031663cec410526040518163ffffffff1660e01b815260040160006040518083038186803b1580156128a257600080fd5b505afa1580156128b6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156128df57600080fd5b8101908080516040519392919084600160201b8211156128fe57600080fd5b90830190602082018581111561291357600080fd5b8251600160201b81118282018810171561292c57600080fd5b82525081516020918201929091019080838360005b83811015612959578181015183820152602001612941565b50505050905090810190601f1680156129865780820380516001836020036101000a031916815260200191505b5060405250505090506127e4565b60a5805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015612a1a5780601f106129ef57610100808354040283529160200191612a1a565b820191906000526020600020905b8154815290600101906020018083116129fd57829003601f168201915b505050505090506127e4565b600081612a3281612286565b612a73576040805162461bcd60e51b815260206004820152600d60248201526c12d15657d393d517d590531251609a1b604482015290519081900360640190fd5b50506001600160a01b0316600090815260a1602052604090205490565b600091825260a26020526040909120546001600160a01b0391821691161490565b609a546001600160a01b031681565b612ac86127e7565b612b07576040805162461bcd60e51b815260206004820181905260248201526000805160206154c6833981519152604482015290519081900360640190fd5b80612b1181612286565b612b52576040805162461bcd60e51b815260206004820152600d60248201526c12d15657d393d517d590531251609a1b604482015290519081900360640190fd5b6001600160a01b038216600090815260a160205260408082204260018201558054915190927f59f2fe866dd27a1c2d34115520888c3150365cbc931aab97fa88c4b9ab40b79591a2505050565b609a54600160a01b900460ff16612bef576040805162461bcd60e51b815260206004820152600f60248201526e1313d0d2d7d11154149150d0551151608a1b604482015290519081900360640190fd5b6001600160a01b038216331415612c3c576040805162461bcd60e51b815260206004820152600c60248201526b20a8282927ab22afa9a2a62360a11b604482015290519081900360640190fd5b33600081815260a8602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b60ab5481565b612cb86127e7565b612cf7576040805162461bcd60e51b815260206004820181905260248201526000805160206154c6833981519152604482015290519081900360640190fd5b609a54600160a01b900460ff1615612d46576040805162461bcd60e51b815260206004820152600d60248201526c111254d050931157d1925494d5609a1b604482015290519081900360640190fd5b6040805130318152905133917fa053f2a7eceda47dde76e5939c5adf7b771e665fc84c8ef6feffc290a1eb1feb919081900360200190a2609a54612d9d906001600160a01b031633612d988230613547565b614559565b33ff5b6001600160a01b038116600090815260a160205260408120600101548290612e05576040805162461bcd60e51b81526020600482015260136024820152724841535f4e455645525f4f574e45445f4b455960681b604482015290519081900360640190fd5b50506001600160a01b0316600090815260a1602052604090206001015490565b7f4d99da10ff5120f726d35edd8dbd417bbe55d90453b8432acd284e650ee2c6f081565b609a54600160a01b900460ff16612e99576040805162461bcd60e51b815260206004820152600f60248201526e1313d0d2d7d11154149150d0551151608a1b604482015290519081900360640190fd5b81612ea48133612a90565b80612eb45750612eb48133613cac565b80612edc5750600081815260a26020526040902054612edc906001600160a01b031633613609565b612f2a576040805162461bcd60e51b815260206004820152601a60248201527913d3931657d2d15657d3d5d3915497d3d497d054141493d5915160321b604482015290519081900360640190fd5b600083815260a260205260409020546001600160a01b0316612f4b81612286565b612f8c576040805162461bcd60e51b815260206004820152600d60248201526c12d15657d393d517d590531251609a1b604482015290519081900360640190fd5b612f978686866118f3565b612fa3868686866145a6565b612ff4576040805162461bcd60e51b815260206004820152601d60248201527f4e4f4e5f434f4d504c49414e545f4552433732315f5245434549564552000000604482015290519081900360640190fd5b505050505050565b6130068333612773565b82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250879250506001600160a01b038216905061305b613055856146d9565b8461472a565b6001600160a01b0316146130aa576040805162461bcd60e51b8152602060048201526011602482015270494e56414c49445f5349474e415455524560781b604482015290519081900360640190fd5b6001600160a01b038116600081815260996020908152604091829020805460010190819055825190815291517ff5d035b703f1ad8d403dd02e821d04257acafc5f6c5d70a3907bd8abf33a2e0f9281900390910190a2600061310b87613ccd565b90506123948782613dd4565b61311f6127e7565b61315e576040805162461bcd60e51b815260206004820181905260248201526000805160206154c6833981519152604482015290519081900360640190fd5b609a54600160a01b900460ff166131ae576040805162461bcd60e51b815260206004820152600f60248201526e1313d0d2d7d11154149150d0551151608a1b604482015290519081900360640190fd5b6040517f25a311358326fb18c62efc24bc28d3126acee8d2a67fd8b2145b757dc8bd1bc190600090a1609a805460ff60a01b19169055565b609a80546001600160a01b0319166001600160a01b038316908117909155158061327457506000816001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561324657600080fd5b505afa15801561325a573d6000803e3d6000fd5b505050506040513d602081101561327057600080fd5b5051115b6118f0576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22faa27a5a2a760991b604482015290519081900360640190fd5b600081815260a2602052604090205460609082906001600160a01b0316613311576040805162461bcd60e51b815260206004820152600b60248201526a4e4f5f535543485f4b455960a81b604482015290519081900360640190fd5b60a6546060906002600019610100600184161502019091160461346e57609b60009054906101000a90046001600160a01b03166001600160a01b031663a998e9fb6040518163ffffffff1660e01b815260040160006040518083038186803b15801561337c57600080fd5b505afa158015613390573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156133b957600080fd5b8101908080516040519392919084600160201b8211156133d857600080fd5b9083019060208201858111156133ed57600080fd5b8251600160201b81118282018810171561340657600080fd5b82525081516020918201929091019080838360005b8381101561343357818101518382015260200161341b565b50505050905090810190601f1680156134605780820380516001836020036101000a031916815260200191505b5060405250505090506134fc565b60a6805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156134f45780601f106134c9576101008083540402835291602001916134f4565b820191906000526020600020905b8154815290600101906020018083116134d757829003601f168201915b505050505090505b61353a61350830614818565b604051806040016040528060018152602001602f60f81b81525061352b87614994565b8492919063ffffffff614a5816565b949350505050565b600590565b60006001600160a01b03831661356857506001600160a01b0381163161142f565b826001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156135be57600080fd5b505afa1580156135d2573d6000803e3d6000fd5b505050506040513d60208110156135e857600080fd5b5051905061142f565b731820a4b7618bde71dce8cdc73aab6c95905fad2481565b6001600160a01b03918216600090815260a86020908152604080832093909416825291909152205460ff1690565b609a54600160a01b900460ff16613687576040805162461bcd60e51b815260206004820152600f60248201526e1313d0d2d7d11154149150d0551151608a1b604482015290519081900360640190fd5b816136928133612a90565b806136a257506136a28133613cac565b806136ca5750600081815260a260205260409020546136ca906001600160a01b031633613609565b613718576040805162461bcd60e51b815260206004820152601a60248201527913d3931657d2d15657d3d5d3915497d3d497d054141493d5915160321b604482015290519081900360640190fd5b61271060a95410613769576040805162461bcd60e51b815260206004820152601660248201527512d15657d514905394d1915494d7d11254d05093115160521b604482015290519081900360640190fd5b6001600160a01b0384166137b6576040805162461bcd60e51b815260206004820152600f60248201526e494e56414c49445f4144445245535360881b604482015290519081900360640190fd5b600083815260a260205260409020546001600160a01b03166137d781612286565b613818576040805162461bcd60e51b815260206004820152600d60248201526c12d15657d393d517d590531251609a1b604482015290519081900360640190fd5b6001600160a01b03808216600090815260a1602052604080822092881682528120805460018401549192909142900381613852878a613c03565b905060006138668a8363ffffffff61400316565b9050828110156138845789935061387f8b826000613e59565b6138c8565b61388e8884613c03565b42600189015560405181850395509092508b907f59f2fe866dd27a1c2d34115520888c3150365cbc931aab97fa88c4b9ab40b79590600090a25b8554613908576138d786614098565b6138e18c86613f7b565b60405185906001600160a01b038e1690600090600080516020615514833981519152908290a45b61391485856001613e59565b848c6001600160a01b0316896001600160a01b031660008051602061551483398151915260405160405180910390a461395e888d8d604051806020016040528060008152506145a6565b6139af576040805162461bcd60e51b815260206004820152601d60248201527f4e4f4e5f434f4d504c49414e545f4552433732315f5245434549564552000000604482015290519081900360640190fd5b505050505050505050505050565b6139c56127e7565b613a04576040805162461bcd60e51b815260206004820181905260248201526000805160206154c6833981519152604482015290519081900360640190fd5b6118f081614c0d565b613a156127d7565b6001600160a01b0316336001600160a01b03161480613a3e575060a0546001600160a01b031633145b613a8f576040805162461bcd60e51b815260206004820152601e60248201527f4f4e4c595f4c4f434b5f4f574e45525f4f525f42454e45464943494152590000604482015290519081900360640190fd5b6000613a9b8330613547565b90506000821580613aab57508183115b15613aff5760008211613af8576040805162461bcd60e51b815260206004820152601060248201526f4e4f545f454e4f5547485f46554e445360801b604482015290519081900360640190fd5b5080613b02565b50815b60a0546040805183815290516001600160a01b039283169287169133917f342e7ff505a8a0364cd0dc2ff195c315e43bce86b204846ecd36913e117b109e9181900360200190a460a054613b619085906001600160a01b031683614559565b50505050565b613b6f6127e7565b613bae576040805162461bcd60e51b815260206004820181905260248201526000805160206154c6833981519152604482015290519081900360640190fd5b81613bb881612286565b613bf9576040805162461bcd60e51b815260206004820152600d60248201526c12d15657d393d517d590531251609a1b604482015290519081900360640190fd5b611c5d8383613dd4565b600082613c0f81612286565b613c50576040805162461bcd60e51b815260206004820152600d60248201526c12d15657d393d517d590531251609a1b604482015290519081900360640190fd5b6001600160a01b038416600090815260a160205260408120908085613c7d57428360010154039150613c81565b8591505b612710613c9960a95484614cae90919063ffffffff16565b81613ca057fe5b04979650505050505050565b600091825260a76020526040909120546001600160a01b0391821691161490565b600081613cd981612286565b613d1a576040805162461bcd60e51b815260206004820152600d60248201526c12d15657d393d517d590531251609a1b604482015290519081900360640190fd5b6001600160a01b038316600090815260a1602052604090206001810154609c5460ab544290920391820110613d5357609d549350613d74565b609c54609d54613d69908363ffffffff614cae16565b81613d7057fe5b0493505b60ab541580613d885750609c5460ab548201105b15613dcc576000612710613da960aa54609d54614cae90919063ffffffff16565b81613db057fe5b04905080851115613dc5578085039450613dca565b600094505b505b505050919050565b6001600160a01b038216600081815260a1602090815260409182902080548351868152935191943394909391927f0a7068a9989857441c039a14a42b67ed71dd1fcfe5a9b17cc87b252e47bce528929181900390910190a44260018201558115613e4f57609a54613e4f906001600160a01b03168484614559565b611c5d8383614d07565b600083815260a260205260409020546001600160a01b031680613eb6576040805162461bcd60e51b815260206004820152601060248201526f4e4f4e5f4558495354454e545f4b455960801b604482015290519081900360640190fd5b6001600160a01b038116600090815260a16020526040812060018101549091613ede84612286565b90508415613f21578015613f0657613efc828763ffffffff61400316565b6001840155613f1c565b613f16428763ffffffff61400316565b60018401555b613f37565b613f31828763ffffffff614e3716565b60018401555b604080518781528615156020820152815189927fa2ede7ad01668310f921fcf6084901d08af350838c2744a013153e4968a7559d928290030190a250505050505050565b600081815260a260205260409020546001600160a01b03838116911614613fff5760a38054600181019091557f60859188cffe297f44dde29f2d2865634621f26215049caeb304ccba566a8b170180546001600160a01b0384166001600160a01b03199182168117909255600083815260a260205260409020805490911690911790555b5050565b600082820183811015611c03576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600081815260a760205260409020546001600160a01b0316156118f057600090815260a76020526040902080546001600160a01b0319169055565b80546118f057609f8054600101908190559055565b6000811561131b57609a546001600160a01b0316614114578134101561410d576040805162461bcd60e51b815260206004820152601060248201526f4e4f545f454e4f5547485f46554e445360801b604482015290519081900360640190fd5b503461131b565b609a546001600160a01b03166141328133308663ffffffff614e7916565b8291505061131b565b60a0546040805163555ddc6560e11b81526001600160a01b0390921660048301527f4d99da10ff5120f726d35edd8dbd417bbe55d90453b8432acd284e650ee2c6f0602483015251600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b1580156141c257600080fd5b505afa1580156141d6573d6000803e3d6000fd5b505050506040513d60208110156141ec57600080fd5b505190506001600160a01b038116156126e557604051638d0f092560e01b815233600482018181526001600160a01b03888116602485015287811660448501526064840187905260a060848501908152865160a4860152865191861694638d0f092594938b938b938b938b939260c490910190602085019080838360005b8381101561428257818101518382015260200161426a565b50505050905090810190601f1680156142af5780820380516001836020036101000a031916815260200191505b509650505050505050600060405180830381600087803b1580156142d257600080fd5b505af11580156142e6573d6000803e3d6000fd5b505050505050505050565b303b1590565b600054610100900460ff168061431057506143106142f1565b8061431e575060005460ff16155b6143595760405162461bcd60e51b815260040180806020018281038252602e8152602001806154e6602e913960400191505060405180910390fd5b600054610100900460ff16158015614384576000805460ff1961ff0019909116610100171660011790555b606680546001600160a01b0319166001600160a01b0384811691909117918290556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a38015613fff576000805461ff00191690555050565b609a805460ff60a01b1916600160a01b179055565b63bbf81e00831115614456576040805162461bcd60e51b815260206004820152601860248201527f4d41585f45585049524154494f4e5f3130305f59454152530000000000000000604482015290519081900360640190fd5b609b8054336001600160a01b03199182161790915560a080549091166001600160a01b039590951694909417909355609c91909155609d55609e55565b61449b614ed3565b80516144ae9060a49060208401906153bc565b506118f0635b5e139f60e01b6144d1565b6144cf63780e9d6360e01b6144d1565b565b6001600160e01b03198082161415614530576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152603360205260409020805460ff19166001179055565b3390565b8015611c5d576001600160a01b03831661458b576145866001600160a01b0383168263ffffffff614f8416565b611c5d565b82613b616001600160a01b038216848463ffffffff61506a16565b60006145ba846001600160a01b03166150bc565b6145c65750600161353a565b604051630a85bd0160e11b815233600482018181526001600160a01b03888116602485015260448401879052608060648501908152865160848601528651600095928a169463150b7a029490938c938b938b939260a4019060208501908083838e5b83811015614640578181015183820152602001614628565b50505050905090810190601f16801561466d5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561468f57600080fd5b505af11580156146a3573d6000803e3d6000fd5b505050506040513d60208110156146b957600080fd5b50516001600160e01b031916630a85bd0160e11b14915050949350505050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b6000815160411461473d5750600061142f565b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115614783576000935050505061142f565b8060ff16601b1415801561479b57508060ff16601c14155b156147ac576000935050505061142f565b6040805160008152602080820180845289905260ff8416828401526060820186905260808201859052915160019260a0808401939192601f1981019281900390910190855afa158015614803573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b604080518082018252601081526f181899199a1a9b1b9c1cb0b131b232b360811b60208201528151602a80825260608281019094526001600160a01b03851692918491602082018180388339019050509050600360fc1b8160008151811061487c57fe5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106148a557fe5b60200101906001600160f81b031916908160001a90535060005b601481101561498b578260048583600c01602081106148da57fe5b1a60f81b6001600160f81b031916901c60f81c60ff16815181106148fa57fe5b602001015160f81c60f81b82826002026002018151811061491757fe5b60200101906001600160f81b031916908160001a905350828482600c016020811061493e57fe5b825191901a600f1690811061494f57fe5b602001015160f81c60f81b82826002026003018151811061496c57fe5b60200101906001600160f81b031916908160001a9053506001016148bf565b50949350505050565b606081806149bb5750506040805180820190915260018152600360fc1b602082015261131b565b8260005b81156149d357600101600a820491506149bf565b6060816040519080825280601f01601f191660200182016040528015614a00576020820181803883390190505b50905060001982015b8415614a4e57600a850660300160f81b82828060019003935081518110614a2c57fe5b60200101906001600160f81b031916908160001a905350600a85049450614a09565b5095945050505050565b606080859050606085905060608590506060859050606081518351855187510101016040519080825280601f01601f191660200182016040528015614aa4576020820181803883390190505b509050806000805b8751811015614afd57878181518110614ac157fe5b602001015160f81c60f81b838380600101945081518110614ade57fe5b60200101906001600160f81b031916908160001a905350600101614aac565b5060005b8651811015614b5257868181518110614b1657fe5b602001015160f81c60f81b838380600101945081518110614b3357fe5b60200101906001600160f81b031916908160001a905350600101614b01565b5060005b8551811015614ba757858181518110614b6b57fe5b602001015160f81c60f81b838380600101945081518110614b8857fe5b60200101906001600160f81b031916908160001a905350600101614b56565b5060005b8451811015614bfc57848181518110614bc057fe5b602001015160f81c60f81b838380600101945081518110614bdd57fe5b60200101906001600160f81b031916908160001a905350600101614bab565b50909b9a5050505050505050505050565b6001600160a01b038116614c525760405162461bcd60e51b81526004018080602001828103825260268152602001806154456026913960400191505060405180910390fd5b6066546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3606680546001600160a01b0319166001600160a01b0392909216919091179055565b600082614cbd5750600061142f565b82820282848281614cca57fe5b0414611c035760405162461bcd60e51b81526004018080602001828103825260218152602001806154a56021913960400191505060405180910390fd5b60a0546040805163555ddc6560e11b81526001600160a01b0390921660048301527fd6342b4bfdf66164985c9f5fe235f643a035ee12f507d7bd0f8c89e07e790f68602483015251600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b158015614d8e57600080fd5b505afa158015614da2573d6000803e3d6000fd5b505050506040513d6020811015614db857600080fd5b505190506001600160a01b03811615611c5d576040805163c9877d7b60e01b81523360048201526001600160a01b0385811660248301526044820185905291519183169163c9877d7b9160648082019260009290919082900301818387803b158015614e2357600080fd5b505af1158015612394573d6000803e3d6000fd5b6000611c0383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506150f3565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052613b6190859061518a565b600054610100900460ff1680614eec5750614eec6142f1565b80614efa575060005460ff16155b614f355760405162461bcd60e51b815260040180806020018281038252602e8152602001806154e6602e913960400191505060405180910390fd5b600054610100900460ff16158015614f60576000805460ff1961ff0019909116610100171660011790555b614f706301ffc9a760e01b6144d1565b80156118f0576000805461ff001916905550565b3031811115614fda576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114615025576040519150601f19603f3d011682016040523d82523d6000602084013e61502a565b606091505b5050905080611c5d5760405162461bcd60e51b815260040180806020018281038252603a81526020018061546b603a913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611c5d90849061518a565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470811580159061353a5750141592915050565b600081848411156151825760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561514757818101518382015260200161512f565b50505050905090810190601f1680156151745780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b61519c826001600160a01b03166150bc565b6151ed576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b6020831061522b5780518252601f19909201916020918201910161520c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461528d576040519150601f19603f3d011682016040523d82523d6000602084013e615292565b606091505b5091509150816152e9576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115613b615780806020019051602081101561530557600080fd5b5051613b615760405162461bcd60e51b815260040180806020018281038252602a815260200180615534602a913960400191505060405180910390fd5b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106153835782800160ff198235161785556153b0565b828001600101855582156153b0579182015b828111156153b0578235825591602001919060010190615395565b506121fd92915061542a565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106153fd57805160ff19168380011785556153b0565b828001600101855582156153b0579182015b828111156153b057825182559160200191906001019061540f565b6127e491905b808211156121fd576000815560010161543056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a7231582013b44e6afc5a7bb538a4b112863a2d1fc743d60c03c249977c5feaec0cbedecf64736f6c634300050c0032
Deployed ByteCode Sourcemap
109230:1104:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29198:133;;8:9:-1;5:2;;;30:1;27;20:12;5:2;29198:133:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;29198:133:0;-1:-1:-1;;;;;;29198:133:0;;:::i;:::-;;;;;;;;;;;;;;;;;;58576:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;58576:23:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;58576:23:0;;:::i;:::-;;;;-1:-1:-1;;;;;58576:23:0;;;;;;;;;;;;;;81279:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;81279:18:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;81279:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66123:240;;8:9:-1;5:2;;;30:1;27;20:12;5:2;66123:240:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;66123:240:0;;:::i;65176:311::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;65176:311:0;;;;;;;;:::i;:::-;;57136:199;;8:9:-1;5:2;;;30:1;27;20:12;5:2;57136:199:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;57136:199:0;-1:-1:-1;;;;;57136:199:0;;:::i;53637:29::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;53637:29:0;;;:::i;60852:879::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;60852:879:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;60852:879:0;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;60852:879:0;;;;;;;;;;;;;;;;;54012:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;54012:20:0;;;:::i;:::-;;;;;;;;;;;;;;;;53854:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;53854:30:0;;;:::i;54200:23::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;54200:23:0;;;:::i;100045:34::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;100045:34:0;;;:::i;56779:213::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;56779:213:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;56779:213:0;;:::i;93579:152::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;93579:152:0;;;:::i;102242:1951::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;102242:1951:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;102242:1951:0;;;;;;;;;;;;;;;;;:::i;68927:210::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;68927:210:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;68927:210:0;;;;;;;;:::i;82816:134::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;82816:134:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;82816:134:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;82816:134:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;82816:134:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;82816:134:0;;-1:-1:-1;82816:134:0;-1:-1:-1;82816:134:0;:::i;92041:290::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;92041:290:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;92041:290:0;;:::i;54287:26::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;54287:26:0;;;:::i;94362:337::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;94362:337:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;94362:337:0;;;;;;;:::i;84866:2265::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;84866:2265:0;;;-1:-1:-1;;;;;84866:2265:0;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;84866:2265:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;84866:2265:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;84866:2265:0;;-1:-1:-1;84866:2265:0;-1:-1:-1;84866:2265:0;:::i;48296:19::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;48296:19:0;;;:::i;104546:161::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;104546:161:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;104546:161:0;;;;;;;;;;;;;;;;;:::i;91293:47::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;91293:47:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;91293:47:0;-1:-1:-1;;;;;91293:47:0;;:::i;68323:166::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;68323:166:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;68323:166:0;;:::i;54390:45::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;54390:45:0;;;:::i;94985:163::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;94985:163:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;94985:163:0;-1:-1:-1;;;;;94985:163:0;;:::i;82043:117::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;82043:117:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;82043:117:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;82043:117:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;82043:117:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;82043:117:0;;-1:-1:-1;82043:117:0;-1:-1:-1;82043:117:0;:::i;92762:36::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;92762:36:0;;;:::i;58398:40::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;58398:40:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;58398:40:0;;:::i;60160:171::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;60160:171:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;60160:171:0;-1:-1:-1;;;;;60160:171:0;;:::i;109601:730::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;109601:730:0;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;109601:730:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;109601:730:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;109601:730:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;109601:730:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;109601:730:0;;-1:-1:-1;109601:730:0;;-1:-1:-1;;;;;109601:730:0:i;59895:197::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;59895:197:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;59895:197:0;-1:-1:-1;;;;;59895:197:0;;:::i;26491:140::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26491:140:0;;;:::i;54106:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;54106:27:0;;;:::i;82242:167::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;82242:167:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;82242:167:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;82242:167:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;82242:167:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;82242:167:0;;-1:-1:-1;82242:167:0;-1:-1:-1;82242:167:0;:::i;77751:782::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;77751:782:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;77751:782:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;77751:782:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;77751:782:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;77751:782:0;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;77751:782:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;77751:782:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;77751:782:0;;-1:-1:-1;77751:782:0;-1:-1:-1;77751:782:0;:::i;93069:99::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;93069:99:0;;;:::i;105723:229::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;105723:229:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;105723:229:0;;:::i;95261:456::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;95261:456:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;95261:456:0;;;;;;;;;;:::i;25678:79::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25678:79:0;;;:::i;26044:94::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26044:94:0;;;:::i;76163:113::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;76163:113:0;;;:::i;62475:104::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;62475:104:0;;;:::i;82514:212::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;82514:212:0;;;:::i;60448:166::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;60448:166:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;60448:166:0;-1:-1:-1;;;;;60448:166:0;;:::i;61809:148::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;61809:148:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;61809:148:0;;;;;;-1:-1:-1;;;;;61809:148:0;;:::i;45861:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;45861:27:0;;;:::i;59466:266::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;59466:266:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;59466:266:0;-1:-1:-1;;;;;59466:266:0;;:::i;65775:268::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;65775:268:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;65775:268:0;;;;;;;;;;:::i;92805:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;92805:27:0;;;:::i;48972:528::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;48972:528:0;;;:::i;62115:200::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;62115:200:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;62115:200:0;-1:-1:-1;;;;;62115:200:0;;:::i;75996:111::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;75996:111:0;;;:::i;105279:369::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;105279:369:0;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;105279:369:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;105279:369:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;105279:369:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;105279:369:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;105279:369:0;;-1:-1:-1;105279:369:0;;-1:-1:-1;;;;;105279:369:0:i;93976:314::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;93976:314:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;93976:314:0;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;93976:314:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;93976:314:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;93976:314:0;;-1:-1:-1;93976:314:0;-1:-1:-1;93976:314:0;:::i;48710:121::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;48710:121:0;;;:::i;45895:228::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;45895:228:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;45895:228:0;-1:-1:-1;;;;;45895:228:0;;:::i;83291:400::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;83291:400:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;83291:400:0;;:::i;55344:89::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;55344:89:0;;;:::i;46199:266::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;46199:266:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;46199:266:0;;;;;;;;;;:::i;75839:103::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;75839:103:0;;;:::i;66680:173::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;66680:173:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;66680:173:0;;;;;;;;;;:::i;100387:1849::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;100387:1849:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;100387:1849:0;;;;;;;;;;;;;:::i;26786:109::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26786:109:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;26786:109:0;-1:-1:-1;;;;;26786:109:0;;:::i;56077:590::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;56077:590:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;56077:590:0;;;;;;;;:::i;93306:160::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;93306:160:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;93306:160:0;;;;;;;;:::i;106217:591::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;106217:591:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;106217:591:0;;;;;;;;:::i;29198:133::-;-1:-1:-1;;;;;;29290:33:0;;29266:4;29290:33;;;:20;:33;;;;;;;;29198:133;;;;:::o;58576:23::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;58576:23:0;;-1:-1:-1;58576:23:0;:::o;81279:18::-;;;;;;;;;;;;;;;-1:-1:-1;;81279:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;66123:240::-;66197:7;66244:18;;;:8;:18;;;;;;-1:-1:-1;;;;;66244:18:0;66277:31;66269:57;;;;;-1:-1:-1;;;66269:57:0;;;;;;;;;;;;-1:-1:-1;;;66269:57:0;;;;;;;;;;;;;;;66340:17;66123:240;-1:-1:-1;;66123:240:0:o;65176:311::-;48569:7;;-1:-1:-1;;;48569:7:0;;;;48561:35;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;;;;65314:8;64789:32;64800:8;64810:10;64789;:32::i;:::-;:78;;;;64834:33;64846:8;64856:10;64834:11;:33::i;:::-;64789:138;;;-1:-1:-1;64897:17:0;;;;:7;:17;;;;;;64880:47;;-1:-1:-1;;;;;64897:17:0;64916:10;64880:16;:47::i;:::-;64773:192;;;;;-1:-1:-1;;;64773:192:0;;;;;;;;;;;;-1:-1:-1;;;64773:192:0;;;;;;;;;;;;;;;65342:10;-1:-1:-1;;;;;65342:23:0;;;;65334:48;;;;;-1:-1:-1;;;65334:48:0;;;;;;;;;;;;-1:-1:-1;;;65334:48:0;;;;;;;;;;;;;;;65391:18;;;;:8;:18;;;;;;;;:30;;-1:-1:-1;;;;;;65391:30:0;-1:-1:-1;;;;;65391:30:0;;;;;;;;;65442:7;:17;;;;;;;65433:48;;65391:18;;65442:17;;;;;65433:48;;;48603:1;65176:311;;:::o;57136:199::-;54677:7;:5;:7::i;:::-;-1:-1:-1;;;;;54663:21:0;:10;-1:-1:-1;;;;;54663:21:0;;:50;;;-1:-1:-1;54702:11:0;;-1:-1:-1;;;;;54702:11:0;54688:10;:25;54663:50;54647:114;;;;;-1:-1:-1;;;54647:114:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;57250:26:0;;57242:54;;;;;-1:-1:-1;;;57242:54:0;;;;;;;;;;;;-1:-1:-1;;;57242:54:0;;;;;;;;;;;;;;;57303:11;:26;;-1:-1:-1;;;;;;57303:26:0;-1:-1:-1;;;;;57303:26:0;;;;;;;;;;57136:199::o;53637:29::-;;;-1:-1:-1;;;;;53637:29:0;;:::o;60852:879::-;60977:6;:13;60941:16;;60969:49;;;;;-1:-1:-1;;;60969:49:0;;;;;;;;;;;;-1:-1:-1;;;60969:49:0;;;;;;;;;;;;;;;61156:6;:13;61041:9;;61076:16;;;;61025:13;;61131:22;;;:38;61127:202;;;-1:-1:-1;61197:6:0;:13;61230:27;;;;-1:-1:-1;61127:202:0;;;-1:-1:-1;61298:22:0;;;61127:202;61415:29;61461:8;61447:23;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;61447:23:0;-1:-1:-1;61415:55:0;-1:-1:-1;61477:14:0;61588:11;61574:124;61605:14;61601:1;:18;61574:124;;;61661:6;61668:1;61661:9;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;61661:9:0;61635:12;61648:9;61635:23;;;;;;;;-1:-1:-1;;;;;61635:35:0;;;:23;;;;;;;;;;;:35;61679:11;;;;;61621:3;61574:124;;;-1:-1:-1;61713:12:0;;60852:879;-1:-1:-1;;;;;;;60852:879:0:o;54012:20::-;;;;:::o;53854:30::-;;;;:::o;54200:23::-;;;;:::o;100045:34::-;;;;:::o;56779:213::-;25890:9;:7;:9::i;:::-;25882:54;;;;;-1:-1:-1;;;25882:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25882:54:0;;;;;;;;;;;;;;;48569:7;;-1:-1:-1;;;48569:7:0;;;;48561:35;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;;;;56904:8;;;56919:20;;;;56951:35;;;;;;;;;;;;;;;;;;;;;;;;;48603:1;56779:213;:::o;93579:152::-;93630:11;93644:36;93669:10;93644:24;:36::i;:::-;93630:50;;93689:36;93706:10;93718:6;93689:16;:36::i;:::-;93579:152;:::o;102242:1951::-;48569:7;;-1:-1:-1;;;48569:7:0;;;;48561:35;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;;;;102380:5;58952:22;58967:6;58952:14;:22::i;:::-;58936:62;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;;;;102415:8;64789:32;64800:8;64810:10;64789;:32::i;:::-;:78;;;;64834:33;64846:8;64856:10;64834:11;:33::i;:::-;64789:138;;;-1:-1:-1;64897:17:0;;;;:7;:17;;;;;;64880:47;;-1:-1:-1;;;;;64897:17:0;64916:10;64880:16;:47::i;:::-;64773:192;;;;;-1:-1:-1;;;64773:192:0;;;;;;;;;;;;-1:-1:-1;;;64773:192:0;;;;;;;;;;;;;;;54430:5;102443:22;;:41;102435:76;;;;;-1:-1:-1;;;102435:76:0;;;;;;;;;;;;-1:-1:-1;;;102435:76:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;102526:24:0;;102518:52;;;;;-1:-1:-1;;;102518:52:0;;;;;;;;;;;;-1:-1:-1;;;102518:52:0;;;;;;;;;;;;;;;102577:8;102588:24;102603:5;102610:1;102588:14;:24::i;:::-;-1:-1:-1;;;;;102643:17:0;;;102621:19;102643:17;;;:10;:17;;;;;;102687:22;;;;;;;102726:15;;102776:25;;;;102577:35;;-1:-1:-1;102643:17:0;;102687:22;;102726:15;102874:28;;102726:15;;102577:35;;102874:12;:28::i;:::-;102915:13;;102911:120;;102960:15;;102944:31;;;102984:39;;102997:10;;102984:12;:39::i;:::-;103065:15;103043:18;:37;103039:764;;103346:27;;;;;103318:25;;;:55;103398:15;;103382:31;;103422:34;103435:10;103447:8;103422:12;:34::i;:::-;103039:764;;;103716:37;;;;:79;;103779:15;103758:36;;103716:79;:41;:79;:::i;:::-;103688:25;;;:107;103039:764;103901:15;103871:27;;;:45;104015:1;103997:19;;104062:24;104077:8;104062:14;:24::i;:::-;104172:8;104153:10;-1:-1:-1;;;;;104122:65:0;104139:5;-1:-1:-1;;;;;104122:65:0;-1:-1:-1;;;;;;;;;;;104122:65:0;;;;;;;;;64972:1;;;;;59005;48603;102242:1951;;;:::o;68927:210::-;69031:7;69058:11;;69050:46;;;;;-1:-1:-1;;;69050:46:0;;;;;;;;;;;;-1:-1:-1;;;69050:46:0;;;;;;;;;;;;;;;69110:21;69124:6;69110:13;:21::i;:::-;69103:28;68927:210;-1:-1:-1;;;68927:210:0:o;82816:134::-;25890:9;:7;:9::i;:::-;25882:54;;;;;-1:-1:-1;;;25882:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25882:54:0;;;;;;;;;;;;;;;82916:28;:12;82931:13;;82916:28;:::i;:::-;;82816:134;;:::o;92041:290::-;92178:10;92162:27;;;;:15;:27;;;;;;92140:49;;92132:80;;;;;-1:-1:-1;;;92132:80:0;;;;;;;;;;;;-1:-1:-1;;;92132:80:0;;;;;;;;;;;;;;;92235:10;92219:27;;;;:15;:27;;;;;;;;;:49;;;92280:45;;;;;;;;;;;;;;;;;92041:290;:::o;54287:26::-;;;-1:-1:-1;;;;;54287:26:0;;:::o;94362:337::-;25890:9;:7;:9::i;:::-;25882:54;;;;;-1:-1:-1;;;25882:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25882:54:0;;;;;;;;;;;;;;;94505:86;;;;;;;;;;;;;;;;;;;;;;;;;94600:15;:34;;;;94641:24;:52;94362:337::o;84866:2265::-;48569:7;;-1:-1:-1;;;48569:7:0;;;;48561:35;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;;;;54554:11;;54536:15;;:29;54528:55;;;;;-1:-1:-1;;;54528:55:0;;;;;;;;;;;;-1:-1:-1;;;54528:55:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;85054:24:0;;85046:52;;;;;-1:-1:-1;;;85046:52:0;;;;;;;;;;;;-1:-1:-1;;;85046:52:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;85150:22:0;;85130:17;85150:22;;;:10;:22;;;;;85185:13;;85181:186;;85287:24;85305:5;85287:17;:24::i;:::-;85320:39;85333:10;85345:5;:13;;;85320:12;:39::i;:::-;85408:15;85379:5;:25;;;:44;85375:427;;85555:18;;85525:25;;;;:49;;;:29;:49;:::i;:::-;85497:25;;;:77;85375:427;;;85776:18;;85758:15;:36;85730:25;;;:64;85375:427;85950:8;;85986:14;;:72;;;-1:-1:-1;;;85986:72:0;;-1:-1:-1;;;;;85986:72:0;;;;;;;;;;;;;;;85888:13;;;;85950:8;;85986:14;;;:42;;:72;;;;;;;;;;;;:14;:72;;;5:2:-1;;;;30:1;27;20:12;5:2;85986:72:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;85986:72:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;85986:72:0;;;;;;;;;-1:-1:-1;85986:72:0;-1:-1:-1;86071:27:0;;;86067:237;;;-1:-1:-1;86128:1:0;86067:237;;;86268:28;;;86067:237;86316:12;;86312:90;;86339:14;;:55;;;-1:-1:-1;;;86339:55:0;;;;;;;;;;;;;;;;-1:-1:-1;;;;;86339:14:0;;;;:37;;:55;;;;;:14;;:55;;;;;;;;:14;;:55;;;5:2:-1;;;;30:1;27;20:12;5:2;86339:55:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;86339:55:0;;;;86312:90;86410:14;;-1:-1:-1;;;;;86410:14:0;:32;86443:16;86461:25;86476:9;86461:14;:25::i;:::-;:50;;86509:1;86461:50;;;86489:9;86461:50;86410:102;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;86410:102:0;-1:-1:-1;;;;;86410:102:0;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;86410:102:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;86626:13:0;;86548:98;;86626:13;;-1:-1:-1;;;;;;86548:98:0;;;-1:-1:-1;86626:13:0;;-1:-1:-1;;;;;;;;;;;86548:98:0;86626:13;;86548:98;86744:12;;-1:-1:-1;;;;;86744:12:0;:26;86741:139;;86799:16;86789:6;:26;;86781:57;;;;;-1:-1:-1;;;86781:57:0;;;;;;;;;;;;-1:-1:-1;;;86781:57:0;;;;;;;;;;;;;;;-1:-1:-1;86866:6:0;86741:139;86956:14;86973:32;86988:16;86973:14;:32::i;:::-;86956:49;;87074:51;87085:10;87097:9;87108;87119:5;;87074:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;87074:10:0;;-1:-1:-1;;;87074:51:0:i;:::-;54590:1;;;;;84866:2265;;;;;:::o;48296:19::-;;;-1:-1:-1;;;48296:19:0;;;;;:::o;104546:161::-;104659:42;104676:5;104683:3;104688:8;104659:42;;;;;;;;;;;;:16;:42::i;91293:47::-;;;;;;;;;;;;;:::o;68323:166::-;68399:7;68435:11;;68426:6;:20;68418:45;;;;;-1:-1:-1;;;68418:45:0;;;;;;;;;;;;-1:-1:-1;;;68418:45:0;;;;;;;;;;;;;;;-1:-1:-1;68477:6:0;68323:166::o;54390:45::-;54430:5;54390:45;:::o;94985:163::-;95080:11;95110:32;95135:6;95110:24;:32::i;82043:117::-;25890:9;:7;:9::i;:::-;25882:54;;;;;-1:-1:-1;;;25882:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25882:54:0;;;;;;;;;;;;;;;82138:16;:4;82145:9;;82138:16;:::i;92762:36::-;;;;:::o;58398:40::-;;;;;;;;;;;;-1:-1:-1;;;;;58398:40:0;;:::o;60160:171::-;-1:-1:-1;;;;;60269:18:0;60246:4;60269:18;;;:10;:18;;;;;:38;;;60310:15;-1:-1:-1;;60160:171:0:o;109601:730::-;22448:12;;;;;;;;:31;;;22464:15;:13;:15::i;:::-;22448:47;;;-1:-1:-1;22484:11:0;;;;22483:12;22448:47;22440:106;;;;-1:-1:-1;;;22440:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22555:19;22578:12;;;;;;22577:13;22597:83;;;;22626:12;:19;;-1:-1:-1;;;;22626:19:0;;;;;22654:18;22641:4;22654:18;;;22597:83;109821:26;109840:6;109821:18;:26::i;:::-;109854:36;109876:13;109854:21;:36::i;:::-;109897:35;:33;:35::i;:::-;109939:82;109964:6;109972:19;109993:9;110004:16;109939:24;:82::i;:::-;110028:39;110057:9;110028:28;:39::i;:::-;110074:34;:32;:34::i;:::-;110115:25;:23;:25::i;:::-;110295:30;-1:-1:-1;;;110295:18:0;:30::i;:::-;22702:14;22698:57;;;22742:5;22727:20;;-1:-1:-1;;22727:20:0;;;22698:57;109601:730;;;;;;;:::o;59895:197::-;59978:4;-1:-1:-1;;;;;60002:20:0;;59994:48;;;;;-1:-1:-1;;;59994:48:0;;;;;;;;;;;;-1:-1:-1;;;59994:48:0;;;;;;;;;;;;;;;60056:22;60071:6;60056:14;:22::i;:::-;:30;;60085:1;60056:30;;;60081:1;60056:30;60049:37;;;59895:197;-1:-1:-1;;59895:197:0:o;26491:140::-;25890:9;:7;:9::i;:::-;25882:54;;;;;-1:-1:-1;;;25882:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25882:54:0;;;;;;;;;;;;;;;26574:6;;26553:40;;26590:1;;-1:-1:-1;;;;;26574:6:0;;26553:40;;26590:1;;26553:40;26604:6;:19;;-1:-1:-1;;;;;;26604:19:0;;;26491:140::o;54106:27::-;;;;:::o;82242:167::-;25890:9;:7;:9::i;:::-;25882:54;;;;;-1:-1:-1;;;25882:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25882:54:0;;;;;;;;;;;;;;;82341:24;:10;82354:11;;82341:24;:::i;:::-;;82377:26;82391:11;;82377:26;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;82377:26:0;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;82377:26:0;;;;-1:-1:-1;82377:26:0;;-1:-1:-1;;;;82377:26:0;82242:167;;:::o;77751:782::-;25890:9;:7;:9::i;:::-;25882:54;;;;;-1:-1:-1;;;25882:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25882:54:0;;;;;;;;;;;;;;;77894:6;77890:638;77906:22;;;77890:638;;;77944:17;77964:11;;77976:1;77964:14;;;;;;;;;;;;;-1:-1:-1;;;;;77964:14:0;77944:34;;77987:24;78014:21;;78036:1;78014:24;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;78057:23:0;;78049:51;;;;;-1:-1:-1;;;78049:51:0;;;;;;;;;;;;-1:-1:-1;;;78049:51:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;78131:21:0;;78111:17;78131:21;;;:10;:21;;;;;78191:25;;;;78169:47;;78161:76;;;;;-1:-1:-1;;;78161:76:0;;;;;;;;;;;;-1:-1:-1;;;78161:76:0;;;;;;;;;;;;;;;78248:24;78266:5;78248:17;:24::i;:::-;78281:38;78294:9;78305:5;:13;;;78281:12;:38::i;:::-;78328:25;;;:47;;;78498:13;;78415:105;;-1:-1:-1;;;;;78415:105:0;;;78498:13;;-1:-1:-1;;;;;;;;;;;78415:105:0;78498:13;;78415:105;-1:-1:-1;;;77930:3:0;;77890:638;;;;77751:782;;;;:::o;93069:99::-;93158:4;93131:24;:31;93069:99::o;105723:229::-;25890:9;:7;:9::i;:::-;25882:54;;;;;-1:-1:-1;;;25882:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25882:54:0;;;;;;;;;;;;;;;105834:57;;;;;;;;;;;;;;;;;105898:22;:48;105723:229::o;95261:456::-;-1:-1:-1;;;;;95584:26:0;;;;95380:20;95584:26;;;:15;:26;;;;;;;;;;95437:267;;95518:4;95437:267;;;;;;;;;;;;;;;;;;-1:-1:-1;;95437:267:0;;;;;;;26:21:-1;;;22:32;;6:49;;95437:267:0;;;;;;;95419:292;;;;;;95261:456::o;25678:79::-;25743:6;;-1:-1:-1;;;;;25743:6:0;25678:79;;:::o;26044:94::-;26124:6;;26084:4;;-1:-1:-1;;;;;26124:6:0;26108:12;:10;:12::i;:::-;-1:-1:-1;;;;;26108:22:0;;26101:29;;26044:94;:::o;76163:113::-;76210:66;76163:113;:::o;62475:104::-;62560:6;:13;62475:104;:::o;82514:212::-;82598:10;82592:24;82564:13;;82592:24;-1:-1:-1;;82592:24:0;;;;;;;;;;;82589:132;;82639:14;;;;;;;;;-1:-1:-1;;;;;82639:14:0;-1:-1:-1;;;;;82639:32:0;;:34;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;82639:34:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;82639:34:0;;;;;;39:16:-1;36:1;17:17;2:54;101:4;82639:34:0;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;82639:34:0;;;;;;;;;;;;;-1:-1:-1;;;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;-1:-1;;;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;372:25;;-1:-1;82639:34:0;;420:4:-1;411:14;;;;82639:34:0;;;;;411:14:-1;82639:34:0;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;82639:34:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;82632:41;;;;82589:132;82703:10;82696:17;;;;;;;;;;;;;-1:-1:-1;;82696:17:0;;;;;;;;;;;;;;;;;;;;;;;;;;;82703:10;82696:17;;82703:10;82696:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;60448:166;60557:4;60533:8;58952:22;58967:6;58952:14;:22::i;:::-;58936:62;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;60580:20:0;;;;;:10;:20;;;;;:28;;60448:166::o;61809:148::-;61901:4;61924:17;;;:7;:17;;;;;;;-1:-1:-1;;;;;61924:27:0;;;:17;;:27;;61809:148::o;45861:27::-;;;-1:-1:-1;;;;;45861:27:0;;:::o;59466:266::-;25890:9;:7;:9::i;:::-;25882:54;;;;;-1:-1:-1;;;25882:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25882:54:0;;;;;;;;;;;;;;;59558:6;58952:22;58967:6;58952:14;:22::i;:::-;58936:62;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;59594:18:0;;59576:15;59594:18;;;:10;:18;;;;;;59645:15;59619:23;;;:41;59714:11;;59704:22;;59594:18;;59704:22;;;59005:1;25947;59466:266;:::o;65775:268::-;48569:7;;-1:-1:-1;;;48569:7:0;;;;48561:35;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;65890:17:0;;65897:10;65890:17;;65882:42;;;;;-1:-1:-1;;;65882:42:0;;;;;;;;;;;;-1:-1:-1;;;65882:42:0;;;;;;;;;;;;;;;65955:10;65931:35;;;;:23;:35;;;;;;;;-1:-1:-1;;;;;65931:40:0;;;;;;;;;;;;:52;;-1:-1:-1;;65931:52:0;;;;;;;;;;65995:42;;;;;;;65931:40;;65955:10;65995:42;;;;;;;;;;;65775:268;;:::o;92805:27::-;;;;:::o;48972:528::-;25890:9;:7;:9::i;:::-;25882:54;;;;;-1:-1:-1;;;25882:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25882:54:0;;;;;;;;;;;;;;;49042:7;;-1:-1:-1;;;49042:7:0;;;;:16;49034:42;;;;;-1:-1:-1;;;49034:42:0;;;;;;;;;;;;-1:-1:-1;;;49034:42:0;;;;;;;;;;;;;;;49090;;;49106:4;49098:21;49090:42;;;;49121:10;;49090:42;;;;;;;;;;49221:12;;49211:76;;-1:-1:-1;;;;;49221:12:0;49235:10;49247:39;49221:12;49280:4;49247:10;:39::i;:::-;49211:9;:76::i;:::-;49307:10;49294:24;62115:200;-1:-1:-1;;;;;58746:18:0;;62238:14;58746:18;;;:10;:18;;;;;:38;;;62216:6;;58730:88;;;;;-1:-1:-1;;;58730:88:0;;;;;;;;;;;;-1:-1:-1;;;58730:88:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;62271:18:0;;;;;:10;:18;;;;;:38;;;;62115:200::o;75996:111::-;76041:66;75996:111;:::o;105279:369::-;48569:7;;-1:-1:-1;;;48569:7:0;;;;48561:35;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;;;;105450:8;64789:32;64800:8;64810:10;64789;:32::i;:::-;:78;;;;64834:33;64846:8;64856:10;64834:11;:33::i;:::-;64789:138;;;-1:-1:-1;64897:17:0;;;;:7;:17;;;;;;64880:47;;-1:-1:-1;;;;;64897:17:0;64916:10;64880:16;:47::i;:::-;64773:192;;;;;-1:-1:-1;;;64773:192:0;;;;;;;;;;;;-1:-1:-1;;;64773:192:0;;;;;;;;;;;;;;;105477:17;;;;:7;:17;;;;;;-1:-1:-1;;;;;105477:17:0;58952:22;105477:17;58952:14;:22::i;:::-;58936:62;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;;;;105506:34;105519:5;105526:3;105531:8;105506:12;:34::i;:::-;105555:51;105578:5;105585:3;105590:8;105600:5;105555:22;:51::i;:::-;105547:93;;;;;-1:-1:-1;;;105547:93:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;64972:1;48603;105279:369;;;;:::o;93976:314::-;94103:53;94134:9;94145:10;94103:30;:53::i;:::-;94158:10;;91462:380;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;94170:9:0;;-1:-1:-1;;;;;;;91600:102:0;;;-1:-1:-1;91600:89:0;91624:35;91653:5;91624:28;:35::i;:::-;91670:10;91600:13;:89::i;:::-;-1:-1:-1;;;;;91600:102:0;;91584:146;;;;;-1:-1:-1;;;91584:146:0;;;;;;;;;;;;-1:-1:-1;;;91584:146:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;91737:26:0;;;;;;:15;:26;;;;;;;;;:28;;;;;;;;91777:51;;;;;;;;;;;;;;;;;94191:11;94205:35;94230:9;94205:24;:35::i;:::-;94191:49;;94249:35;94266:9;94277:6;94249:16;:35::i;48710:121::-;25890:9;:7;:9::i;:::-;25882:54;;;;;-1:-1:-1;;;25882:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25882:54:0;;;;;;;;;;;;;;;48569:7;;-1:-1:-1;;;48569:7:0;;;;48561:35;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;;;;48794:9;;;;;;;48810:7;:15;;-1:-1:-1;;;;48810:15:0;;;48710:121::o;45895:228::-;45965:12;:28;;-1:-1:-1;;;;;;45965:28:0;-1:-1:-1;;;;;45965:28:0;;;;;;;;46016:27;;:70;;;46085:1;46054:13;-1:-1:-1;;;;;46047:33:0;;:35;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;46047:35:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;46047:35:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;46047:35:0;:39;46016:70;46000:117;;;;;-1:-1:-1;;;46000:117:0;;;;;;;;;;;;-1:-1:-1;;;46000:117:0;;;;;;;;;;;;;;83291:400;59148:1;59119:17;;;:7;:17;;;;;;83390:13;;83367:8;;-1:-1:-1;;;;;59119:17:0;59103:69;;;;;-1:-1:-1;;;59103:69:0;;;;;;;;;;;;-1:-1:-1;;;59103:69:0;;;;;;;;;;;;;;;83448:12;83442:26;83415:17;;83442:26;-1:-1:-1;;83442:26:0;;;;;;;;;;;83439:135;;83490:14;;;;;;;;;-1:-1:-1;;;;;83490:14:0;-1:-1:-1;;;;;83490:33:0;;:35;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;83490:35:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;83490:35:0;;;;;;39:16:-1;36:1;17:17;2:54;101:4;83490:35:0;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;83490:35:0;;;;;;;;;;;;;-1:-1:-1;;;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;-1:-1;;;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;372:25;;-1:-1;83490:35:0;;420:4:-1;411:14;;;;83490:35:0;;;;;411:14:-1;83490:35:0;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;83490:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83484:41;;83439:135;;;83554:12;83548:18;;;;;;;;;;;;;-1:-1:-1;;83548:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;83554:12;83548:18;;83554:12;83548:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83439:135;83589:96;83611:27;83619:4;83611:25;:27::i;:::-;83589:96;;;;;;;;;;;;;-1:-1:-1;;;83589:96:0;;;83659:19;:8;:17;:19::i;:::-;83589:3;;:96;;;:13;:96;:::i;:::-;83582:103;83291:400;-1:-1:-1;;;;83291:400:0:o;55344:89::-;55426:1;55344:89;:::o;46199:266::-;46301:4;-1:-1:-1;;;;;46320:27:0;;46317:143;;-1:-1:-1;;;;;;46365:16:0;;;46358:23;;46317:143;46418:13;-1:-1:-1;;;;;46411:31:0;;46443:8;46411:41;;;;;;;;;;;;;-1:-1:-1;;;;;46411:41:0;-1:-1:-1;;;;;46411:41:0;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;46411:41:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;46411:41:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;46411:41:0;;-1:-1:-1;46404:48:0;;75839:103;75899:42;75839:103;:::o;66680:173::-;-1:-1:-1;;;;;66805:31:0;;;66782:4;66805:31;;;:23;:31;;;;;;;;:42;;;;;;;;;;;;;;;66680:173::o;100387:1849::-;48569:7;;-1:-1:-1;;;48569:7:0;;;;48561:35;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;-1:-1:-1;;;48561:35:0;;;;;;;;;;;;;;;100523:8;64789:32;64800:8;64810:10;64789;:32::i;:::-;:78;;;;64834:33;64846:8;64856:10;64834:11;:33::i;:::-;64789:138;;;-1:-1:-1;64897:17:0;;;;:7;:17;;;;;;64880:47;;-1:-1:-1;;;;;64897:17:0;64916:10;64880:16;:47::i;:::-;64773:192;;;;;-1:-1:-1;;;64773:192:0;;;;;;;;;;;;-1:-1:-1;;;64773:192:0;;;;;;;;;;;;;;;54430:5;100551:22;;:41;100543:76;;;;;-1:-1:-1;;;100543:76:0;;;;;;;;;;;;-1:-1:-1;;;100543:76:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;100634:17:0;;100626:45;;;;;-1:-1:-1;;;100626:45:0;;;;;;;;;;;;-1:-1:-1;;;100626:45:0;;;;;;;;;;;;;;;100678:16;100697:17;;;:7;:17;;;;;;-1:-1:-1;;;;;100697:17:0;100729:24;100697:17;100729:14;:24::i;:::-;100721:50;;;;;-1:-1:-1;;;100721:50:0;;;;;;;;;;;;-1:-1:-1;;;100721:50:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;100800:20:0;;;100778:19;100800:20;;;:10;:20;;;;;;100847:15;;;;;;;100881:13;;100988:27;;;;100847:15;;100881:13;;101018:15;100988:45;;100778:19;101117:37;100811:8;101142:11;101117:14;:37::i;:::-;101106:48;-1:-1:-1;101161:16:0;101180:20;:11;101106:48;101180:20;:15;:20;:::i;:::-;101161:39;;101277:13;101263:11;:27;101260:489;;;101349:11;101342:18;;101431:42;101444:8;101454:11;101467:5;101431:12;:42::i;:::-;101260:489;;;101548:39;101563:8;101573:13;101548:14;:39::i;:::-;101661:15;101631:27;;;:45;101722:19;;101603;;;;-1:-1:-1;101542:45:0;;-1:-1:-1;101732:8:0;;101722:19;;;;;101260:489;101761:13;;101757:216;;101790:24;101808:5;101790:17;:24::i;:::-;101823:23;101836:3;101841:4;101823:12;:23::i;:::-;101860:105;;101952:4;;-1:-1:-1;;;;;101860:105:0;;;101887:1;;-1:-1:-1;;;;;;;;;;;101860:105:0;101887:1;;101860:105;101757:216;102007:30;102020:4;102026;102032;102007:12;:30::i;:::-;102117:4;102105:3;-1:-1:-1;;;;;102071:57:0;102088:8;-1:-1:-1;;;;;102071:57:0;-1:-1:-1;;;;;;;;;;;102071:57:0;;;;;;;;;102145:51;102168:8;102178:3;102183:8;102145:51;;;;;;;;;;;;:22;:51::i;:::-;102137:93;;;;;-1:-1:-1;;;102137:93:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;64972:1;;;;;;;;48603;100387:1849;;;:::o;26786:109::-;25890:9;:7;:9::i;:::-;25882:54;;;;;-1:-1:-1;;;25882:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25882:54:0;;;;;;;;;;;;;;;26859:28;26878:8;26859:18;:28::i;56077:590::-;54677:7;:5;:7::i;:::-;-1:-1:-1;;;;;54663:21:0;:10;-1:-1:-1;;;;;54663:21:0;;:50;;;-1:-1:-1;54702:11:0;;-1:-1:-1;;;;;54702:11:0;54688:10;:25;54663:50;54647:114;;;;;-1:-1:-1;;;54647:114:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;56194:12;56209:40;56220:13;56243:4;56209:10;:40::i;:::-;56194:55;-1:-1:-1;56256:11:0;56277:12;;;:33;;;56303:7;56293;:17;56277:33;56274:174;;;56344:1;56334:7;:11;56326:40;;;;;-1:-1:-1;;;56326:40:0;;;;;;;;;;;;-1:-1:-1;;;56326:40:0;;;;;;;;;;;;;;;-1:-1:-1;56384:7:0;56274:174;;;-1:-1:-1;56433:7:0;56274:174;56499:11;;56461:58;;;;;;;;-1:-1:-1;;;;;56499:11:0;;;;56461:58;;;56472:10;;56461:58;;;;;;;;;56641:11;;56616:45;;56626:13;;-1:-1:-1;;;;;56641:11:0;56654:6;56616:9;:45::i;:::-;54768:1;;56077:590;;:::o;93306:160::-;25890:9;:7;:9::i;:::-;25882:54;;;;;-1:-1:-1;;;25882:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25882:54:0;;;;;;;;;;;;;;;93404:9;58952:22;58967:6;58952:14;:22::i;:::-;58936:62;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;;;;93425:35;93442:9;93453:6;93425:16;:35::i;106217:591::-;106340:4;106318:6;58952:22;58967:6;58952:14;:22::i;:::-;58936:62;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;106374:18:0;;106356:15;106374:18;;;:10;:18;;;;;;106356:15;106580:10;106577:135;;106644:15;106618:3;:23;;;:41;106601:58;;106577:135;;;106699:5;106682:22;;106577:135;54430:5;106724:42;106743:22;;106724:14;:18;;:42;;;;:::i;:::-;:61;;;;;;;106217:591;-1:-1:-1;;;;;;;106217:591:0:o;66946:150::-;67040:4;67063:18;;;:8;:18;;;;;;;-1:-1:-1;;;;;67063:27:0;;;:18;;:27;;66946:150::o;96636:1027::-;96753:11;96731:6;58952:22;58967:6;58952:14;:22::i;:::-;58936:62;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;-1:-1:-1;;;58936:62:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;96794:18:0;;96776:15;96794:18;;;:10;:18;;;;;96933:23;;;;97019:18;;97000:15;;96959;96933:41;;;;96984:31;;:53;96981:250;;97057:8;;97048:17;;96981:250;;;97205:18;;97175:8;;:27;;97188:13;97175:27;:12;:27;:::i;:::-;:48;;;;;;97166:57;;96981:250;97296:15;;:20;;:76;;;97354:18;;97336:15;;97320:13;:31;:52;97296:76;97293:365;;;97388:12;54430:5;97403:38;97416:24;;97403:8;;:12;;:38;;;;:::i;:::-;:57;;;;;;97388:72;;97482:7;97473:6;:16;97469:182;;;97597:7;97587:17;;;;97469:182;;;97640:1;97631:10;;97469:182;97293:365;;59005:1;;96636:1027;;;;:::o;95827:607::-;-1:-1:-1;;;;;95937:21:0;;95919:15;95937:21;;;:10;:21;;;;;;;;;95982:11;;95972:53;;;;;;;95937:21;;96006:10;;95937:21;;95982:11;;95972:53;;;;;;;;;;;96224:15;96198:23;;;:41;96252:10;;96248:141;;96349:12;;96339:42;;-1:-1:-1;;;;;96349:12:0;96363:9;96374:6;96339:9;:42::i;:::-;96397:31;96410:9;96421:6;96397:12;:31::i;107233:699::-;107341:18;107362:17;;;:7;:17;;;;;;-1:-1:-1;;;;;107362:17:0;107394:24;107386:53;;;;;-1:-1:-1;;;107386:53:0;;;;;;;;;;;;-1:-1:-1;;;107386:53:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;107464:22:0;;107446:15;107464:22;;;:10;:22;;;;;107516:23;;;;107464:22;;107562:26;107475:10;107562:14;:26::i;:::-;107546:42;;107598:8;107595:275;;;107620:8;107617:169;;;107667:28;:15;107687:7;107667:28;:19;:28;:::i;:::-;107641:23;;;:54;107617:169;;;107748:28;:15;107768:7;107748:28;:19;:28;:::i;:::-;107722:23;;;:54;107617:169;107595:275;;;107834:28;:15;107854:7;107834:28;:19;:28;:::i;:::-;107808:23;;;:54;107595:275;107881:45;;;;;;;;;;;;;;;107898:8;;107881:45;;;;;;;;107233:699;;;;;;;:::o;63092:294::-;63183:17;;;;:7;:17;;;;;;-1:-1:-1;;;;;63183:27:0;;;:17;;:27;63179:202;;63272:6;27:10:-1;;39:1;23:18;;45:23;;;63272:19:0;;;;-1:-1:-1;;;;;63272:19:0;;-1:-1:-1;;;;;;63272:19:0;;;;;;;;-1:-1:-1;63347:17:0;;;:7;63272:19;63347:17;;;;:26;;;;;;;;;;63179:202;63092:294;;:::o;37000:181::-;37058:7;37090:5;;;37114:6;;;;37106:46;;;;;-1:-1:-1;;;37106:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;67246:162;67351:1;67321:18;;;:8;:18;;;;;;-1:-1:-1;;;;;67321:18:0;:32;67317:86;;67393:1;67364:18;;;:8;:18;;;;;:31;;-1:-1:-1;;;;;;67364:31:0;;;67246:162::o;62702:327::-;62780:12;;62776:248;;62887:11;:13;;;;;;;;62990:26;;62702:327::o;46772:398::-;46837:4;46856:10;;46853:312;;46880:12;;-1:-1:-1;;;;;46880:12:0;46877:281;;46940:6;46927:9;:19;;46919:48;;;;;-1:-1:-1;;;46919:48:0;;;;;;;;;;;;-1:-1:-1;;;46919:48:0;;;;;;;;;;;;;;;-1:-1:-1;46985:9:0;46978:16;;46877:281;47043:12;;-1:-1:-1;;;;;47043:12:0;47067:57;47043:12;47090:10;47110:4;47117:6;47067:57;:22;:57;:::i;:::-;47142:6;47135:13;;;;;76393:371;76583:11;;76551:64;;;-1:-1:-1;;;76551:64:0;;-1:-1:-1;;;;;76583:11:0;;;76551:64;;;;76041:66;76551:64;;;;;-1:-1:-1;;75899:42:0;;76551:31;;:64;;;;;;;;;;;;;;;75899:42;76551:64;;;5:2:-1;;;;30:1;27;20:12;5:2;76551:64:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;76551:64:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;76551:64:0;;-1:-1:-1;;;;;;76625:25:0;;;76622:137;;76666:85;;-1:-1:-1;;;76666:85:0;;76705:10;76666:85;;;;;;-1:-1:-1;;;;;76666:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:38;;;;;;76705:10;76717:3;;76722:9;;76733:10;;76745:5;;76666:85;;;;;;;;;;;;;-1:-1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;76666:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;76666:85:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;76666:85:0;;;;76393:371;;;;;:::o;22849:476::-;23289:7;23277:20;23312:7;22849:476;:::o;25452:145::-;22448:12;;;;;;;;:31;;;22464:15;:13;:15::i;:::-;22448:47;;;-1:-1:-1;22484:11:0;;;;22483:12;22448:47;22440:106;;;;-1:-1:-1;;;22440:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22555:19;22578:12;;;;;;22577:13;22597:83;;;;22626:12;:19;;-1:-1:-1;;;;22626:19:0;;;;;22654:18;22641:4;22654:18;;;22597:83;25518:6;:15;;-1:-1:-1;;;;;;25518:15:0;-1:-1:-1;;;;;25518:15:0;;;;;;;;;;;25549:40;;25582:6;;;-1:-1:-1;;25549:40:0;;-1:-1:-1;;25549:40:0;22702:14;22698:57;;;22742:5;22727:20;;-1:-1:-1;;22727:20:0;;;25452:145;;:::o;48416:63::-;48459:7;:14;;-1:-1:-1;;;;48459:14:0;-1:-1:-1;;;48459:14:0;;;48416:63::o;54781:486::-;54963:24;54940:19;:47;;54932:84;;;;;-1:-1:-1;;;54932:84:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;55023:14;:36;;55048:10;-1:-1:-1;;;;;;55023:36:0;;;;;;;55120:11;:26;;;;;-1:-1:-1;;;;;55120:26:0;;;;;;;;;;;55153:18;:40;;;;55200:8;:20;55227:15;:34;54781:486::o;81630:321::-;81704:19;:17;:19::i;:::-;81730:16;;;;:4;;:16;;;;;:::i;:::-;-1:-1:-1;81915:30:0;-1:-1:-1;;;81915:18:0;:30::i;67703:375::-;68042:30;-1:-1:-1;;;68042:18:0;:30::i;:::-;67703:375::o;29738:193::-;-1:-1:-1;;;;;;29814:25:0;;;;;29806:66;;;;;-1:-1:-1;;;29806:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;29883:33:0;;;;;:20;:33;;;;;:40;;-1:-1:-1;;29883:40:0;29919:4;29883:40;;;29738:193::o;24357:98::-;24437:10;24357:98;:::o;47328:436::-;47439:11;;47436:323;;-1:-1:-1;;;;;47464:27:0;;47461:291;;47596:40;-1:-1:-1;;;;;47596:31:0;;47628:7;47596:40;:31;:40;:::i;:::-;47461:291;;;47685:13;47710:32;-1:-1:-1;;;;;47710:18:0;;47729:3;47734:7;47710:32;:18;:32;:::i;108446:362::-;108594:4;108615:15;:2;-1:-1:-1;;;;;108615:13:0;;:15::i;:::-;108610:50;;-1:-1:-1;108648:4:0;108641:11;;108610:50;108682:78;;-1:-1:-1;;;108682:78:0;;108727:10;108682:78;;;;;;-1:-1:-1;;;;;108682:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;108666:13;;108682:36;;;;;;108727:10;;108739:4;;108745:7;;108754:5;;108682:78;;;;;;;;;;;108666:13;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;108682:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;108682:78:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;108682:78:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;108682:78:0;-1:-1:-1;;;;;;108775:26:0;-1:-1:-1;;;108775:26:0;;-1:-1:-1;;108446:362:0;;;;;;:::o;90681:269::-;90883:58;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;90883:58:0;;;;;;;90873:69;;;;;;90681:269::o;88477:1930::-;88555:7;88618:9;:16;88638:2;88618:22;88614:74;;-1:-1:-1;88673:1:0;88657:19;;88614:74;89049:4;89034:20;;89028:27;89095:4;89080:20;;89074:27;89149:4;89134:20;;89128:27;88757:9;89120:36;90079:66;90066:79;;90062:129;;;90177:1;90162:17;;;;;;;90062:129;90207:1;:7;;90212:2;90207:7;;:18;;;;;90218:1;:7;;90223:2;90218:7;;90207:18;90203:68;;;90257:1;90242:17;;;;;;;90203:68;90375:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;90375:24:0;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;90375:24:0;;-1:-1:-1;;90375:24:0;;;88477:1930;-1:-1:-1;;;;;;;88477:1930:0:o;80175:454::-;80319:42;;;;;;;;;;;-1:-1:-1;;;80319:42:0;;;;80387:13;;80397:2;80387:13;;;80248;80387;;;;;;-1:-1:-1;;;;;80297:14:0;;;80319:42;80248:13;;80387;;;21:6:-1;;104:10;80387:13:0;87:34:-1;135:17;;-1:-1;80387:13:0;80368:32;;-1:-1:-1;;;80407:3:0;80411:1;80407:6;;;;;;;;;;;:12;-1:-1:-1;;;;;80407:12:0;;;;;;;;;-1:-1:-1;;;80426:3:0;80430:1;80426:6;;;;;;;;;;;:12;-1:-1:-1;;;;;80426:12:0;;;;;;;;-1:-1:-1;80450:6:0;80445:154;80466:2;80462:1;:6;80445:154;;;80497:8;80529:1;80512:5;80518:1;80522:2;80518:6;80512:13;;;;;;;;;;-1:-1:-1;;;;;80512:18:0;;;;80506:25;;80497:35;;;;;;;;;;;;;;;;;;80484:3;80490:1;80492;80490:3;80488:1;:5;80484:10;;;;;;;;;;;:48;-1:-1:-1;;;;;80484:48:0;;;;;;;;;80554:8;80569:5;80575:1;80579:2;80575:6;80569:13;;;;;;;80554:37;;80569:13;;;80585:4;80563:27;;80554:37;;;;;;;;;;;;;;80541:3;80547:1;80549;80547:3;80545:1;:5;80541:10;;;;;;;;;;;:50;-1:-1:-1;;;;;80541:50:0;;;;;;;;-1:-1:-1;80470:3:0;;80445:154;;;-1:-1:-1;80619:3:0;80175:454;-1:-1:-1;;;;80175:454:0:o;79656:513::-;79721:27;79843:2;79856:7;79852:40;;-1:-1:-1;;79874:10:0;;;;;;;;;;;;-1:-1:-1;;;79874:10:0;;;;;;79852:40;79907:2;79898:6;79931:53;79938:6;;79931:53;;79955:5;;79974:2;79969:7;;;;79931:53;;;79990:17;80020:3;80010:14;;;;;;;;;;;;;;;;;;;;;;;;;21:6:-1;;104:10;80010:14:0;87:34:-1;135:17;;-1:-1;80010:14:0;-1:-1:-1;79990:34:0;-1:-1:-1;;;80040:7:0;;80054:84;80061:6;;80054:84;;80110:2;80106:1;:6;80101:2;:11;80090:24;;80078:4;80083:3;;;;;;;80078:9;;;;;;;;;;;:36;-1:-1:-1;;;;;80078:36:0;;;;;;;;-1:-1:-1;80128:2:0;80123:7;;;;80054:84;;;-1:-1:-1;80158:4:0;79656:513;-1:-1:-1;;;;;79656:513:0:o;78833:817::-;78977:33;79022:16;79047:2;79022:28;;79057:16;79082:2;79057:28;;79092:16;79117:2;79092:28;;79127:16;79152:2;79127:28;;79162:18;79233:3;:10;79220:3;:10;79207:3;:10;79194:3;:10;:23;:36;:49;79183:61;;;;;;;;;;;;;;;;;;;;;;;;;21:6:-1;;104:10;79183:61:0;87:34:-1;135:17;;-1:-1;79183:61:0;-1:-1:-1;79162:82:0;-1:-1:-1;79162:82:0;79290:6;;79324:69;79340:3;:10;79336:1;:14;79324:69;;;79379:3;79383:1;79379:6;;;;;;;;;;;;;;;;79366:5;79372:3;;;;;;79366:10;;;;;;;;;;;:19;-1:-1:-1;;;;;79366:19:0;;;;;;;;-1:-1:-1;79352:3:0;;79324:69;;;-1:-1:-1;79408:1:0;79399:69;79415:3;:10;79411:1;:14;79399:69;;;79454:3;79458:1;79454:6;;;;;;;;;;;;;;;;79441:5;79447:3;;;;;;79441:10;;;;;;;;;;;:19;-1:-1:-1;;;;;79441:19:0;;;;;;;;-1:-1:-1;79427:3:0;;79399:69;;;-1:-1:-1;79483:1:0;79474:69;79490:3;:10;79486:1;:14;79474:69;;;79529:3;79533:1;79529:6;;;;;;;;;;;;;;;;79516:5;79522:3;;;;;;79516:10;;;;;;;;;;;:19;-1:-1:-1;;;;;79516:19:0;;;;;;;;-1:-1:-1;79502:3:0;;79474:69;;;-1:-1:-1;79558:1:0;79549:69;79565:3;:10;79561:1;:14;79549:69;;;79604:3;79608:1;79604:6;;;;;;;;;;;;;;;;79591:5;79597:3;;;;;;79591:10;;;;;;;;;;;:19;-1:-1:-1;;;;;79591:19:0;;;;;;;;-1:-1:-1;79577:3:0;;79549:69;;;-1:-1:-1;79638:5:0;;78833:817;-1:-1:-1;;;;;;;;;;;78833:817:0:o;27001:229::-;-1:-1:-1;;;;;27075:22:0;;27067:73;;;;-1:-1:-1;;;27067:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27177:6;;27156:38;;-1:-1:-1;;;;;27156:38:0;;;;27177:6;;27156:38;;27177:6;;27156:38;27205:6;:17;;-1:-1:-1;;;;;;27205:17:0;-1:-1:-1;;;;;27205:17:0;;;;;;;;;;27001:229::o;38372:471::-;38430:7;38675:6;38671:47;;-1:-1:-1;38705:1:0;38698:8;;38671:47;38742:5;;;38746:1;38742;:5;:1;38766:5;;;;;:10;38758:56;;;;-1:-1:-1;;;38758:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;76884:304;77024:11;;76992:66;;;-1:-1:-1;;;76992:66:0;;-1:-1:-1;;;;;77024:11:0;;;76992:66;;;;76210;76992;;;;;-1:-1:-1;;75899:42:0;;76992:31;;:66;;;;;;;;;;;;;;;75899:42;76992:66;;;5:2:-1;;;;30:1;27;20:12;5:2;76992:66:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;76992:66:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;76992:66:0;;-1:-1:-1;;;;;;77068:25:0;;;77065:118;;77109:66;;;-1:-1:-1;;;77109:66:0;;77150:10;77109:66;;;;-1:-1:-1;;;;;77109:66:0;;;;;;;;;;;;;;;:40;;;;;;:66;;;;;-1:-1:-1;;77109:66:0;;;;;;;;-1:-1:-1;77109:40:0;:66;;;5:2:-1;;;;30:1;27;20:12;5:2;77109:66:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;37456:136:0;37514:7;37541:43;37545:1;37548;37541:43;;;;;;;;;;;;;;;;;:3;:43::i;42461:204::-;42588:68;;;-1:-1:-1;;;;;42588:68:0;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;42588:68:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;42562:95:0;;42581:5;;42562:18;:95::i;28803:238::-;22448:12;;;;;;;;:31;;;22464:15;:13;:15::i;:::-;22448:47;;;-1:-1:-1;22484:11:0;;;;22483:12;22448:47;22440:106;;;;-1:-1:-1;;;22440:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22555:19;22578:12;;;;;;22577:13;22597:83;;;;22626:12;:19;;-1:-1:-1;;;;22626:19:0;;;;;22654:18;22641:4;22654:18;;;22597:83;28993:40;-1:-1:-1;;;28993:18:0;:40::i;:::-;22702:14;22698:57;;;22742:5;22727:20;;-1:-1:-1;;22727:20:0;;;28803:238;:::o;35669:371::-;35767:4;35759:21;:31;-1:-1:-1;35759:31:0;35751:73;;;;;-1:-1:-1;;;35751:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;35911:32;;35893:12;;-1:-1:-1;;;;;35911:14:0;;;35932:6;;35893:12;35911:32;35893:12;35911:32;35932:6;35911:14;:32;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;35892:51:0;;;35962:7;35954:78;;;;-1:-1:-1;;;35954:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42277:176;42386:58;;;-1:-1:-1;;;;;42386:58:0;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;42386:58:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;42360:85:0;;42379:5;;42360:18;:85::i;33538:810::-;33598:4;34257:20;;34100:66;34297:15;;;;;:42;;-1:-1:-1;34316:23:0;;;33538:810;-1:-1:-1;;33538:810:0:o;37929:192::-;38015:7;38051:12;38043:6;;;;38035:29;;;;-1:-1:-1;;;38035:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;38035:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;38087:5:0;;;37929:192::o;44316:1114::-;44920:27;44928:5;-1:-1:-1;;;;;44920:25:0;;:27::i;:::-;44912:71;;;;;-1:-1:-1;;;44912:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;45057:12;45071:23;45106:5;-1:-1:-1;;;;;45098:19:0;45118:4;45098:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;45098:25:0;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;45056:67:0;;;;45142:7;45134:52;;;;;-1:-1:-1;;;45134:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45203:17;;:21;45199:224;;45345:10;45334:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;45334:30:0;45326:85;;;;-1:-1:-1;;;45326:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;109230:1104;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;109230:1104:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;109230:1104:0;;;-1:-1:-1;109230:1104:0;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Swarm Source
bzzr://13b44e6afc5a7bb538a4b112863a2d1fc743d60c03c249977c5feaec0cbedecf
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.