Contract Information
The following smart contract implements a sale contract that allows users to buy tokens with either USDT or ETH. The contract includes features such as pausing and unpausing the sale, setting a minimum token buy amount, and enabling users to claim their tokens after the sale has ended. The contract also includes functions for updating the sale parameters and withdrawing funds.
More Info
// File: @openzeppelin/contracts/security/ReentrancyGuard.sol
pragma solidity ^0.8.10;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
// File: @openzeppelin/contracts/utils/Context.sol
/**
* @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;
}
}
// File: @openzeppelin/contracts/access/Ownable.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() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
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 {
_transferOwnership(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");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// File: @openzeppelin/contracts/utils/Address.sol
/**
* @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
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://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 functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
// File: renqFinanceUpdate.sol
//SPDX-License-Identifier: MIT
interface Aggregator {
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
}
contract Sale is ReentrancyGuard, Ownable {
uint256 public presaleId;
uint256 public USDT_MULTIPLIER;
uint256 public ETH_MULTIPLIER;
address public fundReceiver;
struct Presale {
uint256 startTime;
uint256 endTime;
uint256 price;
uint256 nextStagePrice;
uint256 Sold;
uint256 tokensToSell;
uint256 UsdtHardcap;
uint256 amountRaised;
bool Active;
bool isEnableClaim;
}
struct ClaimData {
uint256 claimAt;
uint256 totalAmount;
uint256 claimedAmount;
}
IERC20Metadata public USDTInterface;
Aggregator internal aggregatorInterface;
// https://docs.chain.link/docs/ethereum-addresses/ => (ETH / USD)
mapping(uint256 => bool) public paused;
mapping(uint256 => Presale) public presale;
mapping(address => mapping(uint256 => ClaimData)) public userClaimData;
mapping(address => bool) public isExcludeMinToken;
uint256 public MinTokenTobuy;
address public SaleToken;
event PresaleCreated(
uint256 indexed _id,
uint256 _totalTokens,
uint256 _startTime,
uint256 _endTime
);
event PresaleUpdated(
bytes32 indexed key,
uint256 prevValue,
uint256 newValue,
uint256 timestamp
);
event TokensBought(
address indexed user,
uint256 indexed id,
address indexed purchaseToken,
uint256 tokensBought,
uint256 amountPaid,
uint256 timestamp
);
event TokensClaimed(
address indexed user,
uint256 indexed id,
uint256 amount,
uint256 timestamp
);
event PresaleTokenAddressUpdated(
address indexed prevValue,
address indexed newValue,
uint256 timestamp
);
event PresalePaused(uint256 indexed id, uint256 timestamp);
event PresaleUnpaused(uint256 indexed id, uint256 timestamp);
constructor(
address _oracle,
address _usdt,
address _SaleToken,
uint256 _MinTokenTobuy
) {
aggregatorInterface = Aggregator(_oracle);
SaleToken = _SaleToken;
MinTokenTobuy = _MinTokenTobuy;
USDTInterface = IERC20Metadata(_usdt);
ETH_MULTIPLIER = (10**18);
USDT_MULTIPLIER =(10**6) ;
fundReceiver = msg.sender;
}
function ChangeTokenToSell(address _token) public onlyOwner {
SaleToken = _token;
}
function EditMinTokenToBuy(uint256 _amount) public onlyOwner {
MinTokenTobuy = _amount;
}
// /**
// * @dev Creates a new presale
// * @param _price Per token price multiplied by (10**18)
// * @param _tokensToSell No of tokens to sell
// */
function createPresale(uint256 _price,uint256 _nextStagePrice, uint256 _tokensToSell, uint256 _UsdtHardcap)
external
onlyOwner
{
require(_price > 0, "Zero price");
require(_tokensToSell > 0, "Zero tokens to sell");
require(presale[presaleId].Active == false, "Previous Sale is Active");
presaleId++;
presale[presaleId] = Presale(
0,
0,
_price,
_nextStagePrice,
0,
_tokensToSell,
_UsdtHardcap,
0,
false,
false
);
emit PresaleCreated(presaleId, _tokensToSell, 0, 0);
}
function startPresale() public onlyOwner {
presale[presaleId].startTime = block.timestamp;
presale[presaleId].Active = true;
}
function endPresale() public onlyOwner {
require(
presale[presaleId].Active = true,
"This presale is already Inactive"
);
presale[presaleId].endTime = block.timestamp;
presale[presaleId].Active = false;
}
// @dev enabel Claim amount
function enableClaim(uint256 _id, bool _status)
public
checkPresaleId(_id)
onlyOwner
{
presale[_id].isEnableClaim = _status;
}
// /**
// * @dev Update a new presale
// * @param _price Per USD price should be multiplied with token decimals
// * @param _tokensToSell No of tokens to sell without denomination. If 1 million tokens to be sold then - 1_000_000 has to be passed
// */
function updatePresale(
uint256 _id,
uint256 _price,
uint256 _nextStagePrice,
uint256 _tokensToSell,
uint256 _Hardcap
) external checkPresaleId(_id) onlyOwner {
require(_price > 0, "Zero price");
require(_tokensToSell > 0, "Zero tokens to sell");
presale[_id].price = _price;
presale[_id].nextStagePrice = _nextStagePrice;
presale[_id].tokensToSell = _tokensToSell;
presale[_id].UsdtHardcap =_Hardcap;
}
/**
* @dev To update the fund receiving wallet
* @param _wallet address of wallet to update
*/
function changeFundWallet(address _wallet) external onlyOwner {
require(_wallet != address(0), "Invalid parameters");
fundReceiver = _wallet;
}
/**
* @dev To update the USDT Token address
* @param _newAddress Sale token address
*/
function changeUSDTToken(address _newAddress) external onlyOwner {
require(_newAddress != address(0), "Zero token address");
USDTInterface = IERC20Metadata(_newAddress);
}
/**
* @dev To pause the presale
* @param _id Presale id to update
*/
function pausePresale(uint256 _id) external checkPresaleId(_id) onlyOwner {
require(!paused[_id], "Already paused");
paused[_id] = true;
emit PresalePaused(_id, block.timestamp);
}
/**
* @dev To unpause the presale
* @param _id Presale id to update
*/
function unPausePresale(uint256 _id)
external
checkPresaleId(_id)
onlyOwner
{
require(paused[_id], "Not paused");
paused[_id] = false;
emit PresaleUnpaused(_id, block.timestamp);
}
/**
* @dev To get latest ethereum price in 10**18 format
*/
function getLatestPrice() public view returns (uint256) {
(, int256 price, , , ) = aggregatorInterface.latestRoundData();
price = (price * (10**10));
return uint256(price);
}
modifier checkPresaleId(uint256 _id) {
require(_id > 0 && _id <= presaleId, "Invalid presale id");
_;
}
modifier checkSaleState(uint256 _id, uint256 amount) {
require(
block.timestamp >= presale[_id].startTime &&
presale[_id].Active == true,
"Invalid time for buying"
);
require(
amount > 0 && amount <= presale[_id].tokensToSell-presale[_id].Sold,
"Invalid sale amount"
);
_;
}
function ExcludeAccouctFromMinBuy(address _user, bool _status)
external
onlyOwner
{
isExcludeMinToken[_user] = _status;
}
/**
* @dev To buy into a presale using USDT
* @param usdAmount Usdt amount to buy tokens
*/
function buyWithUSDT(uint256 usdAmount)
external
checkPresaleId(presaleId)
checkSaleState(presaleId, usdtToTokens(presaleId, usdAmount))
returns (bool)
{
require(!paused[presaleId], "Presale paused");
require(presale[presaleId].Active == true, "Presale is not active yet");
require(presale[presaleId].amountRaised + usdAmount <= presale[presaleId].UsdtHardcap,
"Amount should be less than leftHardcap");
uint256 tokens = usdtToTokens(presaleId, usdAmount);
presale[presaleId].Sold += tokens;
presale[presaleId].amountRaised += usdAmount;
if (isExcludeMinToken[msg.sender] == false) {
require(tokens >= MinTokenTobuy, "Less than min amount");
}
if (userClaimData[_msgSender()][presaleId].totalAmount > 0) {
userClaimData[_msgSender()][presaleId].totalAmount += tokens;
} else {
userClaimData[_msgSender()][presaleId] = ClaimData(0, tokens, 0);
}
uint256 ourAllowance = USDTInterface.allowance(
_msgSender(),
address(this)
);
require(usdAmount <= ourAllowance, "Make sure to add enough allowance");
(bool success, ) = address(USDTInterface).call(
abi.encodeWithSignature(
"transferFrom(address,address,uint256)",
_msgSender(),
fundReceiver,
usdAmount
)
);
require(success, "Token payment failed");
emit TokensBought(
_msgSender(),
presaleId,
address(USDTInterface),
tokens,
usdAmount,
block.timestamp
);
return true;
}
/**
* @dev To buy into a presale using ETH
*/
function buyWithEth()
external
payable
checkPresaleId(presaleId)
checkSaleState(presaleId, ethToTokens(presaleId, msg.value))
nonReentrant
returns (bool)
{
uint256 usdAmount = (msg.value * getLatestPrice() * USDT_MULTIPLIER) / (ETH_MULTIPLIER * ETH_MULTIPLIER);
require(presale[presaleId].amountRaised + usdAmount <= presale[presaleId].UsdtHardcap,
"Amount should be less than leftHardcap");
require(!paused[presaleId], "Presale paused");
require(presale[presaleId].Active == true, "Presale is not active yet");
uint256 tokens = usdtToTokens(presaleId, usdAmount);
if (isExcludeMinToken[msg.sender] == false) {
require(tokens >= MinTokenTobuy, "Insufficient amount!");
}
presale[presaleId].Sold += tokens;
presale[presaleId].amountRaised += usdAmount;
if (userClaimData[_msgSender()][presaleId].totalAmount > 0) {
userClaimData[_msgSender()][presaleId].totalAmount += tokens;
} else {
userClaimData[_msgSender()][presaleId] = ClaimData(
0, // Last claimed at
tokens, // total tokens to be claimed
0 // claimed amount
);
}
sendValue(payable(fundReceiver), msg.value);
emit TokensBought(
_msgSender(),
presaleId,
address(0),
tokens,
msg.value,
block.timestamp
);
return true;
}
/**
* @dev Helper funtion to get ETH price for given amount
* @param _id Presale id
* @param amount No of tokens to buy
*/
function ethBuyHelper(uint256 _id, uint256 amount)
external
view
checkPresaleId(_id)
returns (uint256 ethAmount)
{
uint256 usdPrice = (amount * presale[_id].price);
ethAmount = (usdPrice * ETH_MULTIPLIER) / (getLatestPrice() * 10**IERC20Metadata(SaleToken).decimals());
}
/**
* @dev Helper funtion to get USDT price for given amount
* @param _id Presale id
* @param amount No of tokens to buy
*/
function usdtBuyHelper(uint256 _id, uint256 amount)
external
view
checkPresaleId(_id)
returns (uint256 usdPrice)
{
usdPrice = (amount * presale[_id].price) / 10**IERC20Metadata(SaleToken).decimals();
}
/**
* @dev Helper funtion to get tokens for eth amount
* @param _id Presale id
* @param amount No of eth
*/
function ethToTokens(uint256 _id, uint256 amount)
public
view
returns (uint256 _tokens)
{
uint256 usdAmount = amount * getLatestPrice() * USDT_MULTIPLIER / (ETH_MULTIPLIER * ETH_MULTIPLIER);
_tokens = usdtToTokens(_id, usdAmount);
}
/**
* @dev Helper funtion to get tokens for given usdt amount
* @param _id Presale id
* @param amount No of usdt
*/
function usdtToTokens(uint256 _id, uint256 amount)
public
view
checkPresaleId(_id)
returns (uint256 _tokens)
{
_tokens = (amount * presale[_id].price) / USDT_MULTIPLIER;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Low balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "ETH Payment failed");
}
function unlockToken(uint256 _id)
public
view
checkPresaleId(_id)
onlyOwner
{
require(
block.timestamp >= presale[_id].endTime,
"You can only unlock on finalize"
);
}
/**
* @dev Helper funtion to get claimable tokens for a given presale.
* @param user User address
* @param _id Presale id
*/
function claimableAmount(address user, uint256 _id)
public
view
checkPresaleId(_id)
returns (uint256)
{
ClaimData memory _user = userClaimData[user][_id];
require(_user.totalAmount > 0, "Nothing to claim");
uint256 amount = _user.totalAmount - _user.claimedAmount;
require(amount > 0, "Already claimed");
return amount;
}
/**
* @dev To claim token from a presale
* @param _id Presale id
*/
function claimAmount(uint256 _id)
public
checkPresaleId(_id)
returns (bool)
{
uint256 amount = claimableAmount(msg.sender, _id);
require(amount > 0, "Zero claim amount");
require(
SaleToken != address(0),
"Presale token address not set"
);
require(
amount <= IERC20(SaleToken).balanceOf(address(this)),
"Not enough tokens in the contract"
);
require((presale[_id].isEnableClaim == true), "Claim is not enable");
userClaimData[msg.sender][_id].claimAt = block.timestamp;
userClaimData[msg.sender][_id].claimedAmount += amount;
bool status = IERC20(SaleToken).transfer(msg.sender, amount);
require(status, "Token transfer failed");
emit TokensClaimed(msg.sender, _id, amount, block.timestamp);
return true;
}
/**
* @dev To claim tokens from a multiple presale
* @param _id Presale id
*/
function claimMultiple(uint256[] calldata _id) external returns (bool) {
require(_id.length > 0, "Zero ID length");
for (uint256 i; i < _id.length; i++) {
require(claimAmount(_id[i]), "Claim failed");
}
return true;
}
function WithdrawTokens(address _token, uint256 amount) external onlyOwner {
IERC20(_token).transfer(fundReceiver, amount);
}
function WithdrawContractFunds(uint256 amount) external onlyOwner {
sendValue(payable(fundReceiver), amount);
}
}
[{"inputs":[{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"address","name":"_usdt","type":"address"},{"internalType":"address","name":"_SaleToken","type":"address"},{"internalType":"uint256","name":"_MinTokenTobuy","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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":true,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_totalTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_endTime","type":"uint256"}],"name":"PresaleCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PresalePaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevValue","type":"address"},{"indexed":true,"internalType":"address","name":"newValue","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PresaleTokenAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PresaleUnpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"prevValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PresaleUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"purchaseToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokensBought","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountPaid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TokensBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TokensClaimed","type":"event"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"ChangeTokenToSell","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ETH_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"EditMinTokenToBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"ExcludeAccouctFromMinBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"MinTokenTobuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SaleToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDTInterface","outputs":[{"internalType":"contract IERC20Metadata","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDT_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawContractFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyWithEth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdAmount","type":"uint256"}],"name":"buyWithUSDT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"changeFundWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAddress","type":"address"}],"name":"changeUSDTToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"claimAmount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_id","type":"uint256[]"}],"name":"claimMultiple","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"claimableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_nextStagePrice","type":"uint256"},{"internalType":"uint256","name":"_tokensToSell","type":"uint256"},{"internalType":"uint256","name":"_UsdtHardcap","type":"uint256"}],"name":"createPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"enableClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ethBuyHelper","outputs":[{"internalType":"uint256","name":"ethAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ethToTokens","outputs":[{"internalType":"uint256","name":"_tokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExcludeMinToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"pausePresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"presale","outputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"nextStagePrice","type":"uint256"},{"internalType":"uint256","name":"Sold","type":"uint256"},{"internalType":"uint256","name":"tokensToSell","type":"uint256"},{"internalType":"uint256","name":"UsdtHardcap","type":"uint256"},{"internalType":"uint256","name":"amountRaised","type":"uint256"},{"internalType":"bool","name":"Active","type":"bool"},{"internalType":"bool","name":"isEnableClaim","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"unPausePresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"unlockToken","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_nextStagePrice","type":"uint256"},{"internalType":"uint256","name":"_tokensToSell","type":"uint256"},{"internalType":"uint256","name":"_Hardcap","type":"uint256"}],"name":"updatePresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"usdtBuyHelper","outputs":[{"internalType":"uint256","name":"usdPrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"usdtToTokens","outputs":[{"internalType":"uint256","name":"_tokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userClaimData","outputs":[{"internalType":"uint256","name":"claimAt","type":"uint256"},{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"claimedAmount","type":"uint256"}],"stateMutability":"view","type":"function"}]
[{"inputs":[{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"address","name":"_usdt","type":"address"},{"internalType":"address","name":"_SaleToken","type":"address"},{"internalType":"uint256","name":"_MinTokenTobuy","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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":true,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_totalTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_endTime","type":"uint256"}],"name":"PresaleCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PresalePaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevValue","type":"address"},{"indexed":true,"internalType":"address","name":"newValue","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PresaleTokenAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PresaleUnpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"prevValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PresaleUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"purchaseToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokensBought","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountPaid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TokensBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TokensClaimed","type":"event"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"ChangeTokenToSell","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ETH_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"EditMinTokenToBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"ExcludeAccouctFromMinBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"MinTokenTobuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SaleToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDTInterface","outputs":[{"internalType":"contract IERC20Metadata","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDT_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawContractFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyWithEth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdAmount","type":"uint256"}],"name":"buyWithUSDT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"changeFundWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAddress","type":"address"}],"name":"changeUSDTToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"claimAmount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_id","type":"uint256[]"}],"name":"claimMultiple","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"claimableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_nextStagePrice","type":"uint256"},{"internalType":"uint256","name":"_tokensToSell","type":"uint256"},{"internalType":"uint256","name":"_UsdtHardcap","type":"uint256"}],"name":"createPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"enableClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ethBuyHelper","outputs":[{"internalType":"uint256","name":"ethAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ethToTokens","outputs":[{"internalType":"uint256","name":"_tokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExcludeMinToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"pausePresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"presale","outputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"nextStagePrice","type":"uint256"},{"internalType":"uint256","name":"Sold","type":"uint256"},{"internalType":"uint256","name":"tokensToSell","type":"uint256"},{"internalType":"uint256","name":"UsdtHardcap","type":"uint256"},{"internalType":"uint256","name":"amountRaised","type":"uint256"},{"internalType":"bool","name":"Active","type":"bool"},{"internalType":"bool","name":"isEnableClaim","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"unPausePresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"unlockToken","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_nextStagePrice","type":"uint256"},{"internalType":"uint256","name":"_tokensToSell","type":"uint256"},{"internalType":"uint256","name":"_Hardcap","type":"uint256"}],"name":"updatePresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"usdtBuyHelper","outputs":[{"internalType":"uint256","name":"usdPrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"usdtToTokens","outputs":[{"internalType":"uint256","name":"_tokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userClaimData","outputs":[{"internalType":"uint256","name":"claimAt","type":"uint256"},{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"claimedAmount","type":"uint256"}],"stateMutability":"view","type":"function"}]
60806040523480156200001157600080fd5b506040516200522a3803806200522a833981810160405281019062000037919062000300565b60016000819055506200005f620000536200018d60201b60201c565b6200019560201b60201c565b83600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600c8190555082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550670de0b6b3a7640000600481905550620f424060038190555033600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000372565b600033905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200028d8262000260565b9050919050565b6200029f8162000280565b8114620002ab57600080fd5b50565b600081519050620002bf8162000294565b92915050565b6000819050919050565b620002da81620002c5565b8114620002e657600080fd5b50565b600081519050620002fa81620002cf565b92915050565b600080600080608085870312156200031d576200031c6200025b565b5b60006200032d87828801620002ae565b94505060206200034087828801620002ae565b93505060406200035387828801620002ae565b92505060606200036687828801620002e9565b91505092959194509250565b614ea880620003826000396000f3fe60806040526004361061022f5760003560e01c80638561c3151161012e578063d01608c1116100ab578063f2fde38b1161006f578063f2fde38b14610846578063f309fed91461086f578063f597573f146108ac578063fb4aa0a1146108d7578063fe9f676e146109025761022f565b8063d01608c11461075a578063d099850a14610783578063dd2e0ac0146107ac578063e18e84f9146107d5578063e6ab1434146108005761022f565b80639752f3cb116100f25780639752f3cb14610675578063a43be57b1461069e578063a7c60160146106b5578063b04c7346146106f2578063cd1704a8146107315761022f565b80638561c3151461058e5780638d79e66d146105b75780638da5cb5b146105e25780638e15f4731461060d5780639051cce9146106385761022f565b806339764363116101bc5780636fb4adff116101805780636fb4adff146104a9578063715018a6146104d2578063718a1962146104e957806379b8d93814610526578063833cde52146105635761022f565b806339764363146103d857806348bf4fcf146104035780634a6413f71461042e578063582b572314610457578063680f2e4f146104805761022f565b80630fbfcf37116102035780630fbfcf37146102da57806311b5444f146103035780631ed0c954146103215780632127fe041461035e57806323b221a01461039b5761022f565b8062dde10e1461023457806303fcd9ac1461027157806304c98b2b1461029a5780630ec809a8146102b1575b600080fd5b34801561024057600080fd5b5061025b60048036038101906102569190613324565b61093f565b604051610268919061336c565b60405180910390f35b34801561027d57600080fd5b5061029860048036038101906102939190613411565b61095f565b005b3480156102a657600080fd5b506102af6109c2565b005b3480156102bd57600080fd5b506102d860048036038101906102d39190613451565b610a1a565b005b3480156102e657600080fd5b5061030160048036038101906102fc919061347e565b610a66565b005b61030b610af3565b604051610318919061336c565b60405180910390f35b34801561032d57600080fd5b5061034860048036038101906103439190613451565b611132565b604051610355919061336c565b60405180910390f35b34801561036a57600080fd5b50610385600480360381019061038091906134be565b611152565b604051610392919061350d565b60405180910390f35b3480156103a757600080fd5b506103c260048036038101906103bd9190613324565b61129d565b6040516103cf919061336c565b60405180910390f35b3480156103e457600080fd5b506103ed61171e565b6040516103fa919061350d565b60405180910390f35b34801561040f57600080fd5b50610418611724565b604051610425919061350d565b60405180910390f35b34801561043a57600080fd5b5061045560048036038101906104509190613324565b61172a565b005b34801561046357600080fd5b5061047e60048036038101906104799190613324565b61184d565b005b34801561048c57600080fd5b506104a760048036038101906104a29190613528565b611884565b005b3480156104b557600080fd5b506104d060048036038101906104cb9190613451565b611931565b005b3480156104de57600080fd5b506104e76119ec565b005b3480156104f557600080fd5b50610510600480360381019061050b91906134be565b611a00565b60405161051d919061350d565b60405180910390f35b34801561053257600080fd5b5061054d60048036038101906105489190613528565b611a52565b60405161055a919061350d565b60405180910390f35b34801561056f57600080fd5b50610578611bd1565b6040516105859190613577565b60405180910390f35b34801561059a57600080fd5b506105b560048036038101906105b09190613451565b611bf7565b005b3480156105c357600080fd5b506105cc611cb2565b6040516105d9919061350d565b60405180910390f35b3480156105ee57600080fd5b506105f7611cb8565b6040516106049190613577565b60405180910390f35b34801561061957600080fd5b50610622611ce2565b60405161062f919061350d565b60405180910390f35b34801561064457600080fd5b5061065f600480360381019061065a91906135f7565b611d96565b60405161066c919061336c565b60405180910390f35b34801561068157600080fd5b5061069c60048036038101906106979190613644565b611e6a565b005b3480156106aa57600080fd5b506106b3611fbe565b005b3480156106c157600080fd5b506106dc60048036038101906106d79190613324565b612085565b6040516106e9919061336c565b60405180910390f35b3480156106fe57600080fd5b5061071960048036038101906107149190613528565b6128e3565b604051610728939291906136bf565b60405180910390f35b34801561073d57600080fd5b5061075860048036038101906107539190613324565b61291a565b005b34801561076657600080fd5b50610781600480360381019061077c9190613324565b61292c565b005b34801561078f57600080fd5b506107aa60048036038101906107a591906136f6565b612a4e565b005b3480156107b857600080fd5b506107d360048036038101906107ce9190613324565b612c9f565b005b3480156107e157600080fd5b506107ea612d56565b6040516107f7919061350d565b60405180910390f35b34801561080c57600080fd5b5061082760048036038101906108229190613324565b612d5c565b60405161083d9a9998979695949392919061375d565b60405180910390f35b34801561085257600080fd5b5061086d60048036038101906108689190613451565b612dca565b005b34801561087b57600080fd5b50610896600480360381019061089191906134be565b612e4d565b6040516108a3919061350d565b60405180910390f35b3480156108b857600080fd5b506108c1612ed9565b6040516108ce9190613858565b60405180910390f35b3480156108e357600080fd5b506108ec612eff565b6040516108f99190613577565b60405180910390f35b34801561090e57600080fd5b50610929600480360381019061092491906134be565b612f25565b604051610936919061350d565b60405180910390f35b60086020528060005260406000206000915054906101000a900460ff1681565b61096761304b565b80600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6109ca61304b565b4260096000600254815260200190815260200160002060000181905550600160096000600254815260200190815260200160002060080160006101000a81548160ff021916908315150217905550565b610a2261304b565b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b81600081118015610a7957506002548111155b610ab8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aaf906138d0565b60405180910390fd5b610ac061304b565b816009600085815260200190815260200160002060080160016101000a81548160ff021916908315150217905550505050565b6000600254600081118015610b0a57506002548111155b610b49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b40906138d0565b60405180910390fd5b600254610b5860025434611a00565b60096000838152602001908152602001600020600001544210158015610ba55750600115156009600084815260200190815260200160002060080160009054906101000a900460ff161515145b610be4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bdb9061393c565b60405180910390fd5b600081118015610c2b575060096000838152602001908152602001600020600401546009600084815260200190815260200160002060050154610c27919061398b565b8111155b610c6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6190613a0b565b60405180910390fd5b610c726130c9565b6000600454600454610c849190613a2b565b600354610c8f611ce2565b34610c9a9190613a2b565b610ca49190613a2b565b610cae9190613a9c565b9050600960006002548152602001908152602001600020600601548160096000600254815260200190815260200160002060070154610ced9190613acd565b1115610d2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2590613b73565b60405180910390fd5b60086000600254815260200190815260200160002060009054906101000a900460ff1615610d91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8890613bdf565b60405180910390fd5b6001151560096000600254815260200190815260200160002060080160009054906101000a900460ff16151514610dfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df490613c4b565b60405180910390fd5b6000610e0b60025483612e4d565b905060001515600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151503610eab57600c54811015610eaa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea190613cb7565b60405180910390fd5b5b806009600060025481526020019081526020016000206004016000828254610ed39190613acd565b92505081905550816009600060025481526020019081526020016000206007016000828254610f029190613acd565b925050819055506000600a6000610f17613118565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006002548152602001908152602001600020600101541115610fe65780600a6000610f7b613118565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600060025481526020019081526020016000206001016000828254610fda9190613acd565b9250508190555061107e565b6040518060600160405280600081526020018281526020016000815250600a600061100f613118565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600060025481526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050505b6110aa600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1634613120565b600073ffffffffffffffffffffffffffffffffffffffff166002546110cd613118565b73ffffffffffffffffffffffffffffffffffffffff167f4d8aead3491b7eba4b5c7a65fc17e493b9e63f9e433522fc5f6a85a168fc9d36843442604051611116939291906136bf565b60405180910390a460019550505061112c613214565b50505090565b600b6020528060005260406000206000915054906101000a900460ff1681565b60008260008111801561116757506002548111155b6111a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119d906138d0565b60405180910390fd5b60006009600086815260200190815260200160002060020154846111ca9190613a2b565b9050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611239573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125d9190613d10565b600a6112699190613e70565b611271611ce2565b61127b9190613a2b565b600454826112899190613a2b565b6112939190613a9c565b9250505092915050565b6000816000811180156112b257506002548111155b6112f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e8906138d0565b60405180910390fd5b60006112fd3385611a52565b905060008111611342576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133990613f07565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036113d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ca90613f73565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161142e9190613577565b602060405180830381865afa15801561144b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146f9190613fa8565b8111156114b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a890614047565b60405180910390fd5b600115156009600086815260200190815260200160002060080160019054906101000a900460ff1615151461151b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611512906140b3565b60405180910390fd5b42600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008681526020019081526020016000206000018190555080600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600086815260200190815260200160002060020160008282546115d69190613acd565b925050819055506000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b815260040161163c9291906140d3565b6020604051808303816000875af115801561165b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167f9190614111565b9050806116c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b89061418a565b60405180910390fd5b843373ffffffffffffffffffffffffffffffffffffffff167fe49649ad7d04a14b0d2a43dae89f207c0822143ff6f88a6480e88907e4e5c548844260405161170a9291906141aa565b60405180910390a360019350505050919050565b60045481565b60035481565b8060008111801561173d57506002548111155b61177c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611773906138d0565b60405180910390fd5b61178461304b565b6008600083815260200190815260200160002060009054906101000a900460ff16156117e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117dc9061421f565b60405180910390fd5b60016008600084815260200190815260200160002060006101000a81548160ff021916908315150217905550817f927e6cd2dce24f32508868820cdc35f09d9de0f4b44e945114110125196fba9f42604051611841919061350d565b60405180910390a25050565b61185561304b565b611881600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682613120565b50565b61188c61304b565b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b81526004016118e99291906140d3565b6020604051808303816000875af1158015611908573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192c9190614111565b505050565b61193961304b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036119a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199f9061428b565b60405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6119f461304b565b6119fe600061321e565b565b600080600454600454611a139190613a2b565b600354611a1e611ce2565b85611a299190613a2b565b611a339190613a2b565b611a3d9190613a9c565b9050611a498482612e4d565b91505092915050565b600081600081118015611a6757506002548111155b611aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9d906138d0565b60405180910390fd5b6000600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000858152602001908152602001600020604051806060016040529081600082015481526020016001820154815260200160028201548152505090506000816020015111611b6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b61906142f7565b60405180910390fd5b600081604001518260200151611b80919061398b565b905060008111611bc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bbc90614363565b60405180910390fd5b80935050505092915050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611bff61304b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611c6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c65906143cf565b60405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600c5481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611d52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d769190614467565b5050509150506402540be40081611d8d91906144e2565b90508091505090565b6000808383905011611ddd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd4906145a6565b60405180910390fd5b60005b83839050811015611e5f57611e0d848483818110611e0157611e006145c6565b5b9050602002013561129d565b611e4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e4390614641565b60405180910390fd5b8080611e5790614661565b915050611de0565b506001905092915050565b84600081118015611e7d57506002548111155b611ebc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eb3906138d0565b60405180910390fd5b611ec461304b565b60008511611f07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611efe906146f5565b60405180910390fd5b60008311611f4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4190614761565b60405180910390fd5b846009600088815260200190815260200160002060020181905550836009600088815260200190815260200160002060030181905550826009600088815260200190815260200160002060050181905550816009600088815260200190815260200160002060060181905550505050505050565b611fc661304b565b600160096000600254815260200190815260200160002060080160006101000a81548160ff0219169083151502179055612035576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161202c906147cd565b60405180910390fd5b4260096000600254815260200190815260200160002060010181905550600060096000600254815260200190815260200160002060080160006101000a81548160ff021916908315150217905550565b600060025460008111801561209c57506002548111155b6120db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d2906138d0565b60405180910390fd5b6002546120ea60025485612e4d565b600960008381526020019081526020016000206000015442101580156121375750600115156009600084815260200190815260200160002060080160009054906101000a900460ff161515145b612176576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216d9061393c565b60405180910390fd5b6000811180156121bd5750600960008381526020019081526020016000206004015460096000848152602001908152602001600020600501546121b9919061398b565b8111155b6121fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f390613a0b565b60405180910390fd5b60086000600254815260200190815260200160002060009054906101000a900460ff161561225f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225690613bdf565b60405180910390fd5b6001151560096000600254815260200190815260200160002060080160009054906101000a900460ff161515146122cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122c290613c4b565b60405180910390fd5b6009600060025481526020019081526020016000206006015485600960006002548152602001908152602001600020600701546123089190613acd565b1115612349576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234090613b73565b60405180910390fd5b600061235760025487612e4d565b90508060096000600254815260200190815260200160002060040160008282546123819190613acd565b925050819055508560096000600254815260200190815260200160002060070160008282546123b09190613acd565b9250508190555060001515600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615150361245557600c54811015612454576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161244b90614839565b60405180910390fd5b5b6000600a6000612463613118565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600060025481526020019081526020016000206001015411156125325780600a60006124c7613118565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600254815260200190815260200160002060010160008282546125269190613acd565b925050819055506125ca565b6040518060600160405280600081526020018281526020016000815250600a600061255b613118565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600060025481526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050505b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e612612613118565b306040518363ffffffff1660e01b8152600401612630929190614859565b602060405180830381865afa15801561264d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126719190613fa8565b9050808711156126b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126ad906148f4565b60405180910390fd5b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166126f9613118565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a60405160240161272f93929190614914565b6040516020818303038152906040527f23b872dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516127b991906149bc565b6000604051808303816000865af19150503d80600081146127f6576040519150601f19603f3d011682016040523d82523d6000602084013e6127fb565b606091505b505090508061283f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161283690614a1f565b60405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600254612883613118565b73ffffffffffffffffffffffffffffffffffffffff167f4d8aead3491b7eba4b5c7a65fc17e493b9e63f9e433522fc5f6a85a168fc9d36868c426040516128cc939291906136bf565b60405180910390a460019650505050505050919050565b600a602052816000526040600020602052806000526040600020600091509150508060000154908060010154908060020154905083565b61292261304b565b80600c8190555050565b8060008111801561293f57506002548111155b61297e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612975906138d0565b60405180910390fd5b61298661304b565b6008600083815260200190815260200160002060009054906101000a900460ff166129e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129dd90614a8b565b60405180910390fd5b60006008600084815260200190815260200160002060006101000a81548160ff021916908315150217905550817ff608654a6d8e1785594639dd55babb61d7ae157382015f904a24224e50333b1d42604051612a42919061350d565b60405180910390a25050565b612a5661304b565b60008411612a99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a90906146f5565b60405180910390fd5b60008211612adc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ad390614761565b60405180910390fd5b6000151560096000600254815260200190815260200160002060080160009054906101000a900460ff16151514612b48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3f90614af7565b60405180910390fd5b60026000815480929190612b5b90614661565b91905055506040518061014001604052806000815260200160008152602001858152602001848152602001600081526020018381526020018281526020016000815260200160001515815260200160001515815250600960006002548152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff0219169083151502179055506101208201518160080160016101000a81548160ff0219169083151502179055509050506002547f6a00651728a92841411081673eaa4eddbed06d102a590e050c22def40d4dd0b883600080604051612c9193929190614b52565b60405180910390a250505050565b80600081118015612cb257506002548111155b612cf1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ce8906138d0565b60405180910390fd5b612cf961304b565b6009600083815260200190815260200160002060010154421015612d52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4990614bd5565b60405180910390fd5b5050565b60025481565b60096020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050154908060060154908060070154908060080160009054906101000a900460ff16908060080160019054906101000a900460ff1690508a565b612dd261304b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612e41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e3890614c67565b60405180910390fd5b612e4a8161321e565b50565b600082600081118015612e6257506002548111155b612ea1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e98906138d0565b60405180910390fd5b600354600960008681526020019081526020016000206002015484612ec69190613a2b565b612ed09190613a9c565b91505092915050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600082600081118015612f3a57506002548111155b612f79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f70906138d0565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015612fe6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061300a9190613d10565b600a6130169190613e70565b6009600086815260200190815260200160002060020154846130389190613a2b565b6130429190613a9c565b91505092915050565b613053613118565b73ffffffffffffffffffffffffffffffffffffffff16613071611cb8565b73ffffffffffffffffffffffffffffffffffffffff16146130c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130be90614cd3565b60405180910390fd5b565b60026000540361310e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161310590614d3f565b60405180910390fd5b6002600081905550565b600033905090565b80471015613163576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161315a90614dab565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161318990614df1565b60006040518083038185875af1925050503d80600081146131c6576040519150601f19603f3d011682016040523d82523d6000602084013e6131cb565b606091505b505090508061320f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161320690614e52565b60405180910390fd5b505050565b6001600081905550565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600080fd5b6000819050919050565b613301816132ee565b811461330c57600080fd5b50565b60008135905061331e816132f8565b92915050565b60006020828403121561333a576133396132e4565b5b60006133488482850161330f565b91505092915050565b60008115159050919050565b61336681613351565b82525050565b6000602082019050613381600083018461335d565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006133b282613387565b9050919050565b6133c2816133a7565b81146133cd57600080fd5b50565b6000813590506133df816133b9565b92915050565b6133ee81613351565b81146133f957600080fd5b50565b60008135905061340b816133e5565b92915050565b60008060408385031215613428576134276132e4565b5b6000613436858286016133d0565b9250506020613447858286016133fc565b9150509250929050565b600060208284031215613467576134666132e4565b5b6000613475848285016133d0565b91505092915050565b60008060408385031215613495576134946132e4565b5b60006134a38582860161330f565b92505060206134b4858286016133fc565b9150509250929050565b600080604083850312156134d5576134d46132e4565b5b60006134e38582860161330f565b92505060206134f48582860161330f565b9150509250929050565b613507816132ee565b82525050565b600060208201905061352260008301846134fe565b92915050565b6000806040838503121561353f5761353e6132e4565b5b600061354d858286016133d0565b925050602061355e8582860161330f565b9150509250929050565b613571816133a7565b82525050565b600060208201905061358c6000830184613568565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126135b7576135b6613592565b5b8235905067ffffffffffffffff8111156135d4576135d3613597565b5b6020830191508360208202830111156135f0576135ef61359c565b5b9250929050565b6000806020838503121561360e5761360d6132e4565b5b600083013567ffffffffffffffff81111561362c5761362b6132e9565b5b613638858286016135a1565b92509250509250929050565b600080600080600060a086880312156136605761365f6132e4565b5b600061366e8882890161330f565b955050602061367f8882890161330f565b94505060406136908882890161330f565b93505060606136a18882890161330f565b92505060806136b28882890161330f565b9150509295509295909350565b60006060820190506136d460008301866134fe565b6136e160208301856134fe565b6136ee60408301846134fe565b949350505050565b600080600080608085870312156137105761370f6132e4565b5b600061371e8782880161330f565b945050602061372f8782880161330f565b93505060406137408782880161330f565b92505060606137518782880161330f565b91505092959194509250565b600061014082019050613773600083018d6134fe565b613780602083018c6134fe565b61378d604083018b6134fe565b61379a606083018a6134fe565b6137a760808301896134fe565b6137b460a08301886134fe565b6137c160c08301876134fe565b6137ce60e08301866134fe565b6137dc61010083018561335d565b6137ea61012083018461335d565b9b9a5050505050505050505050565b6000819050919050565b600061381e61381961381484613387565b6137f9565b613387565b9050919050565b600061383082613803565b9050919050565b600061384282613825565b9050919050565b61385281613837565b82525050565b600060208201905061386d6000830184613849565b92915050565b600082825260208201905092915050565b7f496e76616c69642070726573616c652069640000000000000000000000000000600082015250565b60006138ba601283613873565b91506138c582613884565b602082019050919050565b600060208201905081810360008301526138e9816138ad565b9050919050565b7f496e76616c69642074696d6520666f7220627579696e67000000000000000000600082015250565b6000613926601783613873565b9150613931826138f0565b602082019050919050565b6000602082019050818103600083015261395581613919565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613996826132ee565b91506139a1836132ee565b92508282039050818111156139b9576139b861395c565b5b92915050565b7f496e76616c69642073616c6520616d6f756e7400000000000000000000000000600082015250565b60006139f5601383613873565b9150613a00826139bf565b602082019050919050565b60006020820190508181036000830152613a24816139e8565b9050919050565b6000613a36826132ee565b9150613a41836132ee565b9250828202613a4f816132ee565b91508282048414831517613a6657613a6561395c565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613aa7826132ee565b9150613ab2836132ee565b925082613ac257613ac1613a6d565b5b828204905092915050565b6000613ad8826132ee565b9150613ae3836132ee565b9250828201905080821115613afb57613afa61395c565b5b92915050565b7f416d6f756e742073686f756c64206265206c657373207468616e206c6566744860008201527f6172646361700000000000000000000000000000000000000000000000000000602082015250565b6000613b5d602683613873565b9150613b6882613b01565b604082019050919050565b60006020820190508181036000830152613b8c81613b50565b9050919050565b7f50726573616c6520706175736564000000000000000000000000000000000000600082015250565b6000613bc9600e83613873565b9150613bd482613b93565b602082019050919050565b60006020820190508181036000830152613bf881613bbc565b9050919050565b7f50726573616c65206973206e6f74206163746976652079657400000000000000600082015250565b6000613c35601983613873565b9150613c4082613bff565b602082019050919050565b60006020820190508181036000830152613c6481613c28565b9050919050565b7f496e73756666696369656e7420616d6f756e7421000000000000000000000000600082015250565b6000613ca1601483613873565b9150613cac82613c6b565b602082019050919050565b60006020820190508181036000830152613cd081613c94565b9050919050565b600060ff82169050919050565b613ced81613cd7565b8114613cf857600080fd5b50565b600081519050613d0a81613ce4565b92915050565b600060208284031215613d2657613d256132e4565b5b6000613d3484828501613cfb565b91505092915050565b60008160011c9050919050565b6000808291508390505b6001851115613d9457808604811115613d7057613d6f61395c565b5b6001851615613d7f5780820291505b8081029050613d8d85613d3d565b9450613d54565b94509492505050565b600082613dad5760019050613e69565b81613dbb5760009050613e69565b8160018114613dd15760028114613ddb57613e0a565b6001915050613e69565b60ff841115613ded57613dec61395c565b5b8360020a915084821115613e0457613e0361395c565b5b50613e69565b5060208310610133831016604e8410600b8410161715613e3f5782820a905083811115613e3a57613e3961395c565b5b613e69565b613e4c8484846001613d4a565b92509050818404811115613e6357613e6261395c565b5b81810290505b9392505050565b6000613e7b826132ee565b9150613e8683613cd7565b9250613eb37fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484613d9d565b905092915050565b7f5a65726f20636c61696d20616d6f756e74000000000000000000000000000000600082015250565b6000613ef1601183613873565b9150613efc82613ebb565b602082019050919050565b60006020820190508181036000830152613f2081613ee4565b9050919050565b7f50726573616c6520746f6b656e2061646472657373206e6f7420736574000000600082015250565b6000613f5d601d83613873565b9150613f6882613f27565b602082019050919050565b60006020820190508181036000830152613f8c81613f50565b9050919050565b600081519050613fa2816132f8565b92915050565b600060208284031215613fbe57613fbd6132e4565b5b6000613fcc84828501613f93565b91505092915050565b7f4e6f7420656e6f75676820746f6b656e7320696e2074686520636f6e7472616360008201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b6000614031602183613873565b915061403c82613fd5565b604082019050919050565b6000602082019050818103600083015261406081614024565b9050919050565b7f436c61696d206973206e6f7420656e61626c6500000000000000000000000000600082015250565b600061409d601383613873565b91506140a882614067565b602082019050919050565b600060208201905081810360008301526140cc81614090565b9050919050565b60006040820190506140e86000830185613568565b6140f560208301846134fe565b9392505050565b60008151905061410b816133e5565b92915050565b600060208284031215614127576141266132e4565b5b6000614135848285016140fc565b91505092915050565b7f546f6b656e207472616e73666572206661696c65640000000000000000000000600082015250565b6000614174601583613873565b915061417f8261413e565b602082019050919050565b600060208201905081810360008301526141a381614167565b9050919050565b60006040820190506141bf60008301856134fe565b6141cc60208301846134fe565b9392505050565b7f416c726561647920706175736564000000000000000000000000000000000000600082015250565b6000614209600e83613873565b9150614214826141d3565b602082019050919050565b60006020820190508181036000830152614238816141fc565b9050919050565b7f496e76616c696420706172616d65746572730000000000000000000000000000600082015250565b6000614275601283613873565b91506142808261423f565b602082019050919050565b600060208201905081810360008301526142a481614268565b9050919050565b7f4e6f7468696e6720746f20636c61696d00000000000000000000000000000000600082015250565b60006142e1601083613873565b91506142ec826142ab565b602082019050919050565b60006020820190508181036000830152614310816142d4565b9050919050565b7f416c726561647920636c61696d65640000000000000000000000000000000000600082015250565b600061434d600f83613873565b915061435882614317565b602082019050919050565b6000602082019050818103600083015261437c81614340565b9050919050565b7f5a65726f20746f6b656e20616464726573730000000000000000000000000000600082015250565b60006143b9601283613873565b91506143c482614383565b602082019050919050565b600060208201905081810360008301526143e8816143ac565b9050919050565b600069ffffffffffffffffffff82169050919050565b61440e816143ef565b811461441957600080fd5b50565b60008151905061442b81614405565b92915050565b6000819050919050565b61444481614431565b811461444f57600080fd5b50565b6000815190506144618161443b565b92915050565b600080600080600060a08688031215614483576144826132e4565b5b60006144918882890161441c565b95505060206144a288828901614452565b94505060406144b388828901613f93565b93505060606144c488828901613f93565b92505060806144d58882890161441c565b9150509295509295909350565b60006144ed82614431565b91506144f883614431565b925082820261450681614431565b91507f8000000000000000000000000000000000000000000000000000000000000000841460008412161561453e5761453d61395c565b5b82820584148315176145535761455261395c565b5b5092915050565b7f5a65726f204944206c656e677468000000000000000000000000000000000000600082015250565b6000614590600e83613873565b915061459b8261455a565b602082019050919050565b600060208201905081810360008301526145bf81614583565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f436c61696d206661696c65640000000000000000000000000000000000000000600082015250565b600061462b600c83613873565b9150614636826145f5565b602082019050919050565b6000602082019050818103600083015261465a8161461e565b9050919050565b600061466c826132ee565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361469e5761469d61395c565b5b600182019050919050565b7f5a65726f20707269636500000000000000000000000000000000000000000000600082015250565b60006146df600a83613873565b91506146ea826146a9565b602082019050919050565b6000602082019050818103600083015261470e816146d2565b9050919050565b7f5a65726f20746f6b656e7320746f2073656c6c00000000000000000000000000600082015250565b600061474b601383613873565b915061475682614715565b602082019050919050565b6000602082019050818103600083015261477a8161473e565b9050919050565b7f546869732070726573616c6520697320616c726561647920496e616374697665600082015250565b60006147b7602083613873565b91506147c282614781565b602082019050919050565b600060208201905081810360008301526147e6816147aa565b9050919050565b7f4c657373207468616e206d696e20616d6f756e74000000000000000000000000600082015250565b6000614823601483613873565b915061482e826147ed565b602082019050919050565b6000602082019050818103600083015261485281614816565b9050919050565b600060408201905061486e6000830185613568565b61487b6020830184613568565b9392505050565b7f4d616b65207375726520746f2061646420656e6f75676820616c6c6f77616e6360008201527f6500000000000000000000000000000000000000000000000000000000000000602082015250565b60006148de602183613873565b91506148e982614882565b604082019050919050565b6000602082019050818103600083015261490d816148d1565b9050919050565b60006060820190506149296000830186613568565b6149366020830185613568565b61494360408301846134fe565b949350505050565b600081519050919050565b600081905092915050565b60005b8381101561497f578082015181840152602081019050614964565b60008484015250505050565b60006149968261494b565b6149a08185614956565b93506149b0818560208601614961565b80840191505092915050565b60006149c8828461498b565b915081905092915050565b7f546f6b656e207061796d656e74206661696c6564000000000000000000000000600082015250565b6000614a09601483613873565b9150614a14826149d3565b602082019050919050565b60006020820190508181036000830152614a38816149fc565b9050919050565b7f4e6f742070617573656400000000000000000000000000000000000000000000600082015250565b6000614a75600a83613873565b9150614a8082614a3f565b602082019050919050565b60006020820190508181036000830152614aa481614a68565b9050919050565b7f50726576696f75732053616c6520697320416374697665000000000000000000600082015250565b6000614ae1601783613873565b9150614aec82614aab565b602082019050919050565b60006020820190508181036000830152614b1081614ad4565b9050919050565b6000819050919050565b6000614b3c614b37614b3284614b17565b6137f9565b6132ee565b9050919050565b614b4c81614b21565b82525050565b6000606082019050614b6760008301866134fe565b614b746020830185614b43565b614b816040830184614b43565b949350505050565b7f596f752063616e206f6e6c7920756e6c6f636b206f6e2066696e616c697a6500600082015250565b6000614bbf601f83613873565b9150614bca82614b89565b602082019050919050565b60006020820190508181036000830152614bee81614bb2565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614c51602683613873565b9150614c5c82614bf5565b604082019050919050565b60006020820190508181036000830152614c8081614c44565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614cbd602083613873565b9150614cc882614c87565b602082019050919050565b60006020820190508181036000830152614cec81614cb0565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000614d29601f83613873565b9150614d3482614cf3565b602082019050919050565b60006020820190508181036000830152614d5881614d1c565b9050919050565b7f4c6f772062616c616e6365000000000000000000000000000000000000000000600082015250565b6000614d95600b83613873565b9150614da082614d5f565b602082019050919050565b60006020820190508181036000830152614dc481614d88565b9050919050565b50565b6000614ddb600083614956565b9150614de682614dcb565b600082019050919050565b6000614dfc82614dce565b9150819050919050565b7f455448205061796d656e74206661696c65640000000000000000000000000000600082015250565b6000614e3c601283613873565b9150614e4782614e06565b602082019050919050565b60006020820190508181036000830152614e6b81614e2f565b905091905056fea26469706673582212200d26d985d61f14bcb66284ed2c85cb498e221cdb2a36cd6e59706ddd2c76ac3764736f6c63430008120033000000000000000000000000ee9f2375b4bdf6387aa8265dd4fb8f16512a1d46000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000ff8c479134a18918059493243943150776cf8cf200000000000000000000000000000000000000000000003635c9adc5dea00000
60806040523480156200001157600080fd5b506040516200522a3803806200522a833981810160405281019062000037919062000300565b60016000819055506200005f620000536200018d60201b60201c565b6200019560201b60201c565b83600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600c8190555082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550670de0b6b3a7640000600481905550620f424060038190555033600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000372565b600033905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200028d8262000260565b9050919050565b6200029f8162000280565b8114620002ab57600080fd5b50565b600081519050620002bf8162000294565b92915050565b6000819050919050565b620002da81620002c5565b8114620002e657600080fd5b50565b600081519050620002fa81620002cf565b92915050565b600080600080608085870312156200031d576200031c6200025b565b5b60006200032d87828801620002ae565b94505060206200034087828801620002ae565b93505060406200035387828801620002ae565b92505060606200036687828801620002e9565b91505092959194509250565b614ea880620003826000396000f3fe60806040526004361061022f5760003560e01c80638561c3151161012e578063d01608c1116100ab578063f2fde38b1161006f578063f2fde38b14610846578063f309fed91461086f578063f597573f146108ac578063fb4aa0a1146108d7578063fe9f676e146109025761022f565b8063d01608c11461075a578063d099850a14610783578063dd2e0ac0146107ac578063e18e84f9146107d5578063e6ab1434146108005761022f565b80639752f3cb116100f25780639752f3cb14610675578063a43be57b1461069e578063a7c60160146106b5578063b04c7346146106f2578063cd1704a8146107315761022f565b80638561c3151461058e5780638d79e66d146105b75780638da5cb5b146105e25780638e15f4731461060d5780639051cce9146106385761022f565b806339764363116101bc5780636fb4adff116101805780636fb4adff146104a9578063715018a6146104d2578063718a1962146104e957806379b8d93814610526578063833cde52146105635761022f565b806339764363146103d857806348bf4fcf146104035780634a6413f71461042e578063582b572314610457578063680f2e4f146104805761022f565b80630fbfcf37116102035780630fbfcf37146102da57806311b5444f146103035780631ed0c954146103215780632127fe041461035e57806323b221a01461039b5761022f565b8062dde10e1461023457806303fcd9ac1461027157806304c98b2b1461029a5780630ec809a8146102b1575b600080fd5b34801561024057600080fd5b5061025b60048036038101906102569190613324565b61093f565b604051610268919061336c565b60405180910390f35b34801561027d57600080fd5b5061029860048036038101906102939190613411565b61095f565b005b3480156102a657600080fd5b506102af6109c2565b005b3480156102bd57600080fd5b506102d860048036038101906102d39190613451565b610a1a565b005b3480156102e657600080fd5b5061030160048036038101906102fc919061347e565b610a66565b005b61030b610af3565b604051610318919061336c565b60405180910390f35b34801561032d57600080fd5b5061034860048036038101906103439190613451565b611132565b604051610355919061336c565b60405180910390f35b34801561036a57600080fd5b50610385600480360381019061038091906134be565b611152565b604051610392919061350d565b60405180910390f35b3480156103a757600080fd5b506103c260048036038101906103bd9190613324565b61129d565b6040516103cf919061336c565b60405180910390f35b3480156103e457600080fd5b506103ed61171e565b6040516103fa919061350d565b60405180910390f35b34801561040f57600080fd5b50610418611724565b604051610425919061350d565b60405180910390f35b34801561043a57600080fd5b5061045560048036038101906104509190613324565b61172a565b005b34801561046357600080fd5b5061047e60048036038101906104799190613324565b61184d565b005b34801561048c57600080fd5b506104a760048036038101906104a29190613528565b611884565b005b3480156104b557600080fd5b506104d060048036038101906104cb9190613451565b611931565b005b3480156104de57600080fd5b506104e76119ec565b005b3480156104f557600080fd5b50610510600480360381019061050b91906134be565b611a00565b60405161051d919061350d565b60405180910390f35b34801561053257600080fd5b5061054d60048036038101906105489190613528565b611a52565b60405161055a919061350d565b60405180910390f35b34801561056f57600080fd5b50610578611bd1565b6040516105859190613577565b60405180910390f35b34801561059a57600080fd5b506105b560048036038101906105b09190613451565b611bf7565b005b3480156105c357600080fd5b506105cc611cb2565b6040516105d9919061350d565b60405180910390f35b3480156105ee57600080fd5b506105f7611cb8565b6040516106049190613577565b60405180910390f35b34801561061957600080fd5b50610622611ce2565b60405161062f919061350d565b60405180910390f35b34801561064457600080fd5b5061065f600480360381019061065a91906135f7565b611d96565b60405161066c919061336c565b60405180910390f35b34801561068157600080fd5b5061069c60048036038101906106979190613644565b611e6a565b005b3480156106aa57600080fd5b506106b3611fbe565b005b3480156106c157600080fd5b506106dc60048036038101906106d79190613324565b612085565b6040516106e9919061336c565b60405180910390f35b3480156106fe57600080fd5b5061071960048036038101906107149190613528565b6128e3565b604051610728939291906136bf565b60405180910390f35b34801561073d57600080fd5b5061075860048036038101906107539190613324565b61291a565b005b34801561076657600080fd5b50610781600480360381019061077c9190613324565b61292c565b005b34801561078f57600080fd5b506107aa60048036038101906107a591906136f6565b612a4e565b005b3480156107b857600080fd5b506107d360048036038101906107ce9190613324565b612c9f565b005b3480156107e157600080fd5b506107ea612d56565b6040516107f7919061350d565b60405180910390f35b34801561080c57600080fd5b5061082760048036038101906108229190613324565b612d5c565b60405161083d9a9998979695949392919061375d565b60405180910390f35b34801561085257600080fd5b5061086d60048036038101906108689190613451565b612dca565b005b34801561087b57600080fd5b50610896600480360381019061089191906134be565b612e4d565b6040516108a3919061350d565b60405180910390f35b3480156108b857600080fd5b506108c1612ed9565b6040516108ce9190613858565b60405180910390f35b3480156108e357600080fd5b506108ec612eff565b6040516108f99190613577565b60405180910390f35b34801561090e57600080fd5b50610929600480360381019061092491906134be565b612f25565b604051610936919061350d565b60405180910390f35b60086020528060005260406000206000915054906101000a900460ff1681565b61096761304b565b80600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6109ca61304b565b4260096000600254815260200190815260200160002060000181905550600160096000600254815260200190815260200160002060080160006101000a81548160ff021916908315150217905550565b610a2261304b565b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b81600081118015610a7957506002548111155b610ab8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aaf906138d0565b60405180910390fd5b610ac061304b565b816009600085815260200190815260200160002060080160016101000a81548160ff021916908315150217905550505050565b6000600254600081118015610b0a57506002548111155b610b49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b40906138d0565b60405180910390fd5b600254610b5860025434611a00565b60096000838152602001908152602001600020600001544210158015610ba55750600115156009600084815260200190815260200160002060080160009054906101000a900460ff161515145b610be4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bdb9061393c565b60405180910390fd5b600081118015610c2b575060096000838152602001908152602001600020600401546009600084815260200190815260200160002060050154610c27919061398b565b8111155b610c6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6190613a0b565b60405180910390fd5b610c726130c9565b6000600454600454610c849190613a2b565b600354610c8f611ce2565b34610c9a9190613a2b565b610ca49190613a2b565b610cae9190613a9c565b9050600960006002548152602001908152602001600020600601548160096000600254815260200190815260200160002060070154610ced9190613acd565b1115610d2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2590613b73565b60405180910390fd5b60086000600254815260200190815260200160002060009054906101000a900460ff1615610d91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8890613bdf565b60405180910390fd5b6001151560096000600254815260200190815260200160002060080160009054906101000a900460ff16151514610dfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df490613c4b565b60405180910390fd5b6000610e0b60025483612e4d565b905060001515600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151503610eab57600c54811015610eaa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea190613cb7565b60405180910390fd5b5b806009600060025481526020019081526020016000206004016000828254610ed39190613acd565b92505081905550816009600060025481526020019081526020016000206007016000828254610f029190613acd565b925050819055506000600a6000610f17613118565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006002548152602001908152602001600020600101541115610fe65780600a6000610f7b613118565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600060025481526020019081526020016000206001016000828254610fda9190613acd565b9250508190555061107e565b6040518060600160405280600081526020018281526020016000815250600a600061100f613118565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600060025481526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050505b6110aa600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1634613120565b600073ffffffffffffffffffffffffffffffffffffffff166002546110cd613118565b73ffffffffffffffffffffffffffffffffffffffff167f4d8aead3491b7eba4b5c7a65fc17e493b9e63f9e433522fc5f6a85a168fc9d36843442604051611116939291906136bf565b60405180910390a460019550505061112c613214565b50505090565b600b6020528060005260406000206000915054906101000a900460ff1681565b60008260008111801561116757506002548111155b6111a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119d906138d0565b60405180910390fd5b60006009600086815260200190815260200160002060020154846111ca9190613a2b565b9050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611239573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125d9190613d10565b600a6112699190613e70565b611271611ce2565b61127b9190613a2b565b600454826112899190613a2b565b6112939190613a9c565b9250505092915050565b6000816000811180156112b257506002548111155b6112f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e8906138d0565b60405180910390fd5b60006112fd3385611a52565b905060008111611342576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133990613f07565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036113d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ca90613f73565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161142e9190613577565b602060405180830381865afa15801561144b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146f9190613fa8565b8111156114b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a890614047565b60405180910390fd5b600115156009600086815260200190815260200160002060080160019054906101000a900460ff1615151461151b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611512906140b3565b60405180910390fd5b42600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008681526020019081526020016000206000018190555080600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600086815260200190815260200160002060020160008282546115d69190613acd565b925050819055506000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b815260040161163c9291906140d3565b6020604051808303816000875af115801561165b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167f9190614111565b9050806116c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b89061418a565b60405180910390fd5b843373ffffffffffffffffffffffffffffffffffffffff167fe49649ad7d04a14b0d2a43dae89f207c0822143ff6f88a6480e88907e4e5c548844260405161170a9291906141aa565b60405180910390a360019350505050919050565b60045481565b60035481565b8060008111801561173d57506002548111155b61177c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611773906138d0565b60405180910390fd5b61178461304b565b6008600083815260200190815260200160002060009054906101000a900460ff16156117e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117dc9061421f565b60405180910390fd5b60016008600084815260200190815260200160002060006101000a81548160ff021916908315150217905550817f927e6cd2dce24f32508868820cdc35f09d9de0f4b44e945114110125196fba9f42604051611841919061350d565b60405180910390a25050565b61185561304b565b611881600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682613120565b50565b61188c61304b565b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b81526004016118e99291906140d3565b6020604051808303816000875af1158015611908573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192c9190614111565b505050565b61193961304b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036119a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199f9061428b565b60405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6119f461304b565b6119fe600061321e565b565b600080600454600454611a139190613a2b565b600354611a1e611ce2565b85611a299190613a2b565b611a339190613a2b565b611a3d9190613a9c565b9050611a498482612e4d565b91505092915050565b600081600081118015611a6757506002548111155b611aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9d906138d0565b60405180910390fd5b6000600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000858152602001908152602001600020604051806060016040529081600082015481526020016001820154815260200160028201548152505090506000816020015111611b6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b61906142f7565b60405180910390fd5b600081604001518260200151611b80919061398b565b905060008111611bc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bbc90614363565b60405180910390fd5b80935050505092915050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611bff61304b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611c6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c65906143cf565b60405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600c5481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611d52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d769190614467565b5050509150506402540be40081611d8d91906144e2565b90508091505090565b6000808383905011611ddd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd4906145a6565b60405180910390fd5b60005b83839050811015611e5f57611e0d848483818110611e0157611e006145c6565b5b9050602002013561129d565b611e4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e4390614641565b60405180910390fd5b8080611e5790614661565b915050611de0565b506001905092915050565b84600081118015611e7d57506002548111155b611ebc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eb3906138d0565b60405180910390fd5b611ec461304b565b60008511611f07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611efe906146f5565b60405180910390fd5b60008311611f4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4190614761565b60405180910390fd5b846009600088815260200190815260200160002060020181905550836009600088815260200190815260200160002060030181905550826009600088815260200190815260200160002060050181905550816009600088815260200190815260200160002060060181905550505050505050565b611fc661304b565b600160096000600254815260200190815260200160002060080160006101000a81548160ff0219169083151502179055612035576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161202c906147cd565b60405180910390fd5b4260096000600254815260200190815260200160002060010181905550600060096000600254815260200190815260200160002060080160006101000a81548160ff021916908315150217905550565b600060025460008111801561209c57506002548111155b6120db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d2906138d0565b60405180910390fd5b6002546120ea60025485612e4d565b600960008381526020019081526020016000206000015442101580156121375750600115156009600084815260200190815260200160002060080160009054906101000a900460ff161515145b612176576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216d9061393c565b60405180910390fd5b6000811180156121bd5750600960008381526020019081526020016000206004015460096000848152602001908152602001600020600501546121b9919061398b565b8111155b6121fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f390613a0b565b60405180910390fd5b60086000600254815260200190815260200160002060009054906101000a900460ff161561225f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225690613bdf565b60405180910390fd5b6001151560096000600254815260200190815260200160002060080160009054906101000a900460ff161515146122cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122c290613c4b565b60405180910390fd5b6009600060025481526020019081526020016000206006015485600960006002548152602001908152602001600020600701546123089190613acd565b1115612349576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234090613b73565b60405180910390fd5b600061235760025487612e4d565b90508060096000600254815260200190815260200160002060040160008282546123819190613acd565b925050819055508560096000600254815260200190815260200160002060070160008282546123b09190613acd565b9250508190555060001515600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615150361245557600c54811015612454576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161244b90614839565b60405180910390fd5b5b6000600a6000612463613118565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600060025481526020019081526020016000206001015411156125325780600a60006124c7613118565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000600254815260200190815260200160002060010160008282546125269190613acd565b925050819055506125ca565b6040518060600160405280600081526020018281526020016000815250600a600061255b613118565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600060025481526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050505b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e612612613118565b306040518363ffffffff1660e01b8152600401612630929190614859565b602060405180830381865afa15801561264d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126719190613fa8565b9050808711156126b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126ad906148f4565b60405180910390fd5b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166126f9613118565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a60405160240161272f93929190614914565b6040516020818303038152906040527f23b872dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516127b991906149bc565b6000604051808303816000865af19150503d80600081146127f6576040519150601f19603f3d011682016040523d82523d6000602084013e6127fb565b606091505b505090508061283f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161283690614a1f565b60405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600254612883613118565b73ffffffffffffffffffffffffffffffffffffffff167f4d8aead3491b7eba4b5c7a65fc17e493b9e63f9e433522fc5f6a85a168fc9d36868c426040516128cc939291906136bf565b60405180910390a460019650505050505050919050565b600a602052816000526040600020602052806000526040600020600091509150508060000154908060010154908060020154905083565b61292261304b565b80600c8190555050565b8060008111801561293f57506002548111155b61297e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612975906138d0565b60405180910390fd5b61298661304b565b6008600083815260200190815260200160002060009054906101000a900460ff166129e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129dd90614a8b565b60405180910390fd5b60006008600084815260200190815260200160002060006101000a81548160ff021916908315150217905550817ff608654a6d8e1785594639dd55babb61d7ae157382015f904a24224e50333b1d42604051612a42919061350d565b60405180910390a25050565b612a5661304b565b60008411612a99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a90906146f5565b60405180910390fd5b60008211612adc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ad390614761565b60405180910390fd5b6000151560096000600254815260200190815260200160002060080160009054906101000a900460ff16151514612b48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3f90614af7565b60405180910390fd5b60026000815480929190612b5b90614661565b91905055506040518061014001604052806000815260200160008152602001858152602001848152602001600081526020018381526020018281526020016000815260200160001515815260200160001515815250600960006002548152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff0219169083151502179055506101208201518160080160016101000a81548160ff0219169083151502179055509050506002547f6a00651728a92841411081673eaa4eddbed06d102a590e050c22def40d4dd0b883600080604051612c9193929190614b52565b60405180910390a250505050565b80600081118015612cb257506002548111155b612cf1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ce8906138d0565b60405180910390fd5b612cf961304b565b6009600083815260200190815260200160002060010154421015612d52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4990614bd5565b60405180910390fd5b5050565b60025481565b60096020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050154908060060154908060070154908060080160009054906101000a900460ff16908060080160019054906101000a900460ff1690508a565b612dd261304b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612e41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e3890614c67565b60405180910390fd5b612e4a8161321e565b50565b600082600081118015612e6257506002548111155b612ea1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e98906138d0565b60405180910390fd5b600354600960008681526020019081526020016000206002015484612ec69190613a2b565b612ed09190613a9c565b91505092915050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600082600081118015612f3a57506002548111155b612f79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f70906138d0565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015612fe6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061300a9190613d10565b600a6130169190613e70565b6009600086815260200190815260200160002060020154846130389190613a2b565b6130429190613a9c565b91505092915050565b613053613118565b73ffffffffffffffffffffffffffffffffffffffff16613071611cb8565b73ffffffffffffffffffffffffffffffffffffffff16146130c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130be90614cd3565b60405180910390fd5b565b60026000540361310e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161310590614d3f565b60405180910390fd5b6002600081905550565b600033905090565b80471015613163576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161315a90614dab565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161318990614df1565b60006040518083038185875af1925050503d80600081146131c6576040519150601f19603f3d011682016040523d82523d6000602084013e6131cb565b606091505b505090508061320f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161320690614e52565b60405180910390fd5b505050565b6001600081905550565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600080fd5b6000819050919050565b613301816132ee565b811461330c57600080fd5b50565b60008135905061331e816132f8565b92915050565b60006020828403121561333a576133396132e4565b5b60006133488482850161330f565b91505092915050565b60008115159050919050565b61336681613351565b82525050565b6000602082019050613381600083018461335d565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006133b282613387565b9050919050565b6133c2816133a7565b81146133cd57600080fd5b50565b6000813590506133df816133b9565b92915050565b6133ee81613351565b81146133f957600080fd5b50565b60008135905061340b816133e5565b92915050565b60008060408385031215613428576134276132e4565b5b6000613436858286016133d0565b9250506020613447858286016133fc565b9150509250929050565b600060208284031215613467576134666132e4565b5b6000613475848285016133d0565b91505092915050565b60008060408385031215613495576134946132e4565b5b60006134a38582860161330f565b92505060206134b4858286016133fc565b9150509250929050565b600080604083850312156134d5576134d46132e4565b5b60006134e38582860161330f565b92505060206134f48582860161330f565b9150509250929050565b613507816132ee565b82525050565b600060208201905061352260008301846134fe565b92915050565b6000806040838503121561353f5761353e6132e4565b5b600061354d858286016133d0565b925050602061355e8582860161330f565b9150509250929050565b613571816133a7565b82525050565b600060208201905061358c6000830184613568565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126135b7576135b6613592565b5b8235905067ffffffffffffffff8111156135d4576135d3613597565b5b6020830191508360208202830111156135f0576135ef61359c565b5b9250929050565b6000806020838503121561360e5761360d6132e4565b5b600083013567ffffffffffffffff81111561362c5761362b6132e9565b5b613638858286016135a1565b92509250509250929050565b600080600080600060a086880312156136605761365f6132e4565b5b600061366e8882890161330f565b955050602061367f8882890161330f565b94505060406136908882890161330f565b93505060606136a18882890161330f565b92505060806136b28882890161330f565b9150509295509295909350565b60006060820190506136d460008301866134fe565b6136e160208301856134fe565b6136ee60408301846134fe565b949350505050565b600080600080608085870312156137105761370f6132e4565b5b600061371e8782880161330f565b945050602061372f8782880161330f565b93505060406137408782880161330f565b92505060606137518782880161330f565b91505092959194509250565b600061014082019050613773600083018d6134fe565b613780602083018c6134fe565b61378d604083018b6134fe565b61379a606083018a6134fe565b6137a760808301896134fe565b6137b460a08301886134fe565b6137c160c08301876134fe565b6137ce60e08301866134fe565b6137dc61010083018561335d565b6137ea61012083018461335d565b9b9a5050505050505050505050565b6000819050919050565b600061381e61381961381484613387565b6137f9565b613387565b9050919050565b600061383082613803565b9050919050565b600061384282613825565b9050919050565b61385281613837565b82525050565b600060208201905061386d6000830184613849565b92915050565b600082825260208201905092915050565b7f496e76616c69642070726573616c652069640000000000000000000000000000600082015250565b60006138ba601283613873565b91506138c582613884565b602082019050919050565b600060208201905081810360008301526138e9816138ad565b9050919050565b7f496e76616c69642074696d6520666f7220627579696e67000000000000000000600082015250565b6000613926601783613873565b9150613931826138f0565b602082019050919050565b6000602082019050818103600083015261395581613919565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613996826132ee565b91506139a1836132ee565b92508282039050818111156139b9576139b861395c565b5b92915050565b7f496e76616c69642073616c6520616d6f756e7400000000000000000000000000600082015250565b60006139f5601383613873565b9150613a00826139bf565b602082019050919050565b60006020820190508181036000830152613a24816139e8565b9050919050565b6000613a36826132ee565b9150613a41836132ee565b9250828202613a4f816132ee565b91508282048414831517613a6657613a6561395c565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613aa7826132ee565b9150613ab2836132ee565b925082613ac257613ac1613a6d565b5b828204905092915050565b6000613ad8826132ee565b9150613ae3836132ee565b9250828201905080821115613afb57613afa61395c565b5b92915050565b7f416d6f756e742073686f756c64206265206c657373207468616e206c6566744860008201527f6172646361700000000000000000000000000000000000000000000000000000602082015250565b6000613b5d602683613873565b9150613b6882613b01565b604082019050919050565b60006020820190508181036000830152613b8c81613b50565b9050919050565b7f50726573616c6520706175736564000000000000000000000000000000000000600082015250565b6000613bc9600e83613873565b9150613bd482613b93565b602082019050919050565b60006020820190508181036000830152613bf881613bbc565b9050919050565b7f50726573616c65206973206e6f74206163746976652079657400000000000000600082015250565b6000613c35601983613873565b9150613c4082613bff565b602082019050919050565b60006020820190508181036000830152613c6481613c28565b9050919050565b7f496e73756666696369656e7420616d6f756e7421000000000000000000000000600082015250565b6000613ca1601483613873565b9150613cac82613c6b565b602082019050919050565b60006020820190508181036000830152613cd081613c94565b9050919050565b600060ff82169050919050565b613ced81613cd7565b8114613cf857600080fd5b50565b600081519050613d0a81613ce4565b92915050565b600060208284031215613d2657613d256132e4565b5b6000613d3484828501613cfb565b91505092915050565b60008160011c9050919050565b6000808291508390505b6001851115613d9457808604811115613d7057613d6f61395c565b5b6001851615613d7f5780820291505b8081029050613d8d85613d3d565b9450613d54565b94509492505050565b600082613dad5760019050613e69565b81613dbb5760009050613e69565b8160018114613dd15760028114613ddb57613e0a565b6001915050613e69565b60ff841115613ded57613dec61395c565b5b8360020a915084821115613e0457613e0361395c565b5b50613e69565b5060208310610133831016604e8410600b8410161715613e3f5782820a905083811115613e3a57613e3961395c565b5b613e69565b613e4c8484846001613d4a565b92509050818404811115613e6357613e6261395c565b5b81810290505b9392505050565b6000613e7b826132ee565b9150613e8683613cd7565b9250613eb37fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484613d9d565b905092915050565b7f5a65726f20636c61696d20616d6f756e74000000000000000000000000000000600082015250565b6000613ef1601183613873565b9150613efc82613ebb565b602082019050919050565b60006020820190508181036000830152613f2081613ee4565b9050919050565b7f50726573616c6520746f6b656e2061646472657373206e6f7420736574000000600082015250565b6000613f5d601d83613873565b9150613f6882613f27565b602082019050919050565b60006020820190508181036000830152613f8c81613f50565b9050919050565b600081519050613fa2816132f8565b92915050565b600060208284031215613fbe57613fbd6132e4565b5b6000613fcc84828501613f93565b91505092915050565b7f4e6f7420656e6f75676820746f6b656e7320696e2074686520636f6e7472616360008201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b6000614031602183613873565b915061403c82613fd5565b604082019050919050565b6000602082019050818103600083015261406081614024565b9050919050565b7f436c61696d206973206e6f7420656e61626c6500000000000000000000000000600082015250565b600061409d601383613873565b91506140a882614067565b602082019050919050565b600060208201905081810360008301526140cc81614090565b9050919050565b60006040820190506140e86000830185613568565b6140f560208301846134fe565b9392505050565b60008151905061410b816133e5565b92915050565b600060208284031215614127576141266132e4565b5b6000614135848285016140fc565b91505092915050565b7f546f6b656e207472616e73666572206661696c65640000000000000000000000600082015250565b6000614174601583613873565b915061417f8261413e565b602082019050919050565b600060208201905081810360008301526141a381614167565b9050919050565b60006040820190506141bf60008301856134fe565b6141cc60208301846134fe565b9392505050565b7f416c726561647920706175736564000000000000000000000000000000000000600082015250565b6000614209600e83613873565b9150614214826141d3565b602082019050919050565b60006020820190508181036000830152614238816141fc565b9050919050565b7f496e76616c696420706172616d65746572730000000000000000000000000000600082015250565b6000614275601283613873565b91506142808261423f565b602082019050919050565b600060208201905081810360008301526142a481614268565b9050919050565b7f4e6f7468696e6720746f20636c61696d00000000000000000000000000000000600082015250565b60006142e1601083613873565b91506142ec826142ab565b602082019050919050565b60006020820190508181036000830152614310816142d4565b9050919050565b7f416c726561647920636c61696d65640000000000000000000000000000000000600082015250565b600061434d600f83613873565b915061435882614317565b602082019050919050565b6000602082019050818103600083015261437c81614340565b9050919050565b7f5a65726f20746f6b656e20616464726573730000000000000000000000000000600082015250565b60006143b9601283613873565b91506143c482614383565b602082019050919050565b600060208201905081810360008301526143e8816143ac565b9050919050565b600069ffffffffffffffffffff82169050919050565b61440e816143ef565b811461441957600080fd5b50565b60008151905061442b81614405565b92915050565b6000819050919050565b61444481614431565b811461444f57600080fd5b50565b6000815190506144618161443b565b92915050565b600080600080600060a08688031215614483576144826132e4565b5b60006144918882890161441c565b95505060206144a288828901614452565b94505060406144b388828901613f93565b93505060606144c488828901613f93565b92505060806144d58882890161441c565b9150509295509295909350565b60006144ed82614431565b91506144f883614431565b925082820261450681614431565b91507f8000000000000000000000000000000000000000000000000000000000000000841460008412161561453e5761453d61395c565b5b82820584148315176145535761455261395c565b5b5092915050565b7f5a65726f204944206c656e677468000000000000000000000000000000000000600082015250565b6000614590600e83613873565b915061459b8261455a565b602082019050919050565b600060208201905081810360008301526145bf81614583565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f436c61696d206661696c65640000000000000000000000000000000000000000600082015250565b600061462b600c83613873565b9150614636826145f5565b602082019050919050565b6000602082019050818103600083015261465a8161461e565b9050919050565b600061466c826132ee565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361469e5761469d61395c565b5b600182019050919050565b7f5a65726f20707269636500000000000000000000000000000000000000000000600082015250565b60006146df600a83613873565b91506146ea826146a9565b602082019050919050565b6000602082019050818103600083015261470e816146d2565b9050919050565b7f5a65726f20746f6b656e7320746f2073656c6c00000000000000000000000000600082015250565b600061474b601383613873565b915061475682614715565b602082019050919050565b6000602082019050818103600083015261477a8161473e565b9050919050565b7f546869732070726573616c6520697320616c726561647920496e616374697665600082015250565b60006147b7602083613873565b91506147c282614781565b602082019050919050565b600060208201905081810360008301526147e6816147aa565b9050919050565b7f4c657373207468616e206d696e20616d6f756e74000000000000000000000000600082015250565b6000614823601483613873565b915061482e826147ed565b602082019050919050565b6000602082019050818103600083015261485281614816565b9050919050565b600060408201905061486e6000830185613568565b61487b6020830184613568565b9392505050565b7f4d616b65207375726520746f2061646420656e6f75676820616c6c6f77616e6360008201527f6500000000000000000000000000000000000000000000000000000000000000602082015250565b60006148de602183613873565b91506148e982614882565b604082019050919050565b6000602082019050818103600083015261490d816148d1565b9050919050565b60006060820190506149296000830186613568565b6149366020830185613568565b61494360408301846134fe565b949350505050565b600081519050919050565b600081905092915050565b60005b8381101561497f578082015181840152602081019050614964565b60008484015250505050565b60006149968261494b565b6149a08185614956565b93506149b0818560208601614961565b80840191505092915050565b60006149c8828461498b565b915081905092915050565b7f546f6b656e207061796d656e74206661696c6564000000000000000000000000600082015250565b6000614a09601483613873565b9150614a14826149d3565b602082019050919050565b60006020820190508181036000830152614a38816149fc565b9050919050565b7f4e6f742070617573656400000000000000000000000000000000000000000000600082015250565b6000614a75600a83613873565b9150614a8082614a3f565b602082019050919050565b60006020820190508181036000830152614aa481614a68565b9050919050565b7f50726576696f75732053616c6520697320416374697665000000000000000000600082015250565b6000614ae1601783613873565b9150614aec82614aab565b602082019050919050565b60006020820190508181036000830152614b1081614ad4565b9050919050565b6000819050919050565b6000614b3c614b37614b3284614b17565b6137f9565b6132ee565b9050919050565b614b4c81614b21565b82525050565b6000606082019050614b6760008301866134fe565b614b746020830185614b43565b614b816040830184614b43565b949350505050565b7f596f752063616e206f6e6c7920756e6c6f636b206f6e2066696e616c697a6500600082015250565b6000614bbf601f83613873565b9150614bca82614b89565b602082019050919050565b60006020820190508181036000830152614bee81614bb2565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614c51602683613873565b9150614c5c82614bf5565b604082019050919050565b60006020820190508181036000830152614c8081614c44565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614cbd602083613873565b9150614cc882614c87565b602082019050919050565b60006020820190508181036000830152614cec81614cb0565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000614d29601f83613873565b9150614d3482614cf3565b602082019050919050565b60006020820190508181036000830152614d5881614d1c565b9050919050565b7f4c6f772062616c616e6365000000000000000000000000000000000000000000600082015250565b6000614d95600b83613873565b9150614da082614d5f565b602082019050919050565b60006020820190508181036000830152614dc481614d88565b9050919050565b50565b6000614ddb600083614956565b9150614de682614dcb565b600082019050919050565b6000614dfc82614dce565b9150819050919050565b7f455448205061796d656e74206661696c65640000000000000000000000000000600082015250565b6000614e3c601283613873565b9150614e4782614e06565b602082019050919050565b60006020820190508181036000830152614e6b81614e2f565b905091905056fea26469706673582212200d26d985d61f14bcb66284ed2c85cb498e221cdb2a36cd6e59706ddd2c76ac3764736f6c63430008120033000000000000000000000000ee9f2375b4bdf6387aa8265dd4fb8f16512a1d46000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000ff8c479134a18918059493243943150776cf8cf200000000000000000000000000000000000000000000003635c9adc5dea00000