//
// ░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░░▒▓███████▓▒░
// ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
// ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
// ░▒▓███████▓▒░ ░▒▓██████▓▒░ ░▒▓██████▓▒░
// ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
// ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
// ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░
//
// Rexas Finance Presale
// Website: https://rexas.com
// Twitter/X: https://x.com/rexasfinance
// Telegram: https://t.me/rexasfinance
//
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
_status = _ENTERED;
}
function _nonReentrantAfter() private {
_status = _NOT_ENTERED;
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
_transferOwnership(_msgSender());
}
modifier onlyOwner() {
_checkOwner();
_;
}
function owner() public view virtual returns (address) {
return _owner;
}
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(
address(this).balance >= amount,
"Address: insufficient balance"
);
(bool success, ) = recipient.call{value: amount}("");
require(
success,
"Address: unable to send value, recipient may have reverted"
);
}
function functionCall(address target, bytes memory data)
internal
returns (bytes memory)
{
return
functionCallWithValue(
target,
data,
0,
"Address: low-level call failed"
);
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return
functionCallWithValue(
target,
data,
value,
"Address: low-level call with value failed"
);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(
address(this).balance >= value,
"Address: insufficient balance for call"
);
(bool success, bytes memory returndata) = target.call{value: value}(
data
);
return
verifyCallResultFromTarget(
target,
success,
returndata,
errorMessage
);
}
function functionStaticCall(address target, bytes memory data)
internal
view
returns (bytes memory)
{
return
functionStaticCall(
target,
data,
"Address: low-level static call failed"
);
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return
verifyCallResultFromTarget(
target,
success,
returndata,
errorMessage
);
}
function functionDelegateCall(address target, bytes memory data)
internal
returns (bytes memory)
{
return
functionDelegateCall(
target,
data,
"Address: low-level delegate call failed"
);
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return
verifyCallResultFromTarget(
target,
success,
returndata,
errorMessage
);
}
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage)
private
pure
{
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
interface Aggregator {
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
}
contract Rexas_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;
}
struct UserData {
uint256 investedAmount;
uint256 receivedTokenAmount;
}
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 userData;
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 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
);
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 updatePresale(
uint256 _id,
uint256 _price,
uint256 _nextStagePrice,
uint256 _tokensToSell,
uint256 _Hardcap
) 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;
}
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, , , ) = 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 blackListUser(address _user, bool _value) public onlyOwner {
isBlackList[_user] = _value;
}
function buyWithUSDT(uint256 usdAmount)
external
checkPresaleId(currentSale)
checkSaleState(currentSale, usdToTokens(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 = usdToTokens(currentSale, usdAmount);
presale[currentSale].Sold += tokens;
presale[currentSale].amountRaised += usdAmount;
overalllRaised += usdAmount;
if (isExcludeMinToken[msg.sender] == false) {
require(tokens >= MinTokenTobuy, "Less than min amount");
}
userData[_msgSender()][currentSale].investedAmount += usdAmount;
userData[_msgSender()][currentSale].receivedTokenAmount += tokens;
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");
bool status = IERC20(SaleToken).transfer(
_msgSender(),
tokens
);
require(status, "Token transfer failed");
emit TokensBought(
_msgSender(),
currentSale,
address(USDTInterface),
tokens,
usdAmount,
block.timestamp
);
return true;
}
function buyWithUSDC(uint256 usdcAmount)
external
checkPresaleId(currentSale)
checkSaleState(currentSale, usdToTokens(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 = usdToTokens(currentSale, usdcAmount);
presale[currentSale].Sold += tokens;
presale[currentSale].amountRaised += usdcAmount;
overalllRaised += usdcAmount;
if (isExcludeMinToken[msg.sender] == false) {
require(tokens >= MinTokenTobuy, "Less than min amount");
}
userData[_msgSender()][currentSale].investedAmount += usdcAmount;
userData[_msgSender()][currentSale].receivedTokenAmount += tokens;
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");
bool status = IERC20(SaleToken).transfer(
_msgSender(),
tokens
);
require(status, "Token transfer 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 = usdToTokens(currentSale, usdAmount);
if (isExcludeMinToken[msg.sender] == false) {
require(tokens >= MinTokenTobuy, "Insufficient Amount!");
}
presale[currentSale].Sold += tokens;
presale[currentSale].amountRaised += usdAmount;
overalllRaised += usdAmount;
userData[_msgSender()][currentSale].investedAmount += usdAmount;
userData[_msgSender()][currentSale].receivedTokenAmount += tokens;
sendValue(payable(fundReceiver), msg.value);
bool status = IERC20(SaleToken).transfer(
_msgSender(),
tokens
);
require(status, "Token transfer failed");
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 usdBuyHelper(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 = usdToTokens(_id, usdAmount);
}
function usdToTokens(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 WithdrawTokens(address _token, uint256 amount) external onlyOwner {
IERC20(_token).transfer(fundReceiver, amount);
}
function WithdrawContractFunds(uint256 amount) external onlyOwner {
sendValue(payable(fundReceiver), amount);
}
function ChangeSaleToken(address _token) public onlyOwner {
SaleToken = _token;
}
function ChangeMinTokenToBuy(uint256 _amount) public onlyOwner {
MinTokenTobuy = _amount;
}
function ChangeOracleAddress(address _oracle) public onlyOwner {
aggregatorInterface = Aggregator(_oracle);
}
function blockTimeStamp() public view returns(uint256) {
return block.timestamp;
}
}
{
"compilationTarget": {
"Rexas_Presale.sol": "Rexas_Presale"
},
"evmVersion": "cancun",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"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":"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":"uint256","name":"_amount","type":"uint256"}],"name":"ChangeMinTokenToBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"}],"name":"ChangeOracleAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"ChangeSaleToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ETH_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"blockTimeStamp","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":"_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":"_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":"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"}],"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"}],"name":"updatePresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"usdBuyHelper","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":"usdToTokens","outputs":[{"internalType":"uint256","name":"_tokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userData","outputs":[{"internalType":"uint256","name":"investedAmount","type":"uint256"},{"internalType":"uint256","name":"receivedTokenAmount","type":"uint256"}],"stateMutability":"view","type":"function"}]