Source Code
Overview
ETH Balance
0 ETH
Token Holdings
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 65 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Buy With USDT | 6185093 | 171 days ago | IN | 0 ETH | 0.00034732 | ||||
Claim Amount | 6182750 | 171 days ago | IN | 0 ETH | 0.00495182 | ||||
Claim Amount | 6182242 | 171 days ago | IN | 0 ETH | 0.00461801 | ||||
Claim Amount | 6182240 | 171 days ago | IN | 0 ETH | 0.00472521 | ||||
Claim Amount | 6182184 | 171 days ago | IN | 0 ETH | 0.00515053 | ||||
Buy With Eth | 6178237 | 172 days ago | IN | 0.00001 ETH | 0.00046341 | ||||
Enable Claim | 6178221 | 172 days ago | IN | 0 ETH | 0.00016 | ||||
Buy With USDT | 6176736 | 172 days ago | IN | 0 ETH | 0.0019471 | ||||
Claim Amount | 6176711 | 172 days ago | IN | 0 ETH | 0.00255263 | ||||
Buy With USDT | 6176706 | 172 days ago | IN | 0 ETH | 0.00343989 | ||||
Buy With USDT | 6175387 | 172 days ago | IN | 0 ETH | 0.00346942 | ||||
Buy With USDT | 6175381 | 172 days ago | IN | 0 ETH | 0.004444 | ||||
Buy With USDT | 6175375 | 172 days ago | IN | 0 ETH | 0.00426127 | ||||
Buy With Eth | 6175371 | 172 days ago | IN | 0.1 ETH | 0.00573444 | ||||
Buy With Eth | 6171952 | 173 days ago | IN | 0.05 ETH | 0.00014152 | ||||
Buy With USDT | 6171624 | 173 days ago | IN | 0 ETH | 0.00019954 | ||||
Buy With Eth | 6171124 | 173 days ago | IN | 0.005 ETH | 0.00040363 | ||||
Buy With USDT | 6170479 | 173 days ago | IN | 0 ETH | 0.00043818 | ||||
Buy With USDT | 6169807 | 173 days ago | IN | 0 ETH | 0.00092591 | ||||
Buy With USDT | 6169767 | 173 days ago | IN | 0 ETH | 0.00078275 | ||||
Buy With USDT | 6164710 | 174 days ago | IN | 0 ETH | 0.00017192 | ||||
Buy With USDT | 6163591 | 174 days ago | IN | 0 ETH | 0.00018353 | ||||
Buy With USDT | 6162549 | 174 days ago | IN | 0 ETH | 0.00017873 | ||||
Buy With USDT | 6161298 | 174 days ago | IN | 0 ETH | 0.00024888 | ||||
Buy With USDT | 6161295 | 174 days ago | IN | 0 ETH | 0.00019448 |
Latest 17 internal transactions
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
6178237 | 172 days ago | 0.00001 ETH | ||||
6175371 | 172 days ago | 0.1 ETH | ||||
6171952 | 173 days ago | 0.05 ETH | ||||
6171124 | 173 days ago | 0.005 ETH | ||||
6160663 | 174 days ago | 0.005 ETH | ||||
6160651 | 174 days ago | 0.03 ETH | ||||
6157489 | 175 days ago | 0.1 ETH | ||||
6149182 | 176 days ago | 0.01 ETH | ||||
6147245 | 176 days ago | 0.0000007 ETH | ||||
6147218 | 176 days ago | 0.0000007 ETH | ||||
6147212 | 176 days ago | 0.00007 ETH | ||||
6147165 | 176 days ago | 0.00001 ETH | ||||
6147138 | 176 days ago | 0.00007 ETH | ||||
6147119 | 176 days ago | 0.00001 ETH | ||||
6147104 | 176 days ago | 0.00001 ETH | ||||
6147087 | 176 days ago | 0.001 ETH | ||||
6145868 | 176 days ago | 0.1 ETH |
Loading...
Loading
Contract Name:
Presale
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/interfaces/IERC20Metadata.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; interface Aggregator { function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); } contract Presale is ReentrancyGuard, Ownable { uint256 public overalllRaised; uint256 public presaleId; uint256 public USDT_MULTIPLIER; uint256 public ETH_MULTIPLIER; address public fundReceiver; uint256 public uniqueBuyers; struct PresaleData { uint256 startTime; uint256 endTime; uint256 price; uint256 nextStagePrice; uint256 Sold; uint256 tokensToSell; uint256 UsdtHardcap; uint256 amountRaised; bool Active; bool isEnableClaim; } struct UserData { uint256 investedAmount; uint256 claimAt; uint256 claimAbleAmount; uint256 claimedAmount; uint256 claimCount; } IERC20Metadata public USDTInterface; IERC20Metadata public USDCInterface; Aggregator internal aggregatorInterface; mapping(uint256 => bool) public paused; mapping(uint256 => PresaleData) public presale; mapping(address => mapping(uint256 => UserData)) public userClaimData; mapping(address => bool) public isExcludeMinToken; mapping(address => bool) public isBlackList; mapping(address => bool) public isExist; uint256 public MinTokenTobuy; uint256 public currentSale; 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 _usdc, address _SaleToken, uint256 _MinTokenTobuy ) { aggregatorInterface = Aggregator(_oracle); SaleToken = _SaleToken; MinTokenTobuy = _MinTokenTobuy; USDTInterface = IERC20Metadata(_usdt); USDCInterface = IERC20Metadata(_usdc); ETH_MULTIPLIER = (10 ** 18); USDT_MULTIPLIER = (10 ** 6); fundReceiver = msg.sender; } function createPresale( uint256 _price, uint256 _nextStagePrice, uint256 _tokensToSell, uint256 _UsdtHardcap ) external onlyOwner { require(_price > 0, "Zero price"); require(_tokensToSell > 0, "Zero tokens to sell"); presaleId++; presale[presaleId] = PresaleData( 0, 0, _price, _nextStagePrice, 0, _tokensToSell, _UsdtHardcap, 0, false, false ); emit PresaleCreated(presaleId, _tokensToSell, 0, 0); } function setPresaleStage(uint256 _id) public onlyOwner { require(presale[_id].tokensToSell > 0, "Presale don't exist"); if (currentSale != 0) { presale[currentSale].endTime = block.timestamp; presale[currentSale].Active = false; } presale[_id].startTime = block.timestamp; presale[_id].Active = true; currentSale = _id; } function enableClaim(uint256 _id, bool _status) public onlyOwner { presale[_id].isEnableClaim = _status; } function updatePresale( uint256 _id, uint256 _price, uint256 _nextStagePrice, uint256 _tokensToSell, uint256 _Hardcap, bool isclaimAble ) external onlyOwner { require(_price > 0, "Zero price"); require(_tokensToSell > 0, "Zero tokens to sell"); require(_Hardcap > 0, "Zero harcap"); presale[_id].price = _price; presale[_id].nextStagePrice = _nextStagePrice; presale[_id].tokensToSell = _tokensToSell; presale[_id].UsdtHardcap = _Hardcap; presale[_id].isEnableClaim = isclaimAble; } function changeFundWallet(address _wallet) external onlyOwner { require(_wallet != address(0), "Invalid parameters"); fundReceiver = _wallet; } function changeUSDTToken(address _newAddress) external onlyOwner { require(_newAddress != address(0), "Zero token address"); USDTInterface = IERC20Metadata(_newAddress); } function changeUSDCToken(address _newAddress) external onlyOwner { require(_newAddress != address(0), "Zero token address"); USDCInterface = IERC20Metadata(_newAddress); } function pausePresale(uint256 _id) external checkPresaleId(_id) onlyOwner { require(!paused[_id], "Already paused"); paused[_id] = true; emit PresalePaused(_id, block.timestamp); } function unPausePresale( uint256 _id ) external checkPresaleId(_id) onlyOwner { require(paused[_id], "Not paused"); paused[_id] = false; emit PresaleUnpaused(_id, block.timestamp); } function getLatestPrice() public view returns (uint256) { int256 price = 368895991131; // (, int256 price, , , ) = aggregatorInterface.latestRoundData(); price = (price * (10 ** 10)); return uint256(price); } modifier checkPresaleId(uint256 _id) { require(_id > 0 && _id == currentSale, "Invalid presale id"); _; } modifier checkSaleState(uint256 _id, uint256 amount) { require(presale[_id].Active == true, "Presale not Active"); require( amount > 0 && amount <= presale[_id].tokensToSell - presale[_id].Sold, "Invalid sale amount" ); _; } function ExcludeAccouctFromMinBuy( address _user, bool _status ) external onlyOwner { isExcludeMinToken[_user] = _status; } function buyWithUSDT( uint256 usdAmount ) external checkPresaleId(currentSale) checkSaleState(currentSale, usdtToTokens(currentSale, usdAmount)) nonReentrant returns (bool) { require(!paused[currentSale], "Presale paused"); require( presale[currentSale].Active == true, "Presale is not active yet" ); require(!isBlackList[msg.sender], "Account is blackListed"); require( presale[currentSale].amountRaised + usdAmount <= presale[currentSale].UsdtHardcap, "Amount should be less than leftHardcap" ); if (!isExist[msg.sender]) { isExist[msg.sender] = true; uniqueBuyers++; } uint256 tokens = usdtToTokens(currentSale, usdAmount); presale[currentSale].Sold += tokens; presale[currentSale].amountRaised += usdAmount; overalllRaised += usdAmount; if (isExcludeMinToken[msg.sender] == false) { require(tokens >= MinTokenTobuy, "Less than min amount"); } if (userClaimData[_msgSender()][currentSale].claimAbleAmount > 0) { userClaimData[_msgSender()][currentSale].claimAbleAmount += tokens; userClaimData[_msgSender()][currentSale] .investedAmount += usdAmount; } else { userClaimData[_msgSender()][currentSale] = UserData( usdAmount, 0, tokens, 0, 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(), currentSale, address(USDTInterface), tokens, usdAmount, block.timestamp ); return true; } function changeClaimAddress( address _oldAddress, address _newWallet ) public onlyOwner { for (uint256 i = 1; i < presaleId; i++) { require(isExist[_oldAddress], "User not a participant"); userClaimData[_newWallet][i].claimAbleAmount = userClaimData[ _oldAddress ][i].claimAbleAmount; userClaimData[_oldAddress][i].claimAbleAmount = 0; } isExist[_oldAddress] = false; isExist[_newWallet] = true; } function blackListUser(address _user, bool _value) public onlyOwner { isBlackList[_user] = _value; } function buyWithUSDC( uint256 usdcAmount ) external checkPresaleId(currentSale) checkSaleState(currentSale, usdtToTokens(currentSale, usdcAmount)) nonReentrant returns (bool) { require(!paused[currentSale], "Presale paused"); require( presale[currentSale].Active == true, "Presale is not active yet" ); require( presale[currentSale].amountRaised + usdcAmount <= presale[currentSale].UsdtHardcap, "Amount should be less than leftHardcap" ); require(!isBlackList[msg.sender], "Account is blackListed"); if (!isExist[msg.sender]) { isExist[msg.sender] = true; uniqueBuyers++; } uint256 tokens = usdtToTokens(currentSale, usdcAmount); presale[currentSale].Sold += tokens; presale[currentSale].amountRaised += usdcAmount; overalllRaised += usdcAmount; if (isExcludeMinToken[msg.sender] == false) { require(tokens >= MinTokenTobuy, "Less than min amount"); } if (userClaimData[_msgSender()][currentSale].claimAbleAmount > 0) { userClaimData[_msgSender()][currentSale].claimAbleAmount += tokens; userClaimData[_msgSender()][currentSale] .investedAmount += usdcAmount; } else { userClaimData[_msgSender()][currentSale] = UserData( usdcAmount, 0, tokens, 0, 0 ); require(isExist[_msgSender()], "User not a participant"); } uint256 ourAllowance = USDTInterface.allowance( _msgSender(), address(this) ); require( usdcAmount <= ourAllowance, "Make sure to add enough allowance" ); (bool success, ) = address(USDCInterface).call( abi.encodeWithSignature( "transferFrom(address,address,uint256)", _msgSender(), fundReceiver, usdcAmount ) ); require(success, "Token payment failed"); emit TokensBought( _msgSender(), currentSale, address(USDTInterface), tokens, usdcAmount, block.timestamp ); return true; } function buyWithEth() external payable checkPresaleId(currentSale) checkSaleState(currentSale, ethToTokens(currentSale, msg.value)) nonReentrant returns (bool) { uint256 usdAmount = (msg.value * getLatestPrice() * USDT_MULTIPLIER) / (ETH_MULTIPLIER * ETH_MULTIPLIER); require( presale[currentSale].amountRaised + usdAmount <= presale[currentSale].UsdtHardcap, "Amount should be less than leftHardcap" ); require(!isBlackList[msg.sender], "Account is blackListed"); require(!paused[currentSale], "Presale paused"); require( presale[currentSale].Active == true, "Presale is not active yet" ); if (!isExist[msg.sender]) { isExist[msg.sender] = true; uniqueBuyers++; } uint256 tokens = usdtToTokens(currentSale, usdAmount); if (isExcludeMinToken[msg.sender] == false) { require(tokens >= MinTokenTobuy, "Insufficient amount!"); } presale[currentSale].Sold += tokens; presale[currentSale].amountRaised += usdAmount; overalllRaised += usdAmount; if (userClaimData[_msgSender()][currentSale].claimAbleAmount > 0) { userClaimData[_msgSender()][currentSale].claimAbleAmount += tokens; userClaimData[_msgSender()][currentSale] .investedAmount += usdAmount; } else { userClaimData[_msgSender()][currentSale] = UserData( usdAmount, 0, // Last claimed at tokens, // total tokens to be claimed 0, // claimed amount 0 // claim count ); } sendValue(payable(fundReceiver), msg.value); emit TokensBought( _msgSender(), currentSale, address(0), tokens, msg.value, block.timestamp ); return true; } function ethBuyHelper( uint256 _id, uint256 amount ) external view returns (uint256 ethAmount) { uint256 usdPrice = (amount * presale[_id].price); ethAmount = (usdPrice * ETH_MULTIPLIER) / (getLatestPrice() * 10 ** IERC20Metadata(SaleToken).decimals()); } function usdtBuyHelper( uint256 _id, uint256 amount ) external view returns (uint256 usdPrice) { usdPrice = (amount * presale[_id].price) / 10 ** IERC20Metadata(SaleToken).decimals(); } 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); } function usdtToTokens( uint256 _id, uint256 amount ) public view 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 claimableAmount( address user, uint256 _id ) public view returns (uint256) { UserData memory _user = userClaimData[user][_id]; require(_user.claimAbleAmount > 0, "Nothing to claim"); uint256 amount = _user.claimAbleAmount; require(amount > 0, "Already claimed"); return amount; } function claimAmount(uint256 _id) public returns (bool) { require(isExist[_msgSender()], "User not a participant"); uint256 amount = claimableAmount(msg.sender, _id); require(amount > 0, "No claimable amount"); require(!isBlackList[msg.sender], "Account is blackListed"); 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"); uint256 transferAmount; if (userClaimData[msg.sender][_id].claimCount == 0) { transferAmount = amount; bool status = IERC20(SaleToken).transfer( msg.sender, transferAmount ); require(status, "Token transfer failed"); userClaimData[msg.sender][_id].claimAbleAmount -= transferAmount; userClaimData[msg.sender][_id].claimedAmount += transferAmount; userClaimData[msg.sender][_id].claimCount++; } 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); } function ChangeTokenToSell(address _token) public onlyOwner { SaleToken = _token; } function EditMinTokenToBuy(uint256 _amount) public onlyOwner { MinTokenTobuy = _amount; } function ChangeOracleAddress(address _oracle) public onlyOwner { aggregatorInterface = Aggregator(_oracle); } function blockStamp() public view returns (uint256) { return block.timestamp; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @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; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../token/ERC20/extensions/IERC20Metadata.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _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. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "shanghai", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
[{"inputs":[{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"address","name":"_usdt","type":"address"},{"internalType":"address","name":"_usdc","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":"_oracle","type":"address"}],"name":"ChangeOracleAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"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":"USDCInterface","outputs":[{"internalType":"contract IERC20Metadata","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":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bool","name":"_value","type":"bool"}],"name":"blackListUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"blockStamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyWithEth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdcAmount","type":"uint256"}],"name":"buyWithUSDC","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","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":"_oldAddress","type":"address"},{"internalType":"address","name":"_newWallet","type":"address"}],"name":"changeClaimAddress","outputs":[],"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":"changeUSDCToken","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":"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":[],"name":"currentSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"enableClaim","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":"isBlackList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExcludeMinToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"overalllRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"setPresaleStage","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":[],"name":"uniqueBuyers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"},{"internalType":"bool","name":"isclaimAble","type":"bool"}],"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":"investedAmount","type":"uint256"},{"internalType":"uint256","name":"claimAt","type":"uint256"},{"internalType":"uint256","name":"claimAbleAmount","type":"uint256"},{"internalType":"uint256","name":"claimedAmount","type":"uint256"},{"internalType":"uint256","name":"claimCount","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801562000010575f80fd5b506040516200316338038062003163833981016040819052620000339162000125565b60015f556200004233620000b8565b600a80546001600160a01b03199081166001600160a01b039788161790915560138054821693871693909317909255601155600880548216938516939093179092556009805483169190931617909155670de0b6b3a7640000600555620f42406004556006805433921691909117905562000188565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b80516001600160a01b038116811462000120575f80fd5b919050565b5f805f805f60a086880312156200013a575f80fd5b620001458662000109565b9450620001556020870162000109565b9350620001656040870162000109565b9250620001756060870162000109565b9150608086015190509295509295909350565b612fcd80620001965f395ff3fe608060405260043610610289575f3560e01c8063833cde5211610155578063d01608c1116100be578063f2fde38b11610078578063f2fde38b146108a2578063f309fed9146108c1578063f427fdf9146108e0578063f597573f146108f2578063fb4aa0a114610911578063fe9f676e14610930575f80fd5b8063d01608c114610753578063d099850a14610772578063e0cef1b014610791578063e18e84f9146107b0578063e6ab1434146107c5578063ecf5f43714610883575f80fd5b8063a7c601601161010f578063a7c6016014610638578063aa1c3aa514610657578063aeccf7351461066c578063b04c73461461068b578063b36d691914610706578063cd1704a814610734575f80fd5b8063833cde521461059f5780638561c315146105be5780638d79e66d146105dd5780638da5cb5b146105f25780638e15f4731461060f578063a05d03fd14610623575f80fd5b806339764363116101f7578063680f2e4f116101b1578063680f2e4f146104f05780636fb4adff1461050f578063715018a61461052e578063718a19621461054257806379b8d938146105615780637cde403d14610580575f80fd5b8063397643631461045457806348bf4fcf146104695780634a6413f71461047e578063582b57231461049d57806358f98585146104bc5780635dfd59f6146104d1575f80fd5b806311b5444f1161024857806311b5444f1461037c5780631ed0c954146103845780632127fe04146103b257806323b221a0146103df57806325312e54146103fe5780632fb2b44b14610435575f80fd5b806213eb4b1461028d578062dde10e146102d057806303fcd9ac146102fe5780630d07cc301461031f5780630ec809a81461033e5780630fbfcf371461035d575b5f80fd5b348015610298575f80fd5b506102bb6102a7366004612a1b565b60106020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b3480156102db575f80fd5b506102bb6102ea366004612a34565b600b6020525f908152604090205460ff1681565b348015610309575f80fd5b5061031d610318366004612a58565b61094f565b005b34801561032a575f80fd5b5061031d610339366004612a1b565b610981565b348015610349575f80fd5b5061031d610358366004612a1b565b6109ab565b348015610368575f80fd5b5061031d610377366004612a8d565b6109d5565b6102bb610a06565b34801561038f575f80fd5b506102bb61039e366004612a1b565b600e6020525f908152604090205460ff1681565b3480156103bd575f80fd5b506103d16103cc366004612ab0565b610e8f565b6040519081526020016102c7565b3480156103ea575f80fd5b506102bb6103f9366004612a34565b610f5e565b348015610409575f80fd5b5060095461041d906001600160a01b031681565b6040516001600160a01b0390911681526020016102c7565b348015610440575f80fd5b5061031d61044f366004612ad0565b611305565b34801561045f575f80fd5b506103d160055481565b348015610474575f80fd5b506103d160045481565b348015610489575f80fd5b5061031d610498366004612a34565b61140e565b3480156104a8575f80fd5b5061031d6104b7366004612a34565b6114ea565b3480156104c7575f80fd5b506103d160025481565b3480156104dc575f80fd5b5061031d6104eb366004612b21565b61150b565b3480156104fb575f80fd5b5061031d61050a366004612b52565b6115e5565b34801561051a575f80fd5b5061031d610529366004612a1b565b611666565b348015610539575f80fd5b5061031d6116db565b34801561054d575f80fd5b506103d161055c366004612ab0565b6116ee565b34801561056c575f80fd5b506103d161057b366004612b52565b611735565b34801561058b575f80fd5b5061031d61059a366004612a34565b61181a565b3480156105aa575f80fd5b5060135461041d906001600160a01b031681565b3480156105c9575f80fd5b5061031d6105d8366004612a1b565b6118ca565b3480156105e8575f80fd5b506103d160115481565b3480156105fd575f80fd5b506001546001600160a01b031661041d565b34801561061a575f80fd5b506103d161193f565b34801561062e575f80fd5b506103d160125481565b348015610643575f80fd5b506102bb610652366004612a34565b611955565b348015610662575f80fd5b506103d160075481565b348015610677575f80fd5b506102bb610686366004612a34565b611f27565b348015610696575f80fd5b506106de6106a5366004612b52565b600d60209081525f9283526040808420909152908252902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a0016102c7565b348015610711575f80fd5b506102bb610720366004612a1b565b600f6020525f908152604090205460ff1681565b34801561073f575f80fd5b5061031d61074e366004612a34565b6123dc565b34801561075e575f80fd5b5061031d61076d366004612a34565b6123e9565b34801561077d575f80fd5b5061031d61078c366004612b7a565b6124b1565b34801561079c575f80fd5b5061031d6107ab366004612a58565b61264c565b3480156107bb575f80fd5b506103d160035481565b3480156107d0575f80fd5b506108356107df366004612a34565b600c6020525f908152604090208054600182015460028301546003840154600485015460058601546006870154600788015460089098015496979596949593949293919290919060ff808216916101009004168a565b604080519a8b5260208b0199909952978901969096526060880194909452608087019290925260a086015260c085015260e084015215156101008301521515610120820152610140016102c7565b34801561088e575f80fd5b5061031d61089d366004612a1b565b61267e565b3480156108ad575f80fd5b5061031d6108bc366004612a1b565b6126f3565b3480156108cc575f80fd5b506103d16108db366004612ab0565b612769565b3480156108eb575f80fd5b50426103d1565b3480156108fd575f80fd5b5060085461041d906001600160a01b031681565b34801561091c575f80fd5b5060065461041d906001600160a01b031681565b34801561093b575f80fd5b506103d161094a366004612ab0565b61279b565b61095761282c565b6001600160a01b03919091165f908152600e60205260409020805460ff1916911515919091179055565b61098961282c565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6109b361282c565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6109dd61282c565b5f918252600c602052604090912060080180549115156101000261ff0019909216919091179055565b5f6012545f81118015610a1a575060125481145b610a3f5760405162461bcd60e51b8152600401610a3690612ba9565b60405180910390fd5b601254610a4c81346116ee565b5f828152600c602052604090206008015460ff161515600114610a815760405162461bcd60e51b8152600401610a3690612bd5565b5f81118015610ab157505f828152600c602052604090206004810154600590910154610aad9190612c15565b8111155b610acd5760405162461bcd60e51b8152600401610a3690612c28565b610ad5612886565b6005545f90610ae49080612c55565b600454610aef61193f565b610af99034612c55565b610b039190612c55565b610b0d9190612c6c565b6012545f908152600c60205260409020600681015460079091015491925090610b37908390612c8b565b1115610b555760405162461bcd60e51b8152600401610a3690612c9e565b335f908152600f602052604090205460ff1615610b845760405162461bcd60e51b8152600401610a3690612ce4565b6012545f908152600b602052604090205460ff1615610bb55760405162461bcd60e51b8152600401610a3690612d14565b6012545f908152600c602052604090206008015460ff161515600114610bed5760405162461bcd60e51b8152600401610a3690612d3c565b335f9081526010602052604090205460ff16610c3057335f908152601060205260408120805460ff191660011790556007805491610c2a83612d73565b91905055505b5f610c3d60125483612769565b335f908152600e602052604081205491925060ff90911615159003610ca557601154811015610ca55760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e7420616d6f756e742160601b6044820152606401610a36565b6012545f908152600c602052604081206004018054839290610cc8908490612c8b565b90915550506012545f908152600c602052604081206007018054849290610cf0908490612c8b565b925050819055508160025f828254610d089190612c8b565b9091555050335f908152600d60209081526040808320601254845290915290206002015415610d9a57335f908152600d60209081526040808320601254845290915281206002018054839290610d5f908490612c8b565b9091555050335f908152600d60209081526040808320601254845290915281208054849290610d8f908490612c8b565b90915550610e1e9050565b6040518060a001604052808381526020015f81526020018281526020015f81526020015f815250600d5f610dcb3390565b6001600160a01b0316815260208082019290925260409081015f90812060125482528352819020835181559183015160018301558201516002820155606082015160038201556080909101516004909101555b600654610e34906001600160a01b0316346128dd565b60125460408051838152346020820152428183015290515f929133917f4d8aead3491b7eba4b5c7a65fc17e493b9e63f9e433522fc5f6a85a168fc9d369181900360600190a4600195505050610e8960015f55565b50505090565b5f828152600c60205260408120600201548190610eac9084612c55565b905060135f9054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610efe573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f229190612d8b565b610f2d90600a612e8b565b610f3561193f565b610f3f9190612c55565b600554610f4c9083612c55565b610f569190612c6c565b949350505050565b335f9081526010602052604081205460ff16610f8c5760405162461bcd60e51b8152600401610a3690612e99565b5f610f973384611735565b90505f8111610fde5760405162461bcd60e51b8152602060048201526013602482015272139bc818db185a5b58589b1948185b5bdd5b9d606a1b6044820152606401610a36565b335f908152600f602052604090205460ff161561100d5760405162461bcd60e51b8152600401610a3690612ce4565b6013546001600160a01b03166110655760405162461bcd60e51b815260206004820152601d60248201527f50726573616c6520746f6b656e2061646472657373206e6f74207365740000006044820152606401610a36565b6013546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156110ab573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110cf9190612ec9565b8111156111285760405162461bcd60e51b815260206004820152602160248201527f4e6f7420656e6f75676820746f6b656e7320696e2074686520636f6e747261636044820152601d60fa1b6064820152608401610a36565b5f838152600c602052604090206008015460ff6101009091041615156001146111895760405162461bcd60e51b8152602060048201526013602482015272436c61696d206973206e6f7420656e61626c6560681b6044820152606401610a36565b335f908152600d6020908152604080832086845290915281206004015481036112fb575060135460405163a9059cbb60e01b81523360048201526024810183905282915f916001600160a01b039091169063a9059cbb906044016020604051808303815f875af11580156111ff573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112239190612ee0565b90508061126a5760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610a36565b335f908152600d6020908152604080832088845290915281206002018054849290611296908490612c15565b9091555050335f908152600d60209081526040808320888452909152812060030180548492906112c7908490612c8b565b9091555050335f908152600d6020908152604080832088845290915281206004018054916112f483612d73565b9190505550505b5060019392505050565b61130d61282c565b5f85116113495760405162461bcd60e51b815260206004820152600a6024820152695a65726f20707269636560b01b6044820152606401610a36565b5f831161138e5760405162461bcd60e51b815260206004820152601360248201527216995c9bc81d1bdad95b9cc81d1bc81cd95b1b606a1b6044820152606401610a36565b5f82116113cb5760405162461bcd60e51b815260206004820152600b60248201526a05a65726f206861726361760ac1b6044820152606401610a36565b5f958652600c6020526040909520600281019490945560038401929092556005830155600682015560080180549115156101000261ff0019909216919091179055565b805f8111801561141f575060125481145b61143b5760405162461bcd60e51b8152600401610a3690612ba9565b61144361282c565b5f828152600b602052604090205460ff16156114925760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481c185d5cd95960921b6044820152606401610a36565b5f828152600b602052604090819020805460ff191660011790555182907f927e6cd2dce24f32508868820cdc35f09d9de0f4b44e945114110125196fba9f906114de9042815260200190565b60405180910390a25050565b6114f261282c565b600654611508906001600160a01b0316826128dd565b50565b61151361282c565b60015b6003548110156115aa576001600160a01b0383165f9081526010602052604090205460ff166115575760405162461bcd60e51b8152600401610a3690612e99565b6001600160a01b038381165f908152600d6020818152604080842086855280835281852060029081018054978a168752948452828620888752845291852090910194909455929092529055600101611516565b506001600160a01b039182165f90815260106020526040808220805460ff199081169091559290931681529190912080549091166001179055565b6115ed61282c565b60065460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390529083169063a9059cbb906044016020604051808303815f875af115801561163d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116619190612ee0565b505050565b61166e61282c565b6001600160a01b0381166116b95760405162461bcd60e51b8152602060048201526012602482015271496e76616c696420706172616d657465727360701b6044820152606401610a36565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6116e361282c565b6116ec5f6129af565b565b5f806005546005546117009190612c55565b60045461170b61193f565b6117159086612c55565b61171f9190612c55565b6117299190612c6c565b9050610f568482612769565b6001600160a01b0382165f908152600d602090815260408083208484528252808320815160a081018352815481526001820154938101939093526002810154918301829052600381015460608401526004015460808301526117cc5760405162461bcd60e51b815260206004820152601060248201526f4e6f7468696e6720746f20636c61696d60801b6044820152606401610a36565b6040810151806118105760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b6044820152606401610a36565b9150505b92915050565b61182261282c565b5f818152600c60205260409020600501546118755760405162461bcd60e51b8152602060048201526013602482015272141c995cd85b1948191bdb89dd08195e1a5cdd606a1b6044820152606401610a36565b601254156118a757601280545f908152600c6020526040808220426001909101559154815220600801805460ff191690555b5f818152600c60205260409020428155600801805460ff19166001179055601255565b6118d261282c565b6001600160a01b03811661191d5760405162461bcd60e51b81526020600482015260126024820152715a65726f20746f6b656e206164647265737360701b6044820152606401610a36565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b5f6455e3ea1d5b611814816402540be400612efb565b5f6012545f81118015611969575060125481145b6119855760405162461bcd60e51b8152600401610a3690612ba9565b6012546119928185612769565b5f828152600c602052604090206008015460ff1615156001146119c75760405162461bcd60e51b8152600401610a3690612bd5565b5f811180156119f757505f828152600c6020526040902060048101546005909101546119f39190612c15565b8111155b611a135760405162461bcd60e51b8152600401610a3690612c28565b611a1b612886565b6012545f908152600b602052604090205460ff1615611a4c5760405162461bcd60e51b8152600401610a3690612d14565b6012545f908152600c602052604090206008015460ff161515600114611a845760405162461bcd60e51b8152600401610a3690612d3c565b335f908152600f602052604090205460ff1615611ab35760405162461bcd60e51b8152600401610a3690612ce4565b6012545f908152600c602052604090206006810154600790910154611ad9908790612c8b565b1115611af75760405162461bcd60e51b8152600401610a3690612c9e565b335f9081526010602052604090205460ff16611b3a57335f908152601060205260408120805460ff191660011790556007805491611b3483612d73565b91905055505b5f611b4760125487612769565b905080600c5f60125481526020019081526020015f206004015f828254611b6e9190612c8b565b90915550506012545f908152600c602052604081206007018054889290611b96908490612c8b565b925050819055508560025f828254611bae9190612c8b565b9091555050335f908152600e602052604081205460ff1615159003611c1657601154811015611c165760405162461bcd60e51b815260206004820152601460248201527313195cdcc81d1a185b881b5a5b88185b5bdd5b9d60621b6044820152606401610a36565b335f908152600d60209081526040808320601254845290915290206002015415611ca357335f908152600d60209081526040808320601254845290915281206002018054839290611c68908490612c8b565b9091555050335f908152600d60209081526040808320601254845290915281208054889290611c98908490612c8b565b90915550611d279050565b6040518060a001604052808781526020015f81526020018281526020015f81526020015f815250600d5f611cd43390565b6001600160a01b0316815260208082019290925260409081015f90812060125482528352819020835181559183015160018301558201516002820155606082015160038201556080909101516004909101555b6008545f906001600160a01b031663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa158015611d83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611da79190612ec9565b905080871115611dc95760405162461bcd60e51b8152600401610a3690612f2a565b6008545f906001600160a01b0316335b6006546040516001600160a01b03928316602482015291166044820152606481018a905260840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251611e359190612f6b565b5f604051808303815f865af19150503d805f8114611e6e576040519150601f19603f3d011682016040523d82523d5f602084013e611e73565b606091505b5050905080611ebb5760405162461bcd60e51b8152602060048201526014602482015273151bdad95b881c185e5b595b9d0819985a5b195960621b6044820152606401610a36565b60085460125460408051868152602081018c9052428183015290516001600160a01b039093169233917f4d8aead3491b7eba4b5c7a65fc17e493b9e63f9e433522fc5f6a85a168fc9d36919081900360600190a460019650505050611f1f60015f55565b505050919050565b5f6012545f81118015611f3b575060125481145b611f575760405162461bcd60e51b8152600401610a3690612ba9565b601254611f648185612769565b5f828152600c602052604090206008015460ff161515600114611f995760405162461bcd60e51b8152600401610a3690612bd5565b5f81118015611fc957505f828152600c602052604090206004810154600590910154611fc59190612c15565b8111155b611fe55760405162461bcd60e51b8152600401610a3690612c28565b611fed612886565b6012545f908152600b602052604090205460ff161561201e5760405162461bcd60e51b8152600401610a3690612d14565b6012545f908152600c602052604090206008015460ff1615156001146120565760405162461bcd60e51b8152600401610a3690612d3c565b6012545f908152600c60205260409020600681015460079091015461207c908790612c8b565b111561209a5760405162461bcd60e51b8152600401610a3690612c9e565b335f908152600f602052604090205460ff16156120c95760405162461bcd60e51b8152600401610a3690612ce4565b335f9081526010602052604090205460ff1661210c57335f908152601060205260408120805460ff19166001179055600780549161210683612d73565b91905055505b5f61211960125487612769565b905080600c5f60125481526020019081526020015f206004015f8282546121409190612c8b565b90915550506012545f908152600c602052604081206007018054889290612168908490612c8b565b925050819055508560025f8282546121809190612c8b565b9091555050335f908152600e602052604081205460ff16151590036121e8576011548110156121e85760405162461bcd60e51b815260206004820152601460248201527313195cdcc81d1a185b881b5a5b88185b5bdd5b9d60621b6044820152606401610a36565b335f908152600d6020908152604080832060125484529091529020600201541561227557335f908152600d6020908152604080832060125484529091528120600201805483929061223a908490612c8b565b9091555050335f908152600d6020908152604080832060125484529091528120805488929061226a908490612c8b565b909155506123269050565b6040518060a001604052808781526020015f81526020018281526020015f81526020015f815250600d5f6122a63390565b6001600160a01b0316815260208082019290925260409081015f908120601254825283528181208451815584840151600182015584830151600282015560608501516003820155608090940151600490940193909355338352601090915290205460ff166123265760405162461bcd60e51b8152600401610a3690612e99565b6008545f906001600160a01b031663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa158015612382573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123a69190612ec9565b9050808711156123c85760405162461bcd60e51b8152600401610a3690612f2a565b6009545f906001600160a01b031633611dd9565b6123e461282c565b601155565b805f811180156123fa575060125481145b6124165760405162461bcd60e51b8152600401610a3690612ba9565b61241e61282c565b5f828152600b602052604090205460ff166124685760405162461bcd60e51b815260206004820152600a602482015269139bdd081c185d5cd95960b21b6044820152606401610a36565b5f828152600b602052604090819020805460ff191690555182907ff608654a6d8e1785594639dd55babb61d7ae157382015f904a24224e50333b1d906114de9042815260200190565b6124b961282c565b5f84116124f55760405162461bcd60e51b815260206004820152600a6024820152695a65726f20707269636560b01b6044820152606401610a36565b5f821161253a5760405162461bcd60e51b815260206004820152601360248201527216995c9bc81d1bdad95b9cc81d1bc81cd95b1b606a1b6044820152606401610a36565b60038054905f61254983612d73565b909155505060408051610140810182525f808252602080830182815283850189815260608086018a81526080870186815260a088018b815260c089018b815260e08a01898152610100808c018b81526101208d018c8152600380548e52600c8d528f8e209e518f559a5160018f0155985160028e015595518c8a0155935160048c0155915160058b01555160068a0155516007890155905160089097018054935161ffff1990941697151561ff001916979097179215150291909117909455548451878152918201839052938101919091527f6a00651728a92841411081673eaa4eddbed06d102a590e050c22def40d4dd0b8910160405180910390a250505050565b61265461282c565b6001600160a01b03919091165f908152600f60205260409020805460ff1916911515919091179055565b61268661282c565b6001600160a01b0381166126d15760405162461bcd60e51b81526020600482015260126024820152715a65726f20746f6b656e206164647265737360701b6044820152606401610a36565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6126fb61282c565b6001600160a01b0381166127605760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a36565b611508816129af565b6004545f838152600c602052604081206002015490919061278a9084612c55565b6127949190612c6c565b9392505050565b6013546040805163313ce56760e01b815290515f926001600160a01b03169163313ce5679160048083019260209291908290030181865afa1580156127e2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128069190612d8b565b61281190600a612e8b565b5f848152600c602052604090206002015461278a9084612c55565b6001546001600160a01b031633146116ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a36565b60025f54036128d75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a36565b60025f55565b8047101561291b5760405162461bcd60e51b815260206004820152600b60248201526a4c6f772062616c616e636560a81b6044820152606401610a36565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114612964576040519150601f19603f3d011682016040523d82523d5f602084013e612969565b606091505b50509050806116615760405162461bcd60e51b81526020600482015260126024820152711155120814185e5b595b9d0819985a5b195960721b6044820152606401610a36565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b80356001600160a01b0381168114612a16575f80fd5b919050565b5f60208284031215612a2b575f80fd5b61279482612a00565b5f60208284031215612a44575f80fd5b5035919050565b8015158114611508575f80fd5b5f8060408385031215612a69575f80fd5b612a7283612a00565b91506020830135612a8281612a4b565b809150509250929050565b5f8060408385031215612a9e575f80fd5b823591506020830135612a8281612a4b565b5f8060408385031215612ac1575f80fd5b50508035926020909101359150565b5f805f805f8060c08789031215612ae5575f80fd5b863595506020870135945060408701359350606087013592506080870135915060a0870135612b1381612a4b565b809150509295509295509295565b5f8060408385031215612b32575f80fd5b612b3b83612a00565b9150612b4960208401612a00565b90509250929050565b5f8060408385031215612b63575f80fd5b612b6c83612a00565b946020939093013593505050565b5f805f8060808587031215612b8d575f80fd5b5050823594602084013594506040840135936060013592509050565b602080825260129082015271125b9d985b1a59081c1c995cd85b19481a5960721b604082015260600190565b60208082526012908201527150726573616c65206e6f742041637469766560701b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561181457611814612c01565b602080825260139082015272125b9d985b1a59081cd85b1948185b5bdd5b9d606a1b604082015260600190565b808202811582820484141761181457611814612c01565b5f82612c8657634e487b7160e01b5f52601260045260245ffd5b500490565b8082018082111561181457611814612c01565b60208082526026908201527f416d6f756e742073686f756c64206265206c657373207468616e206c6566744860408201526506172646361760d41b606082015260800190565b6020808252601690820152751058d8dbdd5b9d081a5cc8189b1858dad31a5cdd195960521b604082015260600190565b6020808252600e908201526d141c995cd85b19481c185d5cd95960921b604082015260600190565b60208082526019908201527f50726573616c65206973206e6f74206163746976652079657400000000000000604082015260600190565b5f60018201612d8457612d84612c01565b5060010190565b5f60208284031215612d9b575f80fd5b815160ff81168114612794575f80fd5b600181815b80851115612de557815f1904821115612dcb57612dcb612c01565b80851615612dd857918102915b93841c9390800290612db0565b509250929050565b5f82612dfb57506001611814565b81612e0757505f611814565b8160018114612e1d5760028114612e2757612e43565b6001915050611814565b60ff841115612e3857612e38612c01565b50506001821b611814565b5060208310610133831016604e8410600b8410161715612e66575081810a611814565b612e708383612dab565b805f1904821115612e8357612e83612c01565b029392505050565b5f61279460ff841683612ded565b602080825260169082015275155cd95c881b9bdd0818481c185c9d1a58da5c185b9d60521b604082015260600190565b5f60208284031215612ed9575f80fd5b5051919050565b5f60208284031215612ef0575f80fd5b815161279481612a4b565b8082025f8212600160ff1b84141615612f1657612f16612c01565b818105831482151761181457611814612c01565b60208082526021908201527f4d616b65207375726520746f2061646420656e6f75676820616c6c6f77616e636040820152606560f81b606082015260800190565b5f82515f5b81811015612f8a5760208186018101518583015201612f70565b505f92019182525091905056fea2646970667358221220869050764f22614a8422231cedb03f3b516b67fab3e11881ecded1d70fb296df64736f6c634300081600330000000000000000000000006090149792daaee9d1d568c9f9a6f6b46aa29efd000000000000000000000000ee0aea94c14531eea548b925e706908182e301bf000000000000000000000000f08a50178dfcde18524640ea6618a1f965821715000000000000000000000000fed1f22979c0e4425d85138665aaf7c84ddb7e7d0000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405260043610610289575f3560e01c8063833cde5211610155578063d01608c1116100be578063f2fde38b11610078578063f2fde38b146108a2578063f309fed9146108c1578063f427fdf9146108e0578063f597573f146108f2578063fb4aa0a114610911578063fe9f676e14610930575f80fd5b8063d01608c114610753578063d099850a14610772578063e0cef1b014610791578063e18e84f9146107b0578063e6ab1434146107c5578063ecf5f43714610883575f80fd5b8063a7c601601161010f578063a7c6016014610638578063aa1c3aa514610657578063aeccf7351461066c578063b04c73461461068b578063b36d691914610706578063cd1704a814610734575f80fd5b8063833cde521461059f5780638561c315146105be5780638d79e66d146105dd5780638da5cb5b146105f25780638e15f4731461060f578063a05d03fd14610623575f80fd5b806339764363116101f7578063680f2e4f116101b1578063680f2e4f146104f05780636fb4adff1461050f578063715018a61461052e578063718a19621461054257806379b8d938146105615780637cde403d14610580575f80fd5b8063397643631461045457806348bf4fcf146104695780634a6413f71461047e578063582b57231461049d57806358f98585146104bc5780635dfd59f6146104d1575f80fd5b806311b5444f1161024857806311b5444f1461037c5780631ed0c954146103845780632127fe04146103b257806323b221a0146103df57806325312e54146103fe5780632fb2b44b14610435575f80fd5b806213eb4b1461028d578062dde10e146102d057806303fcd9ac146102fe5780630d07cc301461031f5780630ec809a81461033e5780630fbfcf371461035d575b5f80fd5b348015610298575f80fd5b506102bb6102a7366004612a1b565b60106020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b3480156102db575f80fd5b506102bb6102ea366004612a34565b600b6020525f908152604090205460ff1681565b348015610309575f80fd5b5061031d610318366004612a58565b61094f565b005b34801561032a575f80fd5b5061031d610339366004612a1b565b610981565b348015610349575f80fd5b5061031d610358366004612a1b565b6109ab565b348015610368575f80fd5b5061031d610377366004612a8d565b6109d5565b6102bb610a06565b34801561038f575f80fd5b506102bb61039e366004612a1b565b600e6020525f908152604090205460ff1681565b3480156103bd575f80fd5b506103d16103cc366004612ab0565b610e8f565b6040519081526020016102c7565b3480156103ea575f80fd5b506102bb6103f9366004612a34565b610f5e565b348015610409575f80fd5b5060095461041d906001600160a01b031681565b6040516001600160a01b0390911681526020016102c7565b348015610440575f80fd5b5061031d61044f366004612ad0565b611305565b34801561045f575f80fd5b506103d160055481565b348015610474575f80fd5b506103d160045481565b348015610489575f80fd5b5061031d610498366004612a34565b61140e565b3480156104a8575f80fd5b5061031d6104b7366004612a34565b6114ea565b3480156104c7575f80fd5b506103d160025481565b3480156104dc575f80fd5b5061031d6104eb366004612b21565b61150b565b3480156104fb575f80fd5b5061031d61050a366004612b52565b6115e5565b34801561051a575f80fd5b5061031d610529366004612a1b565b611666565b348015610539575f80fd5b5061031d6116db565b34801561054d575f80fd5b506103d161055c366004612ab0565b6116ee565b34801561056c575f80fd5b506103d161057b366004612b52565b611735565b34801561058b575f80fd5b5061031d61059a366004612a34565b61181a565b3480156105aa575f80fd5b5060135461041d906001600160a01b031681565b3480156105c9575f80fd5b5061031d6105d8366004612a1b565b6118ca565b3480156105e8575f80fd5b506103d160115481565b3480156105fd575f80fd5b506001546001600160a01b031661041d565b34801561061a575f80fd5b506103d161193f565b34801561062e575f80fd5b506103d160125481565b348015610643575f80fd5b506102bb610652366004612a34565b611955565b348015610662575f80fd5b506103d160075481565b348015610677575f80fd5b506102bb610686366004612a34565b611f27565b348015610696575f80fd5b506106de6106a5366004612b52565b600d60209081525f9283526040808420909152908252902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a0016102c7565b348015610711575f80fd5b506102bb610720366004612a1b565b600f6020525f908152604090205460ff1681565b34801561073f575f80fd5b5061031d61074e366004612a34565b6123dc565b34801561075e575f80fd5b5061031d61076d366004612a34565b6123e9565b34801561077d575f80fd5b5061031d61078c366004612b7a565b6124b1565b34801561079c575f80fd5b5061031d6107ab366004612a58565b61264c565b3480156107bb575f80fd5b506103d160035481565b3480156107d0575f80fd5b506108356107df366004612a34565b600c6020525f908152604090208054600182015460028301546003840154600485015460058601546006870154600788015460089098015496979596949593949293919290919060ff808216916101009004168a565b604080519a8b5260208b0199909952978901969096526060880194909452608087019290925260a086015260c085015260e084015215156101008301521515610120820152610140016102c7565b34801561088e575f80fd5b5061031d61089d366004612a1b565b61267e565b3480156108ad575f80fd5b5061031d6108bc366004612a1b565b6126f3565b3480156108cc575f80fd5b506103d16108db366004612ab0565b612769565b3480156108eb575f80fd5b50426103d1565b3480156108fd575f80fd5b5060085461041d906001600160a01b031681565b34801561091c575f80fd5b5060065461041d906001600160a01b031681565b34801561093b575f80fd5b506103d161094a366004612ab0565b61279b565b61095761282c565b6001600160a01b03919091165f908152600e60205260409020805460ff1916911515919091179055565b61098961282c565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6109b361282c565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6109dd61282c565b5f918252600c602052604090912060080180549115156101000261ff0019909216919091179055565b5f6012545f81118015610a1a575060125481145b610a3f5760405162461bcd60e51b8152600401610a3690612ba9565b60405180910390fd5b601254610a4c81346116ee565b5f828152600c602052604090206008015460ff161515600114610a815760405162461bcd60e51b8152600401610a3690612bd5565b5f81118015610ab157505f828152600c602052604090206004810154600590910154610aad9190612c15565b8111155b610acd5760405162461bcd60e51b8152600401610a3690612c28565b610ad5612886565b6005545f90610ae49080612c55565b600454610aef61193f565b610af99034612c55565b610b039190612c55565b610b0d9190612c6c565b6012545f908152600c60205260409020600681015460079091015491925090610b37908390612c8b565b1115610b555760405162461bcd60e51b8152600401610a3690612c9e565b335f908152600f602052604090205460ff1615610b845760405162461bcd60e51b8152600401610a3690612ce4565b6012545f908152600b602052604090205460ff1615610bb55760405162461bcd60e51b8152600401610a3690612d14565b6012545f908152600c602052604090206008015460ff161515600114610bed5760405162461bcd60e51b8152600401610a3690612d3c565b335f9081526010602052604090205460ff16610c3057335f908152601060205260408120805460ff191660011790556007805491610c2a83612d73565b91905055505b5f610c3d60125483612769565b335f908152600e602052604081205491925060ff90911615159003610ca557601154811015610ca55760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e7420616d6f756e742160601b6044820152606401610a36565b6012545f908152600c602052604081206004018054839290610cc8908490612c8b565b90915550506012545f908152600c602052604081206007018054849290610cf0908490612c8b565b925050819055508160025f828254610d089190612c8b565b9091555050335f908152600d60209081526040808320601254845290915290206002015415610d9a57335f908152600d60209081526040808320601254845290915281206002018054839290610d5f908490612c8b565b9091555050335f908152600d60209081526040808320601254845290915281208054849290610d8f908490612c8b565b90915550610e1e9050565b6040518060a001604052808381526020015f81526020018281526020015f81526020015f815250600d5f610dcb3390565b6001600160a01b0316815260208082019290925260409081015f90812060125482528352819020835181559183015160018301558201516002820155606082015160038201556080909101516004909101555b600654610e34906001600160a01b0316346128dd565b60125460408051838152346020820152428183015290515f929133917f4d8aead3491b7eba4b5c7a65fc17e493b9e63f9e433522fc5f6a85a168fc9d369181900360600190a4600195505050610e8960015f55565b50505090565b5f828152600c60205260408120600201548190610eac9084612c55565b905060135f9054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610efe573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f229190612d8b565b610f2d90600a612e8b565b610f3561193f565b610f3f9190612c55565b600554610f4c9083612c55565b610f569190612c6c565b949350505050565b335f9081526010602052604081205460ff16610f8c5760405162461bcd60e51b8152600401610a3690612e99565b5f610f973384611735565b90505f8111610fde5760405162461bcd60e51b8152602060048201526013602482015272139bc818db185a5b58589b1948185b5bdd5b9d606a1b6044820152606401610a36565b335f908152600f602052604090205460ff161561100d5760405162461bcd60e51b8152600401610a3690612ce4565b6013546001600160a01b03166110655760405162461bcd60e51b815260206004820152601d60248201527f50726573616c6520746f6b656e2061646472657373206e6f74207365740000006044820152606401610a36565b6013546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156110ab573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110cf9190612ec9565b8111156111285760405162461bcd60e51b815260206004820152602160248201527f4e6f7420656e6f75676820746f6b656e7320696e2074686520636f6e747261636044820152601d60fa1b6064820152608401610a36565b5f838152600c602052604090206008015460ff6101009091041615156001146111895760405162461bcd60e51b8152602060048201526013602482015272436c61696d206973206e6f7420656e61626c6560681b6044820152606401610a36565b335f908152600d6020908152604080832086845290915281206004015481036112fb575060135460405163a9059cbb60e01b81523360048201526024810183905282915f916001600160a01b039091169063a9059cbb906044016020604051808303815f875af11580156111ff573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112239190612ee0565b90508061126a5760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610a36565b335f908152600d6020908152604080832088845290915281206002018054849290611296908490612c15565b9091555050335f908152600d60209081526040808320888452909152812060030180548492906112c7908490612c8b565b9091555050335f908152600d6020908152604080832088845290915281206004018054916112f483612d73565b9190505550505b5060019392505050565b61130d61282c565b5f85116113495760405162461bcd60e51b815260206004820152600a6024820152695a65726f20707269636560b01b6044820152606401610a36565b5f831161138e5760405162461bcd60e51b815260206004820152601360248201527216995c9bc81d1bdad95b9cc81d1bc81cd95b1b606a1b6044820152606401610a36565b5f82116113cb5760405162461bcd60e51b815260206004820152600b60248201526a05a65726f206861726361760ac1b6044820152606401610a36565b5f958652600c6020526040909520600281019490945560038401929092556005830155600682015560080180549115156101000261ff0019909216919091179055565b805f8111801561141f575060125481145b61143b5760405162461bcd60e51b8152600401610a3690612ba9565b61144361282c565b5f828152600b602052604090205460ff16156114925760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481c185d5cd95960921b6044820152606401610a36565b5f828152600b602052604090819020805460ff191660011790555182907f927e6cd2dce24f32508868820cdc35f09d9de0f4b44e945114110125196fba9f906114de9042815260200190565b60405180910390a25050565b6114f261282c565b600654611508906001600160a01b0316826128dd565b50565b61151361282c565b60015b6003548110156115aa576001600160a01b0383165f9081526010602052604090205460ff166115575760405162461bcd60e51b8152600401610a3690612e99565b6001600160a01b038381165f908152600d6020818152604080842086855280835281852060029081018054978a168752948452828620888752845291852090910194909455929092529055600101611516565b506001600160a01b039182165f90815260106020526040808220805460ff199081169091559290931681529190912080549091166001179055565b6115ed61282c565b60065460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390529083169063a9059cbb906044016020604051808303815f875af115801561163d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116619190612ee0565b505050565b61166e61282c565b6001600160a01b0381166116b95760405162461bcd60e51b8152602060048201526012602482015271496e76616c696420706172616d657465727360701b6044820152606401610a36565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6116e361282c565b6116ec5f6129af565b565b5f806005546005546117009190612c55565b60045461170b61193f565b6117159086612c55565b61171f9190612c55565b6117299190612c6c565b9050610f568482612769565b6001600160a01b0382165f908152600d602090815260408083208484528252808320815160a081018352815481526001820154938101939093526002810154918301829052600381015460608401526004015460808301526117cc5760405162461bcd60e51b815260206004820152601060248201526f4e6f7468696e6720746f20636c61696d60801b6044820152606401610a36565b6040810151806118105760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b6044820152606401610a36565b9150505b92915050565b61182261282c565b5f818152600c60205260409020600501546118755760405162461bcd60e51b8152602060048201526013602482015272141c995cd85b1948191bdb89dd08195e1a5cdd606a1b6044820152606401610a36565b601254156118a757601280545f908152600c6020526040808220426001909101559154815220600801805460ff191690555b5f818152600c60205260409020428155600801805460ff19166001179055601255565b6118d261282c565b6001600160a01b03811661191d5760405162461bcd60e51b81526020600482015260126024820152715a65726f20746f6b656e206164647265737360701b6044820152606401610a36565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b5f6455e3ea1d5b611814816402540be400612efb565b5f6012545f81118015611969575060125481145b6119855760405162461bcd60e51b8152600401610a3690612ba9565b6012546119928185612769565b5f828152600c602052604090206008015460ff1615156001146119c75760405162461bcd60e51b8152600401610a3690612bd5565b5f811180156119f757505f828152600c6020526040902060048101546005909101546119f39190612c15565b8111155b611a135760405162461bcd60e51b8152600401610a3690612c28565b611a1b612886565b6012545f908152600b602052604090205460ff1615611a4c5760405162461bcd60e51b8152600401610a3690612d14565b6012545f908152600c602052604090206008015460ff161515600114611a845760405162461bcd60e51b8152600401610a3690612d3c565b335f908152600f602052604090205460ff1615611ab35760405162461bcd60e51b8152600401610a3690612ce4565b6012545f908152600c602052604090206006810154600790910154611ad9908790612c8b565b1115611af75760405162461bcd60e51b8152600401610a3690612c9e565b335f9081526010602052604090205460ff16611b3a57335f908152601060205260408120805460ff191660011790556007805491611b3483612d73565b91905055505b5f611b4760125487612769565b905080600c5f60125481526020019081526020015f206004015f828254611b6e9190612c8b565b90915550506012545f908152600c602052604081206007018054889290611b96908490612c8b565b925050819055508560025f828254611bae9190612c8b565b9091555050335f908152600e602052604081205460ff1615159003611c1657601154811015611c165760405162461bcd60e51b815260206004820152601460248201527313195cdcc81d1a185b881b5a5b88185b5bdd5b9d60621b6044820152606401610a36565b335f908152600d60209081526040808320601254845290915290206002015415611ca357335f908152600d60209081526040808320601254845290915281206002018054839290611c68908490612c8b565b9091555050335f908152600d60209081526040808320601254845290915281208054889290611c98908490612c8b565b90915550611d279050565b6040518060a001604052808781526020015f81526020018281526020015f81526020015f815250600d5f611cd43390565b6001600160a01b0316815260208082019290925260409081015f90812060125482528352819020835181559183015160018301558201516002820155606082015160038201556080909101516004909101555b6008545f906001600160a01b031663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa158015611d83573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611da79190612ec9565b905080871115611dc95760405162461bcd60e51b8152600401610a3690612f2a565b6008545f906001600160a01b0316335b6006546040516001600160a01b03928316602482015291166044820152606481018a905260840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251611e359190612f6b565b5f604051808303815f865af19150503d805f8114611e6e576040519150601f19603f3d011682016040523d82523d5f602084013e611e73565b606091505b5050905080611ebb5760405162461bcd60e51b8152602060048201526014602482015273151bdad95b881c185e5b595b9d0819985a5b195960621b6044820152606401610a36565b60085460125460408051868152602081018c9052428183015290516001600160a01b039093169233917f4d8aead3491b7eba4b5c7a65fc17e493b9e63f9e433522fc5f6a85a168fc9d36919081900360600190a460019650505050611f1f60015f55565b505050919050565b5f6012545f81118015611f3b575060125481145b611f575760405162461bcd60e51b8152600401610a3690612ba9565b601254611f648185612769565b5f828152600c602052604090206008015460ff161515600114611f995760405162461bcd60e51b8152600401610a3690612bd5565b5f81118015611fc957505f828152600c602052604090206004810154600590910154611fc59190612c15565b8111155b611fe55760405162461bcd60e51b8152600401610a3690612c28565b611fed612886565b6012545f908152600b602052604090205460ff161561201e5760405162461bcd60e51b8152600401610a3690612d14565b6012545f908152600c602052604090206008015460ff1615156001146120565760405162461bcd60e51b8152600401610a3690612d3c565b6012545f908152600c60205260409020600681015460079091015461207c908790612c8b565b111561209a5760405162461bcd60e51b8152600401610a3690612c9e565b335f908152600f602052604090205460ff16156120c95760405162461bcd60e51b8152600401610a3690612ce4565b335f9081526010602052604090205460ff1661210c57335f908152601060205260408120805460ff19166001179055600780549161210683612d73565b91905055505b5f61211960125487612769565b905080600c5f60125481526020019081526020015f206004015f8282546121409190612c8b565b90915550506012545f908152600c602052604081206007018054889290612168908490612c8b565b925050819055508560025f8282546121809190612c8b565b9091555050335f908152600e602052604081205460ff16151590036121e8576011548110156121e85760405162461bcd60e51b815260206004820152601460248201527313195cdcc81d1a185b881b5a5b88185b5bdd5b9d60621b6044820152606401610a36565b335f908152600d6020908152604080832060125484529091529020600201541561227557335f908152600d6020908152604080832060125484529091528120600201805483929061223a908490612c8b565b9091555050335f908152600d6020908152604080832060125484529091528120805488929061226a908490612c8b565b909155506123269050565b6040518060a001604052808781526020015f81526020018281526020015f81526020015f815250600d5f6122a63390565b6001600160a01b0316815260208082019290925260409081015f908120601254825283528181208451815584840151600182015584830151600282015560608501516003820155608090940151600490940193909355338352601090915290205460ff166123265760405162461bcd60e51b8152600401610a3690612e99565b6008545f906001600160a01b031663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa158015612382573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123a69190612ec9565b9050808711156123c85760405162461bcd60e51b8152600401610a3690612f2a565b6009545f906001600160a01b031633611dd9565b6123e461282c565b601155565b805f811180156123fa575060125481145b6124165760405162461bcd60e51b8152600401610a3690612ba9565b61241e61282c565b5f828152600b602052604090205460ff166124685760405162461bcd60e51b815260206004820152600a602482015269139bdd081c185d5cd95960b21b6044820152606401610a36565b5f828152600b602052604090819020805460ff191690555182907ff608654a6d8e1785594639dd55babb61d7ae157382015f904a24224e50333b1d906114de9042815260200190565b6124b961282c565b5f84116124f55760405162461bcd60e51b815260206004820152600a6024820152695a65726f20707269636560b01b6044820152606401610a36565b5f821161253a5760405162461bcd60e51b815260206004820152601360248201527216995c9bc81d1bdad95b9cc81d1bc81cd95b1b606a1b6044820152606401610a36565b60038054905f61254983612d73565b909155505060408051610140810182525f808252602080830182815283850189815260608086018a81526080870186815260a088018b815260c089018b815260e08a01898152610100808c018b81526101208d018c8152600380548e52600c8d528f8e209e518f559a5160018f0155985160028e015595518c8a0155935160048c0155915160058b01555160068a0155516007890155905160089097018054935161ffff1990941697151561ff001916979097179215150291909117909455548451878152918201839052938101919091527f6a00651728a92841411081673eaa4eddbed06d102a590e050c22def40d4dd0b8910160405180910390a250505050565b61265461282c565b6001600160a01b03919091165f908152600f60205260409020805460ff1916911515919091179055565b61268661282c565b6001600160a01b0381166126d15760405162461bcd60e51b81526020600482015260126024820152715a65726f20746f6b656e206164647265737360701b6044820152606401610a36565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6126fb61282c565b6001600160a01b0381166127605760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a36565b611508816129af565b6004545f838152600c602052604081206002015490919061278a9084612c55565b6127949190612c6c565b9392505050565b6013546040805163313ce56760e01b815290515f926001600160a01b03169163313ce5679160048083019260209291908290030181865afa1580156127e2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128069190612d8b565b61281190600a612e8b565b5f848152600c602052604090206002015461278a9084612c55565b6001546001600160a01b031633146116ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a36565b60025f54036128d75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a36565b60025f55565b8047101561291b5760405162461bcd60e51b815260206004820152600b60248201526a4c6f772062616c616e636560a81b6044820152606401610a36565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114612964576040519150601f19603f3d011682016040523d82523d5f602084013e612969565b606091505b50509050806116615760405162461bcd60e51b81526020600482015260126024820152711155120814185e5b595b9d0819985a5b195960721b6044820152606401610a36565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b80356001600160a01b0381168114612a16575f80fd5b919050565b5f60208284031215612a2b575f80fd5b61279482612a00565b5f60208284031215612a44575f80fd5b5035919050565b8015158114611508575f80fd5b5f8060408385031215612a69575f80fd5b612a7283612a00565b91506020830135612a8281612a4b565b809150509250929050565b5f8060408385031215612a9e575f80fd5b823591506020830135612a8281612a4b565b5f8060408385031215612ac1575f80fd5b50508035926020909101359150565b5f805f805f8060c08789031215612ae5575f80fd5b863595506020870135945060408701359350606087013592506080870135915060a0870135612b1381612a4b565b809150509295509295509295565b5f8060408385031215612b32575f80fd5b612b3b83612a00565b9150612b4960208401612a00565b90509250929050565b5f8060408385031215612b63575f80fd5b612b6c83612a00565b946020939093013593505050565b5f805f8060808587031215612b8d575f80fd5b5050823594602084013594506040840135936060013592509050565b602080825260129082015271125b9d985b1a59081c1c995cd85b19481a5960721b604082015260600190565b60208082526012908201527150726573616c65206e6f742041637469766560701b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561181457611814612c01565b602080825260139082015272125b9d985b1a59081cd85b1948185b5bdd5b9d606a1b604082015260600190565b808202811582820484141761181457611814612c01565b5f82612c8657634e487b7160e01b5f52601260045260245ffd5b500490565b8082018082111561181457611814612c01565b60208082526026908201527f416d6f756e742073686f756c64206265206c657373207468616e206c6566744860408201526506172646361760d41b606082015260800190565b6020808252601690820152751058d8dbdd5b9d081a5cc8189b1858dad31a5cdd195960521b604082015260600190565b6020808252600e908201526d141c995cd85b19481c185d5cd95960921b604082015260600190565b60208082526019908201527f50726573616c65206973206e6f74206163746976652079657400000000000000604082015260600190565b5f60018201612d8457612d84612c01565b5060010190565b5f60208284031215612d9b575f80fd5b815160ff81168114612794575f80fd5b600181815b80851115612de557815f1904821115612dcb57612dcb612c01565b80851615612dd857918102915b93841c9390800290612db0565b509250929050565b5f82612dfb57506001611814565b81612e0757505f611814565b8160018114612e1d5760028114612e2757612e43565b6001915050611814565b60ff841115612e3857612e38612c01565b50506001821b611814565b5060208310610133831016604e8410600b8410161715612e66575081810a611814565b612e708383612dab565b805f1904821115612e8357612e83612c01565b029392505050565b5f61279460ff841683612ded565b602080825260169082015275155cd95c881b9bdd0818481c185c9d1a58da5c185b9d60521b604082015260600190565b5f60208284031215612ed9575f80fd5b5051919050565b5f60208284031215612ef0575f80fd5b815161279481612a4b565b8082025f8212600160ff1b84141615612f1657612f16612c01565b818105831482151761181457611814612c01565b60208082526021908201527f4d616b65207375726520746f2061646420656e6f75676820616c6c6f77616e636040820152606560f81b606082015260800190565b5f82515f5b81811015612f8a5760208186018101518583015201612f70565b505f92019182525091905056fea2646970667358221220869050764f22614a8422231cedb03f3b516b67fab3e11881ecded1d70fb296df64736f6c63430008160033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006090149792daaee9d1d568c9f9a6f6b46aa29efd000000000000000000000000ee0aea94c14531eea548b925e706908182e301bf000000000000000000000000f08a50178dfcde18524640ea6618a1f965821715000000000000000000000000fed1f22979c0e4425d85138665aaf7c84ddb7e7d0000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _oracle (address): 0x6090149792dAAeE9D1D568c9f9a6F6B46AA29eFD
Arg [1] : _usdt (address): 0xee0aEa94C14531EEa548b925E706908182E301bF
Arg [2] : _usdc (address): 0xf08A50178dfcDe18524640EA6618a1f965821715
Arg [3] : _SaleToken (address): 0xFED1f22979C0e4425d85138665Aaf7c84DdB7E7d
Arg [4] : _MinTokenTobuy (uint256): 0
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000006090149792daaee9d1d568c9f9a6f6b46aa29efd
Arg [1] : 000000000000000000000000ee0aea94c14531eea548b925e706908182e301bf
Arg [2] : 000000000000000000000000f08a50178dfcde18524640ea6618a1f965821715
Arg [3] : 000000000000000000000000fed1f22979c0e4425d85138665aaf7c84ddb7e7d
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.