Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
- Contract name:
- HorseFarm
- Optimization enabled
- true
- Compiler version
- v0.8.2+commit.661d1103
- Optimization runs
- 999999
- Verified at
- 2023-04-19 04:28:34.518164Z
Constructor Arguments
000000000000000000000000cb775d2e24efe447379fd6249870922a327dec41
Arg [0] (address) : 0xcb775d2e24efe447379fd6249870922a327dec41
contracts/HorseFarm.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./libraries/OwnerOperator.sol"; import "./libraries/BytesLibrary.sol"; import "./libraries/StringLibrary.sol"; import "./interfaces/ITransporter.sol"; contract HorseFarm is ERC721Holder, OwnerOperator, Pausable { using SafeERC20 for IERC20; using SafeMath for uint256; using StringLibrary for string; using BytesLibrary for bytes32; struct LeaseData { address owner; uint256 horseId; uint256 blockExpired; string nonce; uint8 v; bytes32 r; bytes32 s; } struct SavedLease { address owner; uint256 horseId; uint256 blockExpired; } struct WithdrawData { address owner; uint256 horseId; uint256 blockExpired; string nonce; uint8 v; bytes32 r; bytes32 s; } struct SavedWithdraw { address owner; uint256 horseId; uint256 blockExpired; } bool public isMigration = false; address public horseNFT; // Mapping from nft token id to owner of token mapping(uint256 => address) public ownerOf; // Mapping from sign message to checking value mapping(bytes32 => bool) public leaseCompleted; // Mapping from nonce to leaseData mapping(string => SavedLease) public leaseData; // Mapping from user address to lease count mapping(address => uint256) public leaseCountOf; // Mapping from user address and lease index to lease nonce mapping(address => mapping(uint256 => string)) public leaseNoneOf; // Mapping from sign message to checking value mapping(bytes32 => bool) public withdrawCompleted; // Mapping from nonce to withdrawData mapping(string => SavedWithdraw) public withdrawData; // Mapping from user address to withdraw count mapping(address => uint256) public withdrawCountOf; // Mapping from user address and withdraw index to withdraw nonce mapping(address => mapping(uint256 => string)) public withdrawNoneOf; event Lease(address indexed owner, address indexed signer, uint256 indexed horseId, string nonce); event Withdraw(address indexed owner, address indexed signer, uint256 indexed horseId, string nonce); event Signer(address signers); ITransporter public transporter; constructor(address token) OwnerOperator() Pausable() { horseNFT = token; } function pause() external virtual onlyOwner { _pause(); } function unpause() external virtual onlyOwner { _unpause(); } function setTransporter(address _transporter) external virtual onlyOwner { transporter = ITransporter(_transporter); } /** * @dev withdraw token that user mistakenly transferred. */ function withdrawToken(address token) external virtual onlyOwner { uint256 amount = IERC20(token).balanceOf(address(this)); require(amount > 0, "HorseFarm: zero out amount"); IERC20(token).safeTransfer(msg.sender, amount); } /** * @dev withdraw nft that user mistakenly transferred. */ function withdrawNFT(address token, uint256 tokenId) external virtual onlyOwner { require(token != horseNFT || ownerOf[tokenId] == address(0), "HorseFarm: horse belong to contract"); IERC721(token).safeTransferFrom(address(this), msg.sender, tokenId); } /** * @dev user lease horse. */ function lease(LeaseData memory data) external virtual whenNotPaused { require(msg.sender == data.owner, "HorseFarm: sender is not owner"); (bytes32 message, address signer) = _verifyLease(data); leaseCompleted[message] = true; leaseData[data.nonce] = SavedLease({owner: data.owner, horseId: data.horseId, blockExpired: data.blockExpired}); leaseNoneOf[data.owner][leaseCountOf[data.owner]] = data.nonce; leaseCountOf[data.owner] = leaseCountOf[data.owner].add(1); ownerOf[data.horseId] = data.owner; transporter.safeTransferNFT721From(horseNFT, data.owner, address(this), data.horseId); emit Lease(data.owner, signer, data.horseId, data.nonce); } function _verifyLease(LeaseData memory data) internal view returns (bytes32, address) { bytes32 message = keccak256( abi.encode(address(this), "Lease", data.owner, data.horseId, data.blockExpired, data.nonce) ); address signer = message.toString().recover(data.v, data.r, data.s); require(operators[signer], "HorseFarm: lease not verify"); require(block.number < data.blockExpired, "HorseFarm: lease expired"); require(!leaseCompleted[message], "HorseFarm: lease completed"); require(leaseData[data.nonce].owner == address(0), "HorseFarm: nonce existed"); return (message, signer); } /** * @dev user withdraw horse. */ function withdraw(WithdrawData memory data) external virtual whenNotPaused { require(ownerOf[data.horseId] != address(0), "HorseFarm: horse withdrawed"); require(msg.sender == data.owner, "HorseFarm: sender is not owner"); require(msg.sender == ownerOf[data.horseId], "HorseFarm: sender is not horse owner"); (bytes32 message, address signer) = _verifyWithdraw(data); withdrawCompleted[message] = true; withdrawData[data.nonce] = SavedWithdraw({ owner: data.owner, horseId: data.horseId, blockExpired: data.blockExpired }); withdrawNoneOf[msg.sender][withdrawCountOf[msg.sender]] = data.nonce; withdrawCountOf[msg.sender] = withdrawCountOf[msg.sender].add(1); ownerOf[data.horseId] = address(0); IERC721(horseNFT).safeTransferFrom(address(this), msg.sender, data.horseId); emit Withdraw(msg.sender, signer, data.horseId, data.nonce); } function _verifyWithdraw(WithdrawData memory data) internal view returns (bytes32, address) { bytes32 message = keccak256( abi.encode(address(this), "Withdraw", data.owner, data.horseId, data.blockExpired, data.nonce) ); address signer = message.toString().recover(data.v, data.r, data.s); require(operators[signer], "HorseFarm: withdraw not verify"); require(block.number < data.blockExpired, "HorseFarm: withdraw expired"); require(!withdrawCompleted[message], "HorseFarm: withdraw completed"); require(withdrawData[data.nonce].blockExpired == 0, "HorseFarm: nonce existed"); return (message, signer); } function batchMigration(LeaseData[] memory data) public onlyOwner { require(isMigration == false, "Migration finished"); for (uint256 i = 0; i < data.length; i++) { (bytes32 message, address signer) = _verifyLease(data[i]); ownerOf[data[i].horseId] = data[i].owner; emit Signer(signer); } } function endMigration() public onlyOwner { isMigration = true; } }
@openzeppelin/contracts/utils/introspection/IERC165.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
@openzeppelin/contracts/security/Pausable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
@openzeppelin/contracts/access/Ownable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
@openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; 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)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _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. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
@openzeppelin/contracts/token/ERC721/IERC721.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721Receiver.sol"; /** * @dev Implementation of the {IERC721Receiver} interface. * * Accepts all token transfers. * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. */ contract ERC721Holder is IERC721Receiver { /** * @dev See {IERC721Receiver-onERC721Received}. * * Always returns `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address, address, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC721Received.selector; } }
@openzeppelin/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
@openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
@openzeppelin/contracts/utils/math/SafeMath.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @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) { return a + b; } /** * @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 a - b; } /** * @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) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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 a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
contracts/interfaces/ITransporter.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ITransporter { function safeTransferTokenFrom( address token_, address from_, address to_, uint256 amount_ ) external; function safeTransferNFT721From( address token_, address from_, address to_, uint256 tokenId_ ) external; function safeBurnNFT721From(address token_, uint256 tokenId_) external; function safeTransferNFT1155From( address token_, address from_, address to_, uint256 tokenId_, uint256 amount_ ) external; function safeBurnNFT1155From( address token_, address from_, uint256 tokenId_, uint256 amount_ ) external; function safeBurnBatchNFT1155From( address token_, address from_, uint256[] memory tokenId_, uint256[] memory amount_ ) external; }
contracts/libraries/BytesLibrary.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev BytesLibrary operations. */ library BytesLibrary { function toString(bytes32 value) internal pure returns (string memory) { bytes memory alphabet = "0123456789abcdef"; bytes memory str = new bytes(64); for (uint256 i = 0; i < 32; i++) { str[i * 2] = alphabet[uint8(value[i] >> 4)]; str[1 + i * 2] = alphabet[uint8(value[i] & 0x0f)]; } return string(str); } }
contracts/libraries/OwnerOperator.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; abstract contract OwnerOperator is Ownable { mapping(address => bool) public operators; constructor() Ownable() {} modifier operatorOrOwner() { require(operators[msg.sender] || owner() == msg.sender, "OwnerOperator: !operator, !owner"); _; } modifier onlyOperator() { require(operators[msg.sender], "OwnerOperator: !operator"); _; } function addOperator(address operator) external virtual onlyOwner { require(operator != address(0), "OwnerOperator: operator is the zero address"); operators[operator] = true; } function removeOperator(address operator) external virtual onlyOwner { require(operator != address(0), "OwnerOperator: operator is the zero address"); operators[operator] = false; } }
contracts/libraries/StringLibrary.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./UintLibrary.sol"; library StringLibrary { using UintLibrary for uint256; function append(string memory a, string memory b) internal pure returns (string memory) { bytes memory ba = bytes(a); bytes memory bb = bytes(b); bytes memory bab = new bytes(ba.length + bb.length); uint256 k = 0; for (uint256 i = 0; i < ba.length; i++) bab[k++] = ba[i]; for (uint256 i = 0; i < bb.length; i++) bab[k++] = bb[i]; return string(bab); } function append( string memory a, string memory b, string memory c ) internal pure returns (string memory) { bytes memory ba = bytes(a); bytes memory bb = bytes(b); bytes memory bc = bytes(c); bytes memory bbb = new bytes(ba.length + bb.length + bc.length); uint256 k = 0; for (uint256 i = 0; i < ba.length; i++) bbb[k++] = ba[i]; for (uint256 i = 0; i < bb.length; i++) bbb[k++] = bb[i]; for (uint256 i = 0; i < bc.length; i++) bbb[k++] = bc[i]; return string(bbb); } function recover( string memory message, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { bytes memory msgBytes = bytes(message); bytes memory fullMessage = concat( bytes("\x19Ethereum Signed Message:\n"), bytes(msgBytes.length.toString()), msgBytes, new bytes(0), new bytes(0), new bytes(0), new bytes(0) ); return ecrecover(keccak256(fullMessage), v, r, s); } function concat( bytes memory ba, bytes memory bb, bytes memory bc, bytes memory bd, bytes memory be, bytes memory bf, bytes memory bg ) internal pure returns (bytes memory) { bytes memory resultBytes = new bytes(ba.length + bb.length + bc.length + bd.length + be.length + bf.length + bg.length); uint256 k = 0; for (uint256 i = 0; i < ba.length; i++) resultBytes[k++] = ba[i]; for (uint256 i = 0; i < bb.length; i++) resultBytes[k++] = bb[i]; for (uint256 i = 0; i < bc.length; i++) resultBytes[k++] = bc[i]; for (uint256 i = 0; i < bd.length; i++) resultBytes[k++] = bd[i]; for (uint256 i = 0; i < be.length; i++) resultBytes[k++] = be[i]; for (uint256 i = 0; i < bf.length; i++) resultBytes[k++] = bf[i]; for (uint256 i = 0; i < bg.length; i++) resultBytes[k++] = bg[i]; return resultBytes; } }
contracts/libraries/UintLibrary.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; library UintLibrary { using SafeMath for uint256; function toString(uint256 i) internal pure returns (string memory) { if (i == 0) { return "0"; } uint256 j = i; uint256 len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); for (uint256 k = len; k > 0; k--) { bstr[k - 1] = bytes1(uint8(48 + (i % 10))); i /= 10; } return string(bstr); } function bp(uint256 value, uint256 bpValue) internal pure returns (uint256) { return value.mul(bpValue).div(10000); } }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"event","name":"Lease","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"signer","internalType":"address","indexed":true},{"type":"uint256","name":"horseId","internalType":"uint256","indexed":true},{"type":"string","name":"nonce","internalType":"string","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Signer","inputs":[{"type":"address","name":"signers","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"signer","internalType":"address","indexed":true},{"type":"uint256","name":"horseId","internalType":"uint256","indexed":true},{"type":"string","name":"nonce","internalType":"string","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addOperator","inputs":[{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"batchMigration","inputs":[{"type":"tuple[]","name":"data","internalType":"struct HorseFarm.LeaseData[]","components":[{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"horseId","internalType":"uint256"},{"type":"uint256","name":"blockExpired","internalType":"uint256"},{"type":"string","name":"nonce","internalType":"string"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}]}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"endMigration","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"horseNFT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isMigration","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"lease","inputs":[{"type":"tuple","name":"data","internalType":"struct HorseFarm.LeaseData","components":[{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"horseId","internalType":"uint256"},{"type":"uint256","name":"blockExpired","internalType":"uint256"},{"type":"string","name":"nonce","internalType":"string"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}]}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"leaseCompleted","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"leaseCountOf","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"horseId","internalType":"uint256"},{"type":"uint256","name":"blockExpired","internalType":"uint256"}],"name":"leaseData","inputs":[{"type":"string","name":"","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"leaseNoneOf","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bytes4","name":"","internalType":"bytes4"}],"name":"onERC721Received","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"bytes","name":"","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"operators","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ownerOf","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeOperator","inputs":[{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTransporter","inputs":[{"type":"address","name":"_transporter","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ITransporter"}],"name":"transporter","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"tuple","name":"data","internalType":"struct HorseFarm.WithdrawData","components":[{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"horseId","internalType":"uint256"},{"type":"uint256","name":"blockExpired","internalType":"uint256"},{"type":"string","name":"nonce","internalType":"string"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}]}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"withdrawCompleted","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"withdrawCountOf","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"horseId","internalType":"uint256"},{"type":"uint256","name":"blockExpired","internalType":"uint256"}],"name":"withdrawData","inputs":[{"type":"string","name":"","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawNFT","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"withdrawNoneOf","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawToken","inputs":[{"type":"address","name":"token","internalType":"address"}]}]
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063715018a6116101045780639c8dadae116100a2578063b9aa640111610071578063b9aa640114610564578063e42b021214610577578063f2fde38b14610597578063fb797bde146105aa576101cf565b80639c8dadae14610508578063a8ed22a31461051b578063ac8a584a1461053e578063b420ca7414610551576101cf565b806389476069116100de57806389476069146104a45780638da5cb5b146104b75780639870d7fe146104d557806399725af1146104e8576101cf565b8063715018a6146104435780637a2ef48b1461044b5780638456cb591461049c576101cf565b80633f4ba83a11610171578063604ff5a41161014b578063604ff5a41461036f5780636088e93a146103f25780636352211e146104055780636c525d041461043b576101cf565b80633f4ba83a146103475780635c975abb146103515780635fe560781461035c576101cf565b806313e7c9d8116101ad57806313e7c9d81461025e578063150b7a021461028157806317c6395d146102e9578063336db659146102fc576101cf565b8063037a4a4a146101d457806304d45b49146101fd57806307d0ef9714610230575b600080fd5b6101e76101e2366004613697565b6105bc565b6040516101f4919061397a565b60405180910390f35b61022061020b36600461377f565b60046020526000908152604090205460ff1681565b60405190151581526020016101f4565b61025061023e366004613604565b600a6020526000908152604090205481565b6040519081526020016101f4565b61022061026c366004613604565b60016020526000908152604090205460ff1681565b6102b861028f36600461361e565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101f4565b6101e76102f7366004613697565b610661565b6002546103229062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f4565b61034f610685565b005b60025460ff16610220565b61034f61036a3660046136c0565b610715565b6103c061037d366004613797565b805160208183018101805160098252928201919093012091528054600182015460029092015473ffffffffffffffffffffffffffffffffffffffff909116919083565b6040805173ffffffffffffffffffffffffffffffffffffffff90941684526020840192909252908201526060016101f4565b61034f610400366004613697565b61098f565b61032261041336600461377f565b60036020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b61034f610b7e565b61034f610c2d565b6103c0610459366004613797565b805160208183018101805160058252928201919093012091528054600182015460029092015473ffffffffffffffffffffffffffffffffffffffff909116919083565b61034f610cb8565b61034f6104b2366004613604565b610d41565b60005473ffffffffffffffffffffffffffffffffffffffff16610322565b61034f6104e3366004613604565b610eef565b6102506104f6366004613604565b60066020526000908152604090205481565b61034f610516366004613604565b611065565b61022061052936600461377f565b60086020526000908152604090205460ff1681565b61034f61054c366004613604565b61112d565b61034f61055f3660046137ca565b61129d565b61034f6105723660046137ca565b61166d565b600c546103229073ffffffffffffffffffffffffffffffffffffffff1681565b61034f6105a5366004613604565b611b3d565b60025461022090610100900460ff1681565b600b602090815260009283526040808420909152908252902080546105e090613ac1565b80601f016020809104026020016040519081016040528092919081815260200182805461060c90613ac1565b80156106595780601f1061062e57610100808354040283529160200191610659565b820191906000526020600020905b81548152906001019060200180831161063c57829003601f168201915b505050505081565b6007602090815260009283526040808420909152908252902080546105e090613ac1565b60005473ffffffffffffffffffffffffffffffffffffffff16331461070b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b610713611c6d565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610796576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b600254610100900460ff1615610808576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4d6967726174696f6e2066696e697368656400000000000000000000000000006044820152606401610702565b60005b815181101561098b57600080610860848481518110610853577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151611d4e565b9150915083838151811061089d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160000151600360008686815181106108e6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602090810291909101810151810151825281810192909252604090810160002080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9485161790555191831682527ff4b0650db61027ac5b4ec7eb8ba223cf23715631228786676084b09a56b77861910160405180910390a15050808061098390613b15565b91505061080b565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b60025473ffffffffffffffffffffffffffffffffffffffff8381166201000090920416141580610a62575060008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff16155b610aee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f486f7273654661726d3a20686f7273652062656c6f6e6720746f20636f6e747260448201527f61637400000000000000000000000000000000000000000000000000000000006064820152608401610702565b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081523060048201523360248201526044810182905273ffffffffffffffffffffffffffffffffffffffff8316906342842e0e90606401600060405180830381600087803b158015610b6257600080fd5b505af1158015610b76573d6000803e3d6000fd5b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610bff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610cae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b6107136000611ff4565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b610713612069565b60005473ffffffffffffffffffffffffffffffffffffffff163314610dc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a082319060240160206040518083038186803b158015610e2a57600080fd5b505afa158015610e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6291906137fd565b905060008111610ece576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f486f7273654661726d3a207a65726f206f757420616d6f756e740000000000006044820152606401610702565b61098b73ffffffffffffffffffffffffffffffffffffffff83163383612129565b60005473ffffffffffffffffffffffffffffffffffffffff163314610f70576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b73ffffffffffffffffffffffffffffffffffffffff8116611013576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4f776e65724f70657261746f723a206f70657261746f7220697320746865207a60448201527f65726f20616464726573730000000000000000000000000000000000000000006064820152608401610702565b73ffffffffffffffffffffffffffffffffffffffff16600090815260016020819052604090912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146110e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b73ffffffffffffffffffffffffffffffffffffffff8116611251576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4f776e65724f70657261746f723a206f70657261746f7220697320746865207a60448201527f65726f20616464726573730000000000000000000000000000000000000000006064820152608401610702565b73ffffffffffffffffffffffffffffffffffffffff16600090815260016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b60025460ff161561130a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610702565b805173ffffffffffffffffffffffffffffffffffffffff16331461138a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f486f7273654661726d3a2073656e646572206973206e6f74206f776e657200006044820152606401610702565b60008061139683611d4e565b60008281526004602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055815160608082018452885173ffffffffffffffffffffffffffffffffffffffff1682528883015192820192909252878301518184015290870151915193955091935090916005916114219161385f565b9081526040805160209281900383019020835181547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff918216178255848401516001830155938201516002909101556060860151865184166000908152600784528281208851909516815260068452828120548152938352922082516114c3939192919091019061340e565b50825173ffffffffffffffffffffffffffffffffffffffff166000908152600660205260409020546114f69060016121bb565b835173ffffffffffffffffffffffffffffffffffffffff90811660009081526006602090815260408083209490945586518188018051845260039092529184902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001692841692909217909155600c546002548751925194517fa5bc64ca00000000000000000000000000000000000000000000000000000000815262010000909104841660048201529183166024830152306044830152606482019390935291169063a5bc64ca90608401600060405180830381600087803b1580156115de57600080fd5b505af11580156115f2573d6000803e3d6000fd5b5050505082602001518173ffffffffffffffffffffffffffffffffffffffff16846000015173ffffffffffffffffffffffffffffffffffffffff167f6c0f40da73c577567dd97a5f1acfd9d4a433a9832757bf34c6bdee20791c113d8660600151604051611660919061397a565b60405180910390a4505050565b60025460ff16156116da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610702565b60208082015160009081526003909152604090205473ffffffffffffffffffffffffffffffffffffffff1661176b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f486f7273654661726d3a20686f727365207769746864726177656400000000006044820152606401610702565b805173ffffffffffffffffffffffffffffffffffffffff1633146117eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f486f7273654661726d3a2073656e646572206973206e6f74206f776e657200006044820152606401610702565b60208181015160009081526003909152604090205473ffffffffffffffffffffffffffffffffffffffff1633146118a3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f486f7273654661726d3a2073656e646572206973206e6f7420686f727365206f60448201527f776e6572000000000000000000000000000000000000000000000000000000006064820152608401610702565b6000806118af836121ce565b60008281526008602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055815160608082018452885173ffffffffffffffffffffffffffffffffffffffff16825288830151928201929092528783015181840152908701519151939550919350909160099161193a9161385f565b9081526040805160209281900383019020835181547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178155838301516001820155928101516002909301929092556060850151336000908152600b8352838120600a845284822054825283529290922082516119d6939192919091019061340e565b50336000908152600a60205260409020546119f29060016121bb565b336000818152600a60209081526040808320949094558681018051835260039091529083902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600254905192517f42842e0e000000000000000000000000000000000000000000000000000000008152306004820152602481019290925260448201929092526201000090910473ffffffffffffffffffffffffffffffffffffffff16906342842e0e90606401600060405180830381600087803b158015611abf57600080fd5b505af1158015611ad3573d6000803e3d6000fd5b5050505082602001518173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c73b702b261c879bc4ebea83f44bd0c9a90cffb4aa0f324e52750d831b9cb4f8660600151604051611660919061397a565b60005473ffffffffffffffffffffffffffffffffffffffff163314611bbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b73ffffffffffffffffffffffffffffffffffffffff8116611c61576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610702565b611c6a81611ff4565b50565b60025460ff16611cd9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610702565b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6000806000308460000151856020015186604001518760600151604051602001611d7c95949392919061387b565b6040516020818303038152906040528051906020012090506000611db985608001518660a001518760c00151611db186612438565b929190612709565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205490915060ff16611e4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f486f7273654661726d3a206c65617365206e6f742076657269667900000000006044820152606401610702565b84604001514310611eb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f486f7273654661726d3a206c65617365206578706972656400000000000000006044820152606401610702565b60008281526004602052604090205460ff1615611f31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f486f7273654661726d3a206c6561736520636f6d706c657465640000000000006044820152606401610702565b600073ffffffffffffffffffffffffffffffffffffffff1660058660600151604051611f5d919061385f565b9081526040519081900360200190205473ffffffffffffffffffffffffffffffffffffffff1614611fea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f486f7273654661726d3a206e6f6e6365206578697374656400000000000000006044820152606401610702565b9092509050915091565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460ff16156120d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610702565b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d243390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526121b690849061281c565b505050565b60006121c782846139dc565b9392505050565b60008060003084600001518560200151866040015187606001516040516020016121fc959493929190613901565b604051602081830303815290604052805190602001209050600061223185608001518660a001518760c00151611db186612438565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205490915060ff166122c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f486f7273654661726d3a207769746864726177206e6f742076657269667900006044820152606401610702565b84604001514310612330576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f486f7273654661726d3a207769746864726177206578706972656400000000006044820152606401610702565b60008281526008602052604090205460ff16156123a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f486f7273654661726d3a20776974686472617720636f6d706c657465640000006044820152606401610702565b600985606001516040516123bd919061385f565b908152602001604051809103902060020154600014611fea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f486f7273654661726d3a206e6f6e6365206578697374656400000000000000006044820152606401610702565b604080518082018252601081527f30313233343536373839616263646566000000000000000000000000000000006020820152815182815260608181018452926000919060208201818036833701905050905060005b60208110156126ff578260048683602081106124d3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60f81c60ff1681518110612538577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b01602001517fff00000000000000000000000000000000000000000000000000000000000000168261256b836002613a08565b815181106125a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508285826020811061260b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b825191901a600f16908110612649577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b01602001517fff00000000000000000000000000000000000000000000000000000000000000168261267c836002613a08565b6126879060016139dc565b815181106126be577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806126f781613b15565b91505061248e565b509150505b919050565b60008085905060006127816040518060400160405280601a81526020017f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152506127548451612928565b60408051600080825260208201818152828401828152606084019283526080840190945288939091612abd565b905060018180519060200120878787604051600081526020016040526040516127c6949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa1580156127e8573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015198975050505050505050565b600061287e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166132249092919063ffffffff16565b8051909150156121b6578080602001905181019061289c919061375f565b6121b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610702565b606081612969575060408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152612704565b8160005b8115612993578061297d81613b15565b915061298c9050600a836139f4565b915061296d565b60008167ffffffffffffffff8111156129d5577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156129ff576020820181803683370190505b509050815b8015612ab457612a15600a87613b4e565b612a209060306139dc565b60f81b82612a2f600184613a45565b81518110612a66577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612aa0600a876139f4565b955080612aac81613a8c565b915050612a04565b50949350505050565b6060600082518451865188518a518c518e51612ad991906139dc565b612ae391906139dc565b612aed91906139dc565b612af791906139dc565b612b0191906139dc565b612b0b91906139dc565b67ffffffffffffffff811115612b4a577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612b74576020820181803683370190505b5090506000805b8a51811015612c69578a8181518110612bbd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b01602001517fff00000000000000000000000000000000000000000000000000000000000000168383612bef81613b15565b945081518110612c28577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080612c6181613b15565b915050612b7b565b5060005b8951811015612d5b57898181518110612caf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b01602001517fff00000000000000000000000000000000000000000000000000000000000000168383612ce181613b15565b945081518110612d1a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080612d5381613b15565b915050612c6d565b5060005b8851811015612e4d57888181518110612da1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b01602001517fff00000000000000000000000000000000000000000000000000000000000000168383612dd381613b15565b945081518110612e0c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080612e4581613b15565b915050612d5f565b5060005b8751811015612f3f57878181518110612e93577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b01602001517fff00000000000000000000000000000000000000000000000000000000000000168383612ec581613b15565b945081518110612efe577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080612f3781613b15565b915050612e51565b5060005b865181101561303157868181518110612f85577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b01602001517fff00000000000000000000000000000000000000000000000000000000000000168383612fb781613b15565b945081518110612ff0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061302981613b15565b915050612f43565b5060005b855181101561312357858181518110613077577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b01602001517fff000000000000000000000000000000000000000000000000000000000000001683836130a981613b15565b9450815181106130e2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061311b81613b15565b915050613035565b5060005b845181101561321557848181518110613169577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b01602001517fff0000000000000000000000000000000000000000000000000000000000000016838361319b81613b15565b9450815181106131d4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061320d81613b15565b915050613127565b50909998505050505050505050565b6060613233848460008561323b565b949350505050565b6060824710156132cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610702565b843b613335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610702565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161335e919061385f565b60006040518083038185875af1925050503d806000811461339b576040519150601f19603f3d011682016040523d82523d6000602084013e6133a0565b606091505b50915091506133b08282866133bb565b979650505050505050565b606083156133ca5750816121c7565b8251156133da5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610702919061397a565b82805461341a90613ac1565b90600052602060002090601f01602090048101928261343c5760008555613482565b82601f1061345557805160ff1916838001178555613482565b82800160010185558215613482579182015b82811115613482578251825591602001919060010190613467565b5061348e929150613492565b5090565b5b8082111561348e5760008155600101613493565b600067ffffffffffffffff8311156134c1576134c1613bc0565b6134f260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601160161398d565b905082815283838301111561350657600080fd5b828260208301376000602084830101529392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461270457600080fd5b600082601f830112613551578081fd5b6121c7838335602085016134a7565b600060e08284031215613571578081fd5b61357b60e061398d565b90506135868261351d565b81526020820135602082015260408201356040820152606082013567ffffffffffffffff8111156135b657600080fd5b6135c284828501613541565b6060830152506135d4608083016135f3565b608082015260a082013560a082015260c082013560c082015292915050565b803560ff8116811461270457600080fd5b600060208284031215613615578081fd5b6121c78261351d565b60008060008060808587031215613633578283fd5b61363c8561351d565b935061364a6020860161351d565b925060408501359150606085013567ffffffffffffffff81111561366c578182fd5b8501601f8101871361367c578182fd5b61368b878235602084016134a7565b91505092959194509250565b600080604083850312156136a9578182fd5b6136b28361351d565b946020939093013593505050565b600060208083850312156136d2578182fd5b823567ffffffffffffffff808211156136e9578384fd5b818501915085601f8301126136fc578384fd5b81358181111561370e5761370e613bc0565b61371b848583020161398d565b8181528481019250838501865b838110156137515761373f8a888435890101613560565b85529386019390860190600101613728565b509098975050505050505050565b600060208284031215613770578081fd5b815180151581146121c7578182fd5b600060208284031215613790578081fd5b5035919050565b6000602082840312156137a8578081fd5b813567ffffffffffffffff8111156137be578182fd5b61323384828501613541565b6000602082840312156137db578081fd5b813567ffffffffffffffff8111156137f1578182fd5b61323384828501613560565b60006020828403121561380e578081fd5b5051919050565b6000815180845261382d816020860160208601613a5c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251613871818460208701613a5c565b9190910192915050565b600073ffffffffffffffffffffffffffffffffffffffff808816835260c06020840152600560c08401527f4c6561736500000000000000000000000000000000000000000000000000000060e084015261010081881660408501528660608501528560808501528060a08501526138f481850186613815565b9998505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff808816835260c06020840152600860c08401527f576974686472617700000000000000000000000000000000000000000000000060e084015261010081881660408501528660608501528560808501528060a08501526138f481850186613815565b6000602082526121c76020830184613815565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156139d4576139d4613bc0565b604052919050565b600082198211156139ef576139ef613b62565b500190565b600082613a0357613a03613b91565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613a4057613a40613b62565b500290565b600082821015613a5757613a57613b62565b500390565b60005b83811015613a77578181015183820152602001613a5f565b83811115613a86576000848401525b50505050565b600081613a9b57613a9b613b62565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600281046001821680613ad557607f821691505b60208210811415613b0f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613b4757613b47613b62565b5060010190565b600082613b5d57613b5d613b91565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea264697066735822122017426a0f1faf98a76a29ada1380176c618ed0c8f70f265dba47fa49c8efab76a64736f6c63430008020033