编译器
0.8.15+commit.e14f2714
文件 1 的 8:Address.sol
pragma solidity ^0.8.1;
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);
}
}
}
文件 2 的 8:Context.sol
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
文件 3 的 8:EscoStaking.sol
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract EscoStaking is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 public currentPercentage;
uint256 public totalInvestors;
uint256 public totalStakedAmount;
uint256 public currentLockedAmount;
uint256 public totalClaimedReward;
uint256 public REWARD_PERIOD = 7 days;
uint256 public TOTAL_PERCENTAGE = 1000000000000000000;
uint256 public MIN_ESCO_STAKE = 1000 ether;
uint256 public MAX_INVESTMENTS = 100;
uint256 public LAUNCH_TIME;
IERC20 public usdtContract;
IERC20 public escoContract;
struct Investor {
address investorAddress;
uint256 totalInvestment;
uint256 currentLockedAmount;
uint256 startDate;
uint256 rewardAmount;
uint256[] userInvestments;
}
struct Investment {
address investorAddress;
uint256 totalInvestment;
uint256 startDate;
uint256 claimedDate;
uint256 rewardAmount;
uint256 rewardPercentage;
bool isWithdrawn;
}
uint256 public currentInvestmentId;
mapping(address => Investor) public investors;
mapping(uint256 => Investment) public investments;
mapping(address => uint256) public totalUserInvestments;
address public moderatorAddress;
event AmountStaked(
address investorAddress,
uint256 totalInvestment,
uint256 investmentId,
uint256 time
);
event AmountUnstaked(
address investorAddress,
uint256 totalInvestment,
uint256 investmentId,
uint256 time
);
event RewardClaimed(
address investorAddress,
uint256 totalInvestment,
uint256 rewardAmount,
uint256 investmentId,
uint256 time
);
constructor(
address _usdtAddress,
address _escoAddress,
address _moderatorAddress,
uint256 _launchTime
) {
require(_usdtAddress != address(0), "Invalid USDT address");
require(_escoAddress != address(0), "Invalid Esco address");
require(_launchTime >= block.timestamp, "Invalid launch time");
require(_moderatorAddress != address(0), "Invalid Moderator address");
LAUNCH_TIME = _launchTime;
usdtContract = IERC20(_usdtAddress);
escoContract = IERC20(_escoAddress);
moderatorAddress = _moderatorAddress;
}
modifier onlyModerator() {
require(
msg.sender == moderatorAddress || msg.sender == owner(),
"Only moderator can do this transaction"
);
_;
}
function setModeratorAddress(address _moderatorAddress) external onlyOwner {
require(_moderatorAddress != address(0), "Invalid Moderator address");
usdtContract = IERC20(_moderatorAddress);
}
function setUSDTAddress(address _usdtAddress) external onlyModerator {
require(_usdtAddress != address(0), "Invalid USDT address");
usdtContract = IERC20(_usdtAddress);
}
function setEscoAddress(address _escoAddress) external onlyModerator {
require(_escoAddress != address(0), "Invalid Esco address");
escoContract = IERC20(_escoAddress);
}
function setRewardPercentage(
uint256 _rewardPercentage
) external onlyModerator {
require(
currentPercentage != _rewardPercentage,
"Reward Percentage is already same"
);
currentPercentage = _rewardPercentage;
}
function setMinimumStakeAmount(
uint256 _minimumStakeAmount
) external onlyModerator {
require(
_minimumStakeAmount > 0,
"Minimum stake amount must be greater than 0"
);
MIN_ESCO_STAKE = _minimumStakeAmount;
}
function getUserInvestments(
address _investorAddress
) public view returns (uint256[] memory userInvestments) {
userInvestments = investors[_investorAddress].userInvestments;
}
function stakeEsco(uint256 _amount) external {
require(block.timestamp >= LAUNCH_TIME, "Staking is not live yet");
require(
_amount >= MIN_ESCO_STAKE,
"Cannot stake less than minimum stake ESCO"
);
require(
totalUserInvestments[msg.sender] < MAX_INVESTMENTS,
"Cannot stake more than 100 times"
);
if (investors[msg.sender].investorAddress == address(0)) {
investors[msg.sender].investorAddress = msg.sender;
investors[msg.sender].startDate = block.timestamp;
totalInvestors = totalInvestors.add(1);
}
currentInvestmentId = currentInvestmentId.add(1);
totalUserInvestments[msg.sender] = totalUserInvestments[msg.sender].add(
1
);
investors[msg.sender].totalInvestment = investors[msg.sender]
.totalInvestment
.add(_amount);
investors[msg.sender].currentLockedAmount = investors[msg.sender]
.currentLockedAmount
.add(_amount);
investors[msg.sender].userInvestments.push(currentInvestmentId);
investments[currentInvestmentId] = Investment({
investorAddress: msg.sender,
totalInvestment: _amount,
startDate: block.timestamp,
claimedDate: 0,
rewardAmount: 0,
isWithdrawn: false,
rewardPercentage: 0
});
totalStakedAmount = totalStakedAmount.add(_amount);
currentLockedAmount = currentLockedAmount.add(_amount);
emit AmountStaked(
msg.sender,
_amount,
currentInvestmentId,
block.timestamp
);
escoContract.safeTransferFrom(msg.sender, address(this), _amount);
}
function unstakeAmount(uint256 _investmentId) external {
require(
investments[_investmentId].investorAddress == msg.sender,
"Caller is not investor"
);
require(!investments[_investmentId].isWithdrawn, "Already claimed");
require(
getEscoBalance() >= investments[_investmentId].totalInvestment,
"Insufficient Esco balance right now"
);
investments[_investmentId].isWithdrawn = true;
investments[_investmentId].claimedDate = block.timestamp;
uint256 _investmentAmount = investments[_investmentId].totalInvestment;
currentLockedAmount = currentLockedAmount.sub(_investmentAmount);
investors[msg.sender].currentLockedAmount = investors[msg.sender]
.currentLockedAmount
.sub(_investmentAmount);
emit AmountUnstaked(
msg.sender,
_investmentAmount,
currentInvestmentId,
block.timestamp
);
escoContract.safeTransfer(
msg.sender,
investments[_investmentId].totalInvestment
);
}
function getRewardBalance() public view returns (uint256) {
return usdtContract.balanceOf(address(this));
}
function getEscoBalance() public view returns (uint256) {
return escoContract.balanceOf(address(this));
}
function calculatePercentage() private view returns (uint256) {
uint256 totalPercentage;
if (currentLockedAmount > 0) {
uint256 rewardBalance = getRewardBalance();
totalPercentage = (rewardBalance.mul(TOTAL_PERCENTAGE)).div(
currentLockedAmount
);
}
return totalPercentage;
}
function depositReward(uint256 _amount) external onlyModerator {
if (_amount > 0) {
usdtContract.safeTransferFrom(msg.sender, address(this), _amount);
}
currentPercentage = calculatePercentage();
}
function calculateReward(
uint256 _amount
) private view returns (uint256 usdtReward) {
usdtReward = _amount.mul(currentPercentage).div(TOTAL_PERCENTAGE);
}
function getReward(
uint256 _investmentId
) public view returns (uint256 usdtReward) {
if (
!investments[_investmentId].isWithdrawn &&
investments[_investmentId].startDate.add(REWARD_PERIOD) <=
block.timestamp
) {
uint256 _amount = investments[_investmentId].totalInvestment;
usdtReward = _amount.mul(currentPercentage).div(TOTAL_PERCENTAGE);
} else {
usdtReward = 0;
}
}
function claimReward(uint256 _investmentId) external {
require(
investments[_investmentId].investorAddress == msg.sender,
"Caller is not investor"
);
require(!investments[_investmentId].isWithdrawn, "Already claimed");
require(
investments[_investmentId].startDate.add(REWARD_PERIOD) <=
block.timestamp,
"Cannot claim reward before 7 days"
);
uint256 _investmentAmount = investments[_investmentId].totalInvestment;
uint256 _rewardAmount = calculateReward(_investmentAmount);
currentLockedAmount = currentLockedAmount.sub(_investmentAmount);
investors[msg.sender].currentLockedAmount = investors[msg.sender]
.currentLockedAmount
.sub(_investmentAmount);
investors[msg.sender].rewardAmount = investors[msg.sender]
.rewardAmount
.add(_rewardAmount);
investments[_investmentId].isWithdrawn = true;
investments[_investmentId].rewardAmount = _rewardAmount;
investments[_investmentId].rewardPercentage = currentPercentage;
investments[_investmentId].claimedDate = block.timestamp;
totalClaimedReward = totalClaimedReward.add(_rewardAmount);
emit RewardClaimed(
msg.sender,
_investmentAmount,
_rewardAmount,
currentInvestmentId,
block.timestamp
);
if (_investmentAmount > 0) {
require(
getEscoBalance() >= investments[_investmentId].totalInvestment,
"Insufficient Esco balance right now"
);
escoContract.safeTransfer(msg.sender, _investmentAmount);
}
if (_rewardAmount > 0) {
require(
getRewardBalance() >= _rewardAmount,
"Insufficient USDT balance right now"
);
usdtContract.safeTransfer(msg.sender, _rewardAmount);
}
}
function depositUsdt(uint256 _amount) external onlyModerator {
require(_amount > 0, "Invalid usdt amount");
usdtContract.safeTransferFrom(msg.sender, address(this), _amount);
}
function withdrawUsdt(uint256 _usdtAmount) external onlyModerator {
require(_usdtAmount > 0, "Invalid usdt amount");
usdtContract.safeTransfer(msg.sender, _usdtAmount);
}
function depositEsco(uint256 _amount) external onlyModerator {
require(_amount > 0, "Invalid Esco amount");
escoContract.safeTransferFrom(msg.sender, address(this), _amount);
}
function withdrawEsco(uint256 _escoAmount) external onlyModerator {
require(_escoAmount > 0, "Invalid Esco amount");
escoContract.safeTransfer(msg.sender, _escoAmount);
}
}
文件 4 的 8:IERC20.sol
pragma solidity ^0.8.0;
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);
}
文件 5 的 8:Ownable.sol
pragma solidity ^0.8.0;
import "../utils/Context.sol";
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);
}
}
文件 6 的 8:SafeERC20.sol
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
文件 7 的 8:SafeMath.sol
pragma solidity ^0.8.0;
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
文件 8 的 8:draft-IERC20Permit.sol
pragma solidity ^0.8.0;
interface IERC20Permit {
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
function nonces(address owner) external view returns (uint256);
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
{
"compilationTarget": {
"contracts/EscoStaking.sol": "EscoStaking"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_usdtAddress","type":"address"},{"internalType":"address","name":"_escoAddress","type":"address"},{"internalType":"address","name":"_moderatorAddress","type":"address"},{"internalType":"uint256","name":"_launchTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"investorAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalInvestment","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"investmentId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"AmountStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"investorAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalInvestment","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"investmentId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"AmountUnstaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"investorAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalInvestment","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"investmentId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"inputs":[],"name":"LAUNCH_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_INVESTMENTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_ESCO_STAKE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARD_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_investmentId","type":"uint256"}],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentInvestmentId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentLockedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositEsco","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositUsdt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"escoContract","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEscoBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_investmentId","type":"uint256"}],"name":"getReward","outputs":[{"internalType":"uint256","name":"usdtReward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRewardBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_investorAddress","type":"address"}],"name":"getUserInvestments","outputs":[{"internalType":"uint256[]","name":"userInvestments","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"investments","outputs":[{"internalType":"address","name":"investorAddress","type":"address"},{"internalType":"uint256","name":"totalInvestment","type":"uint256"},{"internalType":"uint256","name":"startDate","type":"uint256"},{"internalType":"uint256","name":"claimedDate","type":"uint256"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"internalType":"uint256","name":"rewardPercentage","type":"uint256"},{"internalType":"bool","name":"isWithdrawn","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"investors","outputs":[{"internalType":"address","name":"investorAddress","type":"address"},{"internalType":"uint256","name":"totalInvestment","type":"uint256"},{"internalType":"uint256","name":"currentLockedAmount","type":"uint256"},{"internalType":"uint256","name":"startDate","type":"uint256"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"moderatorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_escoAddress","type":"address"}],"name":"setEscoAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minimumStakeAmount","type":"uint256"}],"name":"setMinimumStakeAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_moderatorAddress","type":"address"}],"name":"setModeratorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardPercentage","type":"uint256"}],"name":"setRewardPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_usdtAddress","type":"address"}],"name":"setUSDTAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stakeEsco","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalClaimedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalInvestors","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalUserInvestments","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_investmentId","type":"uint256"}],"name":"unstakeAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdtContract","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_escoAmount","type":"uint256"}],"name":"withdrawEsco","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_usdtAmount","type":"uint256"}],"name":"withdrawUsdt","outputs":[],"stateMutability":"nonpayable","type":"function"}]