Untitled Diff

EverRise is built upon the fundamentals of Buyback and increasing the investor's value
// SPDX-License-Identifier: none
Main features are
1) 2% tax is collected and distributed to holders for HODLing
2) 9% buyback and marketing tax is collected and 3% of it is sent for marketing fund and othe 6% is used to buyback the tokens
________ _______ __
/ | / \ / |
$$$$$$$$/__ __ ______ ______ $$$$$$$ |$$/ _______ ______
$$ |__ / \ / |/ \ / \ $$ |__$$ |/ | / | / \
$$ | $$ \ /$$//$$$$$$ |/$$$$$$ |$$ $$< $$ |/$$$$$$$/ /$$$$$$ |
$$$$$/ $$ /$$/ $$ $$ |$$ | $$/ $$$$$$$ |$$ |$$ \ $$ $$ |
$$ |_____ $$ $$/ $$$$$$$$/ $$ | $$ | $$ |$$ | $$$$$$ |$$$$$$$$/
$$ | $$$/ $$ |$$ | $$ | $$ |$$ |/ $$/ $$ |
$$$$$$$$/ $/ $$$$$$$/ $$/ $$/ $$/ $$/ $$$$$$$/ $$$$$$$/
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
pragma solidity ^0.8.4;
abstract contract Context {
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
function _msgSender() internal view virtual returns (address payable) {
return payable(msg.sender);
return payable(msg.sender);
}
}
function _msgData() internal view virtual returns (bytes memory) {
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
return msg.data;
}
}
}
}
interface IERC20 {
interface IERC20 {
function totalSupply() external view returns (uint256);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
}
library SafeMath {
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
require(c >= a, "SafeMath: addition overflow");
return c;
return c;
}
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
return sub(a, b, "SafeMath: subtraction overflow");
}
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
require(b <= a, errorMessage);
uint256 c = a - b;
uint256 c = a - b;
return c;
return c;
}
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
if (a == 0) {
return 0;
return 0;
}
}
uint256 c = a * b;
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
require(c / a == b, "SafeMath: multiplication overflow");
return c;
return c;
}
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
return div(a, b, "SafeMath: division by zero");
}
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
require(b > 0, errorMessage);
uint256 c = a / b;
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
return c;
}
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
return mod(a, b, "SafeMath: modulo by zero");
}
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
require(b != 0, errorMessage);
return a % b;
return a % b;
}
}
}
}
library Address {
library Address {
function isContract(address account) internal view returns (bool) {
function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
// solhint-disable-next-line no-inline-assembly
assembly { codehash := extcodehash(account) }
assembly { codehash := extcodehash(account) }
return (codehash != accountHash && codehash != 0x0);
return (codehash != accountHash && codehash != 0x0);
}
}
function sendValue(address payable recipient, uint256 amount) internal {
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
require(success, "Address: unable to send value, recipient may have reverted");
}
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
return functionCall(target, data, "Address: low-level call failed");
}
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
return _functionCallWithValue(target, data, 0, errorMessage);
}
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
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");
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) {
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");
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
return _functionCallWithValue(target, data, value, errorMessage);
}
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
require(isContract(target), "Address: call to non-contract");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
(bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
if (success) {
if (success) {
return returndata;
return returndata;
} else {
} else {
if (returndata.length > 0) {
if (returndata.length > 0) {
assembly {
assembly {
let returndata_size := mload(returndata)
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
revert(add(32, returndata), returndata_size)
}
}
} else {
} else {
revert(errorMessage);
revert(errorMessage);
}
}
}
}
}
}
}
}
contract Ownable is Context {
contract Ownable is Context {
address private _owner;
address private _owner;
address private _previousOwner;
address private _previousOwner;
uint256 private _lockTime;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
constructor () {
address msgSender = _msgSender();
address msgSender = _msgSender();
_owner = msgSender;
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
emit OwnershipTransferred(address(0), msgSender);
}
}
function owner() public view returns (address) {
function owner() public view returns (address) {
return _owner;
return _owner;
}
}
modifier onlyOwner() {
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
_;
}
}
function renounceOwnership() public virtual onlyOwner {
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
_owner = address(0);
}
}
function transferOwnership(address newOwner) public virtual onlyOwner {
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
_owner = newOwner;
}
}
function getUnlockTime() public view returns (uint256) {
function getUnlockTime() public view returns (uint256) {
return _lockTime;
return _lockTime;
}
}
function getTime() public view returns (uint256) {
function getTime() public view returns (uint256) {
return block.timestamp;
return block.timestamp;
}
}
function lock(uint256 time) public virtual onlyOwner {
function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_previousOwner = _owner;
_owner = address(0);
_owner = address(0);
_lockTime = block.timestamp + time;
_lockTime = block.timestamp + time;
emit OwnershipTransferred(_owner, address(0));
emit OwnershipTransferred(_owner, address(0));
}
}
function unlock() public virtual {
function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(block.timestamp > _lockTime , "Contract is locked until 7 days");
require(block.timestamp > _lockTime , "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
_owner = _previousOwner;
}
}
}
}
// pragma solidity >=0.5.0;
// pragma solidity >=0.5.0;
interface IUniswapV2Factory {
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeTo(address) external;
function setFeeToSetter(address) external;
function setFeeToSetter(address) external;
}
}
// pragma solidity >=0.5.0;
// pragma solidity >=0.5.0;
interface IUniswapV2Pair {
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
event Swap(
address indexed sender,
address indexed sender,
uint amount0In,
uint amount0In,
uint amount1In,
uint amount1In,
uint amount0Out,
uint amount0Out,
uint amount1Out,
uint amount1Out,
address indexed to
address indexed to
);
);
event Sync(uint112 reserve0, uint112 reserve1);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function factory() external view returns (address);
function token0() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function kLast() external view returns (uint);
function burn(address to) external returns (uint amount0, uint amount1);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function skim(address to) external;
function sync() external;
function sync() external;
function initialize(address, address) external;
function initialize(address, address) external;
}
}
// pragma solidity >=0.6.2;
// pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function factory() external pure returns (address);
function WETH() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
function addLiquidity(
address tokenA,
address tokenA,
address tokenB,
address tokenB,
uint amountADesired,
uint amountADesired,
uint amountBDesired,
uint amountBDesired,
uint amountAMin,
uint amountAMin,
uint amountBMin,
uint amountBMin,
address to,
address to,
uint deadline
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
function addLiquidityETH(
address token,
address token,
uint amountTokenDesired,
uint amountTokenDesired,
uint amountTokenMin,
uint amountTokenMin,
uint amountETHMin,
uint amountETHMin,
address to,
address to,
uint deadline
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
function removeLiquidity(
address tokenA,
address tokenA,
address tokenB,
address tokenB,
uint liquidity,
uint liquidity,
uint amountAMin,
uint amountAMin,
uint amountBMin,
uint amountBMin,
address to,
address to,
uint deadline
uint deadline
) external returns (uint amountA, uint amountB);
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
function removeLiquidityETH(
address token,
address token,
uint liquidity,
uint liquidity,
uint amountTokenMin,
uint amountTokenMin,
uint amountETHMin,
uint amountETHMin,
address to,
address to,
uint deadline
uint deadline
) external returns (uint amountToken, uint amountETH);
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
function removeLiquidityWithPermit(
address tokenA,
address tokenA,
address tokenB,
address tokenB,
uint liquidity,
uint liquidity,
uint amountAMin,
uint amountAMin,
uint amountBMin,
uint amountBMin,
address to,
address to,
uint deadline,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
function removeLiquidityETHWithPermit(
address token,
address token,
uint liquidity,
uint liquidity,
uint amountTokenMin,
uint amountTokenMin,
uint amountETHMin,
uint amountETHMin,
address to,
address to,
uint deadline,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
function swapExactTokensForTokens(
uint amountIn,
uint amountIn,
uint amountOutMin,
uint amountOutMin,
address[] calldata path,
address[] calldata path,
address to,
address to,
uint deadline
uint deadline
) external returns (uint[] memory amounts);
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
function swapTokensForExactTokens(
uint amountOut,
uint amountOut,
uint amountInMax,
uint amountInMax,
address[] calldata path,
address[] calldata path,
address to,
address to,
uint deadline
uint deadline
) external returns (uint[] memory amounts);
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
external
payable
payable
returns (uint[] memory amounts);
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
external
returns (uint[] memory amounts);
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
external
returns (uint[] memory amounts);
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
external
payable
payable
returns (uint[] memory amounts);
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
}
// pragma solidity >=0.6.2;
// pragma solidity >=0.6.2;
interface IUniswapV2Router02 is IUniswapV2Router01 {
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
address token,
uint liquidity,
uint liquidity,
uint amountTokenMin,
uint amountTokenMin,
uint amountETHMin,
uint amountETHMin,
address to,
address to,
uint deadline
uint deadline
) external returns (uint amountETH);
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
address token,
uint liquidity,
uint liquidity,
uint amountTokenMin,
uint amountTokenMin,
uint amountETHMin,
uint amountETHMin,
address to,
address to,
uint deadline,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountIn,
uint amountOutMin,
uint amountOutMin,
address[] calldata path,
address[] calldata path,
address to,
address to,
uint deadline
uint deadline
) external;
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
uint amountOutMin,
address[] calldata path,
address[] calldata path,
address to,
address to,
uint deadline
uint deadline
) external payable;
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountIn,
uint amountOutMin,
uint amountOutMin,
address[] calldata path,
address[] calldata path,
address to,
address to,
uint deadline
uint deadline
) external;
) external;
}
}
contract EverRise is Context, IERC20, Ownable {
contract EverMoon is Context, IERC20, Ownable {
using SafeMath for uint256;
using SafeMath for uint256;
using Address for address;
using Address for address;
address payable public marketingAddress = payable(0x23F4d6e1072E42e5d25789e3260D19422C2d3674); // Marketing Address
address payable public marketingAddress = payable(0xc8500C37733A27Ffd5709d30bF1918727f9765f7); // Marketing Address
address public immutable deadAddress = 0x000000000000000000000000000000000000dEaD;
address public immutable deadAddress = 0x000000000000000000000000000000000000dEaD;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcludedFromMaxTxAmount;
mapping (address => bool) private _isExcluded;
mapping (address => bool) private _isExcluded;
address[] private _excluded;
address[] private _excluded;
uint256 private constant MAX = ~uint256(0);
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 1000000000 * 10**6 * 10**9;
uint256 private _tTotal = 1000000000 * 10**6 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 private _tFeeTotal;
string private _name = "EverRise";
string private _name = "EverMoon";
string private _symbol = "RISE";
string private _symbol = "EVERMOON";
uint8 private _decimals = 9;
uint8 private _decimals = 9;
uint256 public _taxFee = 2;
uint256 public _taxFee = 2;
uint256 private _previousTaxFee = _taxFee;
uint256 private _previousTaxFee = _taxFee;
uint256 public _liquidityFee = 9;
uint256 public _liquidityFee = 10;
uint256 private _previousLiquidityFee = _liquidityFee;
uint256 private _previousLiquidityFee = _liquidityFee;
uint256 public marketingDivisor = 3;
uint256 public marketingDivisor = 3;
uint256 public _maxTxAmount = 3000000 * 10**6 * 10**9;
uint256 public _maxTxAmount = 3000000 * 10**6 * 10**9;
uint256 private minimumTokensBeforeSwap = 200000 * 10**6 * 10**9;
uint256 private constant numTokensSellToAddToLiquidity = 25000 * 10**6 * 10**9;
uint256 private constant numTokensSellToAddToBuyback = 200000 * 10**6 * 10**9;
uint256 private minimumTokensBeforeSwap = 250000 * 10**6 * 10**9;
uint256 private buyBackUpperLimit = 1 * 10**18;
uint256 private buyBackUpperLimit = 1 * 10**18;
uint256 public lastBuybackTimestamp;
uint256 public minTimeToBuyback = 3; // 3 seconds
IUniswapV2Router02 public immutable uniswapV2Router;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public immutable uniswapV2Pair;
bool inSwapAndLiquify;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = false;
bool public swapAndLiquifyEnabled = false;
bool public buyBackEnabled = true;
bool public buyBackEnabled = true;
event RewardLiquidityProviders(uint256 tokenAmount);
event RewardLiquidityProviders(uint256 tokenAmount);
event BuyBackEnabledUpdated(bool enabled);
event BuyBackEnabledUpdated(bool enabled);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 tokensSwapped,
uint256 ethReceived,
uint256 ethReceived,
uint256 tokensIntoLiqudity
uint256 tokensIntoLiqudity
);
);
event SwapETHForTokens(
event SwapETHForTokens(
uint256 amountIn,
uint256 amountIn,
address[] path
address[] path
);
);
event SwapTokensForETH(
event SwapTokensForETH(
uint256 amountIn,
uint256 amountIn,
address[] path
address[] path
);
);
modifier lockTheSwap {
modifier lockTheSwap {
inSwapAndLiquify = true;
inSwapAndLiquify = true;
_;
_;
inSwapAndLiquify = false;
inSwapAndLiquify = false;
}
}
constructor () {
constructor () {
_rOwned[_msgSender()] = _rTotal;
_rOwned[_msgSender()] = _rTotal;
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x10ED43C718714eb63d5aA57B78B54704E256024E);
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D );
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
.createPair(address(this), _uniswapV2Router.WETH());
uniswapV2Router = _uniswapV2Router;
uniswapV2Router = _uniswapV2Router;
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[address(this)] = true;
_isExcludedFromFee[address(this)] = true;
emit Transfer(address(0), _msgSender(), _tTotal);
emit Transfer(address(0), _msgSender(), _tTotal);
}
}
function name() public view returns (string memory) {
function name() public view returns (string memory) {
return _name;
return _name;
}
}
function symbol() public view returns (string memory) {
function symbol() public view returns (string memory) {
return _symbol;
return _symbol;
}
}
function decimals() public view returns (uint8) {
function decimals() public view returns (uint8) {
return _decimals;
return _decimals;
}
}
function totalSupply() public view override returns (uint256) {
function totalSupply() public view override returns (uint256) {
return _tTotal;
return _tTotal;
}
}
function balanceOf(address account) public view override returns (uint256) {
function balanceOf(address account) public view override returns (uint256) {
if (_isExcluded[account]) return _tOwned[account];
if (_isExcluded[account]) return _tOwned[account];
return tokenFromReflection(_rOwned[account]);
return tokenFromReflection(_rOwned[account]);
}
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
function transfer(address recipient, uint256 amount) public override returns (bool) {
_transfer(_msgSender(), recipient, amount);
_transfer(_msgSender(), recipient, amount);
return true;
return true;
}
}
function allowance(address owner, address spender) public view override returns (uint256) {
function allowance(address owner, address spender) public view override returns (uint256) {
return _allowances[owner][spender];
return _allowances[owner][spender];
}
}
function approve(address spender, uint256 amount) public override returns (bool) {
function approve(address spender, uint256 amount) public override returns (bool) {
_approve(_msgSender(), spender, amount);
_approve(_msgSender(), spender, amount);
return true;
return true;
}
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
_transfer(sender, recipient, amount);
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
return true;
}
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
return true;
}
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
return true;
}
}
function isExcludedFromReward(address account) public view returns (bool) {
function isExcludedFromReward(address account) public view returns (bool) {
return _isExcluded[account];
return _isExcluded[account];
}
}
function totalFees() public view returns (uint256) {
function totalFees() public view returns (uint256) {
return _tFeeTotal;
return _tFeeTotal;
}
}
function minimumTokensBeforeSwapAmount() public view returns (uint256) {
function minimumTokensBeforeSwapAmount() public view returns (uint256) {
return minimumTokensBeforeSwap;
return minimumTokensBeforeSwap;
}
}
function buyBackUpperLimitAmount() public view returns (uint256) {
function buyBackUpperLimitAmount() public view returns (uint256) {
return buyBackUpperLimit;
return buyBackUpperLimit;
}
}
function deliver(uint256 tAmount) public {
function deliver(uint256 tAmount) public {
address sender = _msgSender();
address sender = _msgSender();
require(!_isExcluded[sender], "Excluded addresses cannot call this function");
require(!_isExcluded[sender], "Excluded addresses cannot call this function");
(uint256 rAmount,,,,,) = _getValues(tAmount);
(uint256 rAmount,,,,,) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rTotal = _rTotal.sub(rAmount);
_rTotal = _rTotal.sub(rAmount);
_tFeeTotal = _tFeeTotal.add(tAmount);
_tFeeTotal = _tFeeTotal.add(tAmount);
}
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
require(tAmount <= _tTotal, "Amount must be less than supply");
require(tAmount <= _tTotal, "Amount must be less than supply");
if (!deductTransferFee) {
if (!deductTransferFee) {
(uint256 rAmount,,,,,) = _getValues(tAmount);
(uint256 rAmount,,,,,) = _getValues(tAmount);
return rAmount;
return rAmount;
} else {
} else {
(,uint256 rTransferAmount,,,,) = _getValues(tAmount);
(,uint256 rTransferAmount,,,,) = _getValues(tAmount);
return rTransferAmount;
return rTransferAmount;
}
}
}
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
require(rAmount <= _rTotal, "Amount must be less than total reflections");
require(rAmount <= _rTotal, "Amount must be less than total reflections");
uint256 currentRate = _getRate();
uint256 currentRate = _getRate();
return rAmount.div(currentRate);
return rAmount.div(currentRate);
}
}
function excludeFromReward(address account) public onlyOwner() {
function excludeFromReward(address account) public onlyOwner() {
require(!_isExcluded[account], "Account is already excluded");
require(!_isExcluded[account], "Account is already excluded");
if(_rOwned[account] > 0) {
if(_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
}
_isExcluded[account] = true;
_isExcluded[account] = true;
_excluded.push(account);
_excluded.push(account);
}
}
function includeInReward(address account) external onlyOwner() {
function includeInReward(address account) external onlyOwner() {
require(_isExcluded[account], "Account is already excluded");
require(_isExcluded[account], "Account is already excluded");
for (uint256 i = 0; i < _excluded.length; i++) {
for (uint256 i = 0; i < _excluded.length; i++) {
if (_excluded[i] == account) {
if (_excluded[i] == account) {
_excluded[i] = _excluded[_excluded.length - 1];
_excluded[i] = _excluded[_excluded.length - 1];
_tOwned[account] = 0;
_tOwned[account] = 0;
_isExcluded[account] = false;
_isExcluded[account] = false;
_excluded.pop();
_excluded.pop();
break;
break;
}
}
}
}
}
}
function _approve(address owner, address spender, uint256 amount) private {
function _approve(address owner, address spender, uint256 amount) private {
require(owner != address(0), "ERC20: approve from the zero address");
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
emit Approval(owner, spender, amount);
}
}
function _transfer(
function _transfer(
address from,
address from,
address to,
address to,
uint256 amount
uint256 amount
) private {
) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
require(amount > 0, "Transfer amount must be greater than zero");
if(from != owner() && to != owner()) {
if(from != owner() && to != owner() && !_isExcludedFromMaxTxAmount[from]) {
require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount.");
require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount.");
}
}
uint256 contractTokenBalance = balanceOf(address(this));
uint256 contractTokenBalance = balanceOf(address(this));
bool overMinimumTokenBalance = contractTokenBalance >= minimumTokensBeforeSwap;
bool overMinimumTokenBalance = contractTokenBalance >= minimumTokensBeforeSwap;
if (!inSwapAndLiquify && swapAndLiquifyEnabled && to == uniswapV2Pair) {
if (!inSwapAndLiquify && swapAndLiquifyEnabled && to == uniswapV2Pair) {
if (overMinimumTokenBalance) {
if (overMinimumTokenBalance) {
contractTokenBalance = minimumTokensBeforeSwap;
contractTokenBalance = numTokensSellToAddToBuyback;
swapTokens(contractTokenBalance);
swapTokens(contractTokenBalance);
}
}
uint256 balance = address(this).balance;
uint256 balance = address(this).balance;
if (buyBackEnabled && balance > uint256(1 * 10**18)) {
if (buyBackEnabled && balance > uint256(1 * 10**18)) {
uint256 tokenSwapRate = _getTokenSwapRate();
if (balance > buyBackUpperLimit)
uint256 minTransferAmountToBuyBack = tokenSwapRate.mul(buyBackUpperLimit).div(100).div(10**18);
balance = buyBackUpperLimit;
if (balance > buyBackUpperLimit) {
if (amount >= minTransferAmountToBuyBack) {
buyBackTokens(balance.div(100));
balance = buyBackUpperLimit;
buyBackTokens(balance.div(100));
} else if (block.timestamp > lastBuybackTimestamp + minTimeToBuyback) {
uint256 lowBuyBack = amount.mul(10**18).div(tokenSwapRate);
buyBackTokens(lowBuyBack);
lastBuybackTimestamp = block.timestamp;
}
}
}
}
}
}
// ADDED: Automatic Liquidity
if(contractTokenBalance >= _maxTxAmount)
{
contractTokenBalance = _maxTxAmount;
}
bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity;
if (
overMinTokenBalance &&
!inSwapAndLiquify &&
from != uniswapV2Pair &&
swapAndLiquifyEnabled
) {
contractTokenBalance = numTokensSellToAddToLiquidity;
//add liquidity
swapAndLiquify(contractTokenBalance);
}
bool takeFee = true;
bool takeFee = true;
//if any account belongs to _isExcludedFromFee account then remove the fee
//if any account belongs to _isExcludedFromFee account then remove the fee
if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){
if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){
takeFee = false;
takeFee = false;
}
}
_tokenTransfer(from,to,amount,takeFee);
}
function swapTokens(uint256 contractTokenBalance) private lockTheSwap {
_tokenTransfer(from,to,amount,takeFee);
uint256 initialBalance = address(this).balance;
swapTokensForEth(contractTokenBalance);
uint256 transferredBalance = address(this).balance.sub(initialBalance);
//Send to Marketing address
transferToAddressETH(marketingAddress, transferredBalance.div(_liquidityFee).mul(marketingDivisor));
}
}
function buyBackTokens(uint256 amount) private lockTheSwap {
function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
if (amount > 0) {
// split the contract balance into halves
swapETHForTokens(amount);
uint256 half = contractTokenBalance.div(2);
}
uint256 otherHalf = contractTokenBala
}
functi