/**
*Submitted for verification at basescan.org on 2024-04-18
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity 0.8.10;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
return c;
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
}
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function limitSupply() external view returns (uint256);
function availableSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface VAULT {
function transferERC20(address addr, uint amount, address token) external;
}
interface STAKINGV1 {
function getUser(address addr, address token, uint level) external returns (uint, uint, uint, uint, uint, uint, uint, uint, uint);
function getUserUnlock(address addr, address token) external returns (uint, uint, uint);
}
interface PROXY {
function getVault() external view returns(address);
function getFee() external view returns(uint);
}
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint256 internal _limitSupply;
string internal _name;
string internal _symbol;
uint8 internal _decimals;
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
function limitSupply() public view returns (uint256) {
return _limitSupply;
}
function availableSupply() public view returns (uint256) {
return _limitSupply.sub(_totalSupply);
}
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public returns (bool) {
_approve(msg.sender, spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
return true;
}
function _transfer(address sender, address recipient, uint256 amount) internal {
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount);
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
function _approve(address owner, address spender, uint256 amount) internal {
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
}
contract StakingV2 is ERC20 {
using SafeMath for uint256;
VAULT public _vault;
STAKINGV1 public _stakingV1;
PROXY public _proxy;
uint private startTime = 1111;
mapping (address => bool) private _isTeam;
mapping (address => bool) private _isOwner;
uint public totalUsers;
uint public totalTokenStaked;
uint private constant PERCENT_DIVIDER = 1000;
uint private constant PRICE_DIVIDER = 1 ether;
uint private constant TIME_STEP = 1 days;
uint public FEE = 0.0005 ether;
uint[3] public TOKEN_TOTAL_LOCKED = [30 days, 60 days, 90 days];
uint[3] public TOKEN_DAILY_PROFIT = [1, 1, 1];
uint[3] public REFERRAL_COUNT = [0, 9, 19];
uint[3] public REFERRAL_SHARE = [1, 2, 3];
mapping(address => mapping(address => mapping(uint => User))) private users;
struct User{
uint start;
uint release;
uint checkpoint;
uint total;
uint totalLockedInDays;
uint unclaimed;
uint accumulated;
uint rewards;
uint paid;
uint level;
bool blacklisted;
bool released;
uint nextClaim;
Referral referral;
}
struct Referral{
uint level;
address addr;
uint counts;
uint total;
}
event TokenOperation(address indexed token, address indexed account, string txType, uint tokenAmount, address indexed referral, uint level);
event ReferralEvent(address indexed account, string txType, uint tokenAmount, address indexed referral, uint payout);
constructor() {
_isOwner[msg.sender] = true;
_isTeam[msg.sender] = true;
STAKINGV1 stakingV1 = STAKINGV1(0x7deE5C679447D001B2E45a7Ca1b94e175b25C951);
VAULT vault = VAULT(0x2B856FF0380C79AE391FE98f3610f74F54171537);
_vault = vault;
_stakingV1 = stakingV1;
PROXY proxy = PROXY(0xDC25f56430015a67680F3160e50e1c63C3543ffd);
_proxy = proxy;
}
bool internal locked;
modifier onlyOwner() {
require(_isOwner[msg.sender], "Ownable: caller is not the owner");
_;
}
modifier onlyTeam() {
require(_isTeam[msg.sender], "Ownable: caller is not the team");
_;
}
modifier noEntry() {
require(!locked);
locked = true;
_;
locked = false;
}
function isOwner() public view returns(bool){
return _isOwner[msg.sender];
}
function isTeam() public view returns(bool){
return _isTeam[msg.sender];
}
function deposit(uint256 _amount, address addr, address token, uint level) public payable {
require(_amount > 0, "Must be higher than 0!");
IERC20(token).transferFrom(msg.sender, address(_vault), _amount);
payable(address(_proxy.getVault())).transfer(_proxy.getFee());
User storage user = users[msg.sender][token][level];
require(!user.blacklisted, "You have been banned!");
if(level == 2) {
user.rewards = user.total.add(_amount).mul(TOKEN_DAILY_PROFIT[2]).div(PERCENT_DIVIDER).mul(TOKEN_TOTAL_LOCKED[2].div(60*60*24)).sub(user.paid);
user.level = 2;
}else if(level == 1){
user.rewards = user.total.add(_amount).mul(TOKEN_DAILY_PROFIT[1]).div(PERCENT_DIVIDER).mul(TOKEN_TOTAL_LOCKED[1].div(60*60*24)).sub(user.paid);
user.level = 1;
}else{
user.rewards = user.total.add(_amount).mul(TOKEN_DAILY_PROFIT[0]).div(PERCENT_DIVIDER).mul(TOKEN_TOTAL_LOCKED[0].div(60*60*24)).sub(user.paid);
user.level = 0;
}
if(user.total > 0){
updateStakeUSD(msg.sender, token, level);
user.accumulated = user.unclaimed;
user.unclaimed = 0;
user.total = user.total.add(_amount);
}else{
user.start = block.timestamp;
user.release = block.timestamp.add(TOKEN_TOTAL_LOCKED[level]);
user.total = _amount;
user.checkpoint = maxVal(block.timestamp, startTime);
// user.nextClaim = block.timestamp.add(CLAIM_TIME);
totalUsers++;
if(user.referral.addr == address(0) && addr != address(0)){
user.referral.addr = addr;
user.referral.level = 1;
}
}
if(addr != address(0)){
uint referralShare;
user.referral.counts = user.referral.counts.add(1);
if(user.referral.counts > REFERRAL_COUNT[2]) referralShare = _amount.mul(REFERRAL_SHARE[2]).div(PERCENT_DIVIDER);
else if(user.referral.counts > REFERRAL_COUNT[1]) referralShare = _amount.mul(REFERRAL_SHARE[1]).div(PERCENT_DIVIDER);
else if(user.referral.counts > REFERRAL_COUNT[0]) referralShare = _amount.mul(REFERRAL_SHARE[0]).div(PERCENT_DIVIDER);
user.referral.total = user.referral.total.add(referralShare);
_vault.transferERC20(addr, referralShare, token);
// IERC20(token).transfer(addr, referralShare);
emit ReferralEvent(msg.sender, "REFERRAL", _amount, addr, referralShare);
}
totalTokenStaked = totalTokenStaked.add(_amount);
emit TokenOperation(token, msg.sender, "DEPOSIT", _amount, addr, level);
}
function updateStakeUSD(address _addr, address token, uint level) private {
User storage user = users[_addr][token][level];
uint256 amount = getStakeUSD(token, level);
if(amount > 0) {
user.unclaimed = user.unclaimed.add(amount);
user.checkpoint = block.timestamp;
}
}
function getStakeUSD(address token, uint level) view private returns(uint256) {
User storage user = users[msg.sender][token][level];
uint256 fr = user.checkpoint;
if (startTime > block.timestamp) {
fr = block.timestamp;
}
uint256 to = block.timestamp;
uint value;
if(user.blacklisted) return 0;
if(fr < to) {
if(level >= 2)
value = user.total.mul(to - fr).mul(TOKEN_DAILY_PROFIT[2]).div(TIME_STEP).div(PERCENT_DIVIDER);
else if (level >= 1)
value = user.total.mul(to - fr).mul(TOKEN_DAILY_PROFIT[1]).div(TIME_STEP).div(PERCENT_DIVIDER);
else
value = user.total.mul(to - fr).mul(TOKEN_DAILY_PROFIT[0]).div(TIME_STEP).div(PERCENT_DIVIDER);
}else value = 0;
if(value >= user.rewards) value = user.rewards;
return value;
}
function claimToken(address token, uint level) public payable noEntry {
User storage user = users[msg.sender][token][level];
updateStakeUSD(msg.sender, token, level);
payable(address(_proxy.getVault())).transfer(_proxy.getFee());
uint256 tokenAmount = user.accumulated.add(user.unclaimed);
user.paid = user.paid.add(tokenAmount);
user.unclaimed = 0;
user.accumulated = 0;
if(tokenAmount <= user.rewards){
user.rewards = user.rewards.sub(tokenAmount);
}else{
user.rewards = 0;
}
_vault.transferERC20(msg.sender, tokenAmount, token);
emit TokenOperation(token, msg.sender, "CLAIM", tokenAmount, address(0), level);
}
function removeLiquidity(address token, uint level) public payable noEntry {
User storage user = users[msg.sender][token][level];
uint userBalance = user.total;
payable(address(_proxy.getVault())).transfer(_proxy.getFee());
require(userBalance > 0, "You have no tokens locked!");
require(block.timestamp > user.start.add(TOKEN_TOTAL_LOCKED[level]));
require(userBalance < getTokenBalance(token), "Insufficient balance");
user.total = 0;
user.unclaimed = 0;
user.accumulated = 0;
user.paid = 0;
user.rewards = 0;
totalTokenStaked = totalTokenStaked.sub(userBalance);
_vault.transferERC20(msg.sender, userBalance, token);
emit TokenOperation(token, msg.sender, "REMOVE LIQUIDITY", userBalance, address(0), level);
}
function migrateV2(address addr, address token, uint levels) external onlyOwner {
User storage user = users[addr][token][levels];
require(user.total == 0, "Not empty!");
( uint total, uint unclaimed, uint accumulated, uint rewards, uint start, , , uint paid, uint checkpoint ) = _stakingV1.getUser(addr, token, levels);
( uint unlock0, uint unlock1, uint unlock2) = _stakingV1.getUserUnlock(addr, token);
require(total > 0, "Nothing found!");
totalTokenStaked = totalTokenStaked.add(total);
user.total = total;
user.unclaimed = unclaimed;
user.accumulated = accumulated;
user.rewards = rewards;
user.start = start;
user.paid = paid;
user.checkpoint = checkpoint;
if(levels == 0) user.release = unlock0;
else if(levels == 1) user.release = unlock1;
else if(levels == 2) user.release = unlock2;
}
function getUserUnclaimed(address _addr, address token, uint level) public view returns(uint value) {
User storage user = users[_addr][token][level];
return getStakeUSD(token, level).add(user.unclaimed).add(user.accumulated);
}
function getTokenBalance(address token) public view returns (uint) {
return IERC20(token).balanceOf(address(_vault));
}
function getUSDRewads(address _addr, address token, uint level) public view returns (uint) {
User storage user = users[_addr][token][level];
return user.rewards;
}
function getTotalTokenStaked() public view returns (uint) {
return totalTokenStaked;
}
function getUser(address addr, address token, uint level) public view returns (uint, uint, uint, uint, uint, uint, uint, uint, uint, uint) {
User storage user = users[addr][token][level];
return (user.total, user.unclaimed, user.accumulated, user.rewards, user.start, user.level, user.nextClaim, user.paid, user.checkpoint, user.release);
}
function getUserTotal(address addr, address token) public view returns (uint, uint, uint) {
return (users[addr][token][0].total, users[addr][token][1].total, users[addr][token][2].total);
}
function getUserStart(address addr, address token) public view returns (uint, uint, uint) {
return (users[addr][token][0].start, users[addr][token][1].start, users[addr][token][2].start);
}
function getUserUnlock(address addr, address token) public view returns (uint, uint, uint) {
return (users[addr][token][0].release, users[addr][token][1].release, users[addr][token][2].release);
}
function getReferral(address _addr, address token, uint level) public view returns (address, uint, uint, uint) {
User storage user = users[_addr][token][level];
return (user.referral.addr, user.referral.level, user.referral.counts, user.referral.total);
}
function getUserBalanceOfToken(address user, address token) public view returns (uint) {
return IERC20(token).balanceOf(user);
}
function geTotalLiquidityToken(address token) public view returns (uint) {
return IERC20(token).balanceOf(address(this));
}
function changeUserStatus(address addr, bool t, address token, uint level) external onlyTeam {
User storage user = users[addr][token][level];
user.blacklisted = t;
}
function changeUserRelease(address addr, bool t, address token, uint level) external onlyOwner {
User storage user = users[addr][token][level];
user.released = t;
}
function setFee(uint _fee) external onlyOwner {
FEE = _fee;
}
function setDaily(uint i, uint value) external onlyOwner {
TOKEN_DAILY_PROFIT[i] = value;
}
function setLocker(uint i, uint value) external onlyOwner {
TOKEN_TOTAL_LOCKED[i] = value;
}
function setRefShare(uint i, uint value) external onlyOwner {
REFERRAL_SHARE[i] = value;
}
function setRefCount(uint i, uint value) external onlyOwner {
REFERRAL_COUNT[i] = value;
}
function setOwner(address newOwner) external onlyOwner {
_isOwner[newOwner] = true;
_isTeam[newOwner] = true;
}
function setTeam(address account, bool e) external onlyOwner {
_isTeam[account] = e;
}
function setVaultAddress(address _addr) external onlyOwner {
VAULT vault = VAULT(_addr);
_vault = vault;
}
function viewRefCount(uint i) public view returns(uint) {
return REFERRAL_COUNT[i];
}
function viewRefShare(uint i) public view returns(uint) {
return REFERRAL_SHARE[i];
}
function viewDailyShare(uint i) public view returns(uint) {
return TOKEN_DAILY_PROFIT[i];
}
function getFee() public view returns (uint){
return FEE;
}
function getProxyFee() public view returns (uint){
return _proxy.getFee();
}
function getProxyVault() public view returns (address){
return _proxy.getVault();
}
function getRefShare() public view returns (uint, uint, uint){
return (REFERRAL_SHARE[0], REFERRAL_SHARE[1], REFERRAL_SHARE[2]);
}
function getRefCounts() public view returns (uint, uint, uint){
return (REFERRAL_COUNT[0], REFERRAL_COUNT[1], REFERRAL_COUNT[2]);
}
function getLockerDays() public view returns (uint, uint, uint){
return (TOKEN_TOTAL_LOCKED[0], TOKEN_TOTAL_LOCKED[1], TOKEN_TOTAL_LOCKED[2]);
}
function getDailyShare() public view returns (uint, uint, uint){
return (TOKEN_DAILY_PROFIT[0], TOKEN_DAILY_PROFIT[1], TOKEN_DAILY_PROFIT[2]);
}
function minZero(uint a, uint b) private pure returns(uint) {
if (a > b) {
return a - b;
} else {
return 0;
}
}
function maxVal(uint a, uint b) private pure returns(uint) {
if (a > b) {
return a;
} else {
return b;
}
}
function minVal(uint a, uint b) private pure returns(uint) {
if (a > b) {
return b;
} else {
return a;
}
}
receive() external payable {}
}
{
"compilationTarget": {
"StakingV2.sol": "StakingV2"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"string","name":"txType","type":"string"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":true,"internalType":"address","name":"referral","type":"address"},{"indexed":false,"internalType":"uint256","name":"payout","type":"uint256"}],"name":"ReferralEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"string","name":"txType","type":"string"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":true,"internalType":"address","name":"referral","type":"address"},{"indexed":false,"internalType":"uint256","name":"level","type":"uint256"}],"name":"TokenOperation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"REFERRAL_COUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"REFERRAL_SHARE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"TOKEN_DAILY_PROFIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"TOKEN_TOTAL_LOCKED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_proxy","outputs":[{"internalType":"contract PROXY","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_stakingV1","outputs":[{"internalType":"contract STAKINGV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_vault","outputs":[{"internalType":"contract VAULT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"t","type":"bool"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"changeUserRelease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"t","type":"bool"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"changeUserStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"claimToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"addr","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"geTotalLiquidityToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDailyShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLockerDays","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProxyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProxyVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRefCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRefShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"getReferral","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalTokenStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"getUSDRewads","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"getUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"getUserBalanceOfToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"getUserStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"getUserTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"getUserUnclaimed","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"getUserUnlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTeam","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"limitSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"levels","type":"uint256"}],"name":"migrateV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"removeLiquidity","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setDaily","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setLocker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRefCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRefShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"e","type":"bool"}],"name":"setTeam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setVaultAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokenStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUsers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"}],"name":"viewDailyShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"}],"name":"viewRefCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"}],"name":"viewRefShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]