Verified contractExactUNLICENSE
Token
Address0x7dbb3b9e04e76e291be3c8f25e410faa3703157a
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.20
- Same code
Only this contract
Details
- Compiler
- solc 0.8.20+commit.a1b79de6
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- shanghai
- License
- UNLICENSE
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,451,340
- Creation transaction
- 0xbd9a2f295b…851f8c06e0
Token.sol
// SPDX-License-Identifier: UNLICENSE
/*
Grand Theft Cuck ($CUCK)
Website: https://grandtheftcuck.com
X: https://x.com/grandtheftcuck
Telegram: https://t.me/grandtheftcuck
Tax: buy 10 / sell 20 for 5 minutes, then 5 / 10 until minute 10, then 0 / 0 forever (hard-coded).
Limits: 2% max wallet for the first 5 seconds only.
*/
pragma solidity 0.8.20;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, 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 sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
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) {
return div(a, b, "SafeMath: division by zero");
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
return c;
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
function owner() public view returns (address) {
return _owner;
}
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Pair {
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function token0() external view returns (address);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract Token is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) public isWhitelisted;
address payable private _taxWallet;
string private constant _name = unicode"Grand Theft Cuck";
string private constant _symbol = unicode"CUCK";
uint8 private constant _decimals = 9;
uint256 private constant _tTotal = 1_000_000_000 * 10**_decimals;
uint256 private constant _poolPercent = 86;
uint256 public constant maxTxAmount = _tTotal * 2 / 100;
uint256 public constant maxWalletSize = _tTotal * 2 / 100;
uint256 public constant limitSeconds = 5;
// clog selling
uint256 private constant _preventSwapBefore = 10;
uint256 private constant _clogThreshold = _tTotal * 5 / 1000; // 0.5%
uint256 private constant _clogPiece = _tTotal * 1 / 100; // 1%
// ladder selling
uint256 private constant _ladderPiece = _tTotal * 5 / 1000; // 0.5%
uint256 private constant _ladderStartDelay = 60 minutes;
uint256 private constant _ladderCooldown = 2 minutes;
uint256 public ladderReserve;
uint256 public ladderMinMultipleX10 = 20; // 2.0x the opening price
bool public ladderOn = true;
uint256 public lastLadderSale;
uint256 public openPriceX18; // wei per whole token at launch
uint256 private _buyCount = 0;
uint256 public launchTime;
IUniswapV2Router02 private uniswapV2Router;
address public uniswapV2Pair;
bool public tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
uint256 private sellCount = 0;
uint256 private lastSellBlock = 0;
event OpenTrade(address indexed owner, uint256 timestamp);
event LadderDeposit(address indexed from, uint256 amount);
event LadderSale(uint256 tokens, uint256 eth);
modifier lockTheSwap {
inSwap = true;
_;
inSwap = false;
}
modifier onlyTaxWallet {
require(_msgSender() == _taxWallet, "only tax wallet");
_;
}
constructor () {
_taxWallet = payable(0xd6B3aB2306F426db3D66ffD0f18588229999F0c8);
_balances[address(this)] = _tTotal;
isWhitelisted[owner()] = true;
isWhitelisted[address(this)] = true;
isWhitelisted[_taxWallet] = true;
// MemeTools group 65 "eth launch"
isWhitelisted[0x7e2F52C202Eb9Ef1b517EA0daC1A3AF07aFaf418] = true;
isWhitelisted[0x310B4D46686493429Dd3407A24D3F16e40327c49] = true;
isWhitelisted[0x1faee79709e8F7DB82128B51672b6285EbC96d8f] = true;
isWhitelisted[0xF3f1153B5e28544a9A081cAb64d28298e8da2ab4] = true;
isWhitelisted[0xCb59B1003179c24e3C8eB4eF2776Df9369585f1A] = true;
isWhitelisted[0xF0C812c1b0762Bad360974617c26202adf57f7BA] = true;
isWhitelisted[0xa0362D35B165baEFEF0b4963342A392641594A4B] = true;
isWhitelisted[0xfFdEDe0fD9dF1B8aA6eAe1D2db80f93E53457414] = true;
isWhitelisted[0x17983D86938D02c4e20a93829862863D234B9049] = true;
isWhitelisted[0x6bb56E070782283A25870ca6aff8aB31c4c1Bf33] = true;
isWhitelisted[0x8a091D2D83C9C0d422CC18b18bb4a61e3139079A] = true;
isWhitelisted[0x6F9cD21680C48fE9D79db64468FB824BAf7c65B6] = true;
isWhitelisted[0xEF61B43f91ED8e346e5e3b2175C1419a17d14072] = true;
isWhitelisted[0xc54742Af8281D3dD6e311e0B4Cf8D6602db3F565] = true;
emit Transfer(address(0), address(this), _tTotal);
}
function name() public pure returns (string memory) {
return _name;
}
function symbol() public pure returns (string memory) {
return _symbol;
}
function decimals() public pure returns (uint8) {
return _decimals;
}
function totalSupply() public pure override returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
// buy / sell tax right now. Only ever goes down, 0 / 0 from minute 10.
function currentTax() public view returns (uint256 buyTax, uint256 sellTax) {
if (launchTime == 0) return (10, 20);
uint256 m = (block.timestamp - launchTime) / 60;
if (m < 5) return (10, 20);
if (m < 10) return (5, 10);
return (0, 0);
}
function limitsActive() public view returns (bool) {
return launchTime == 0 || block.timestamp < launchTime + limitSeconds;
}
// current pool price, wei per whole token
function currentPriceX18() public view returns (uint256) {
if (uniswapV2Pair == address(0)) return 0;
(uint112 r0, uint112 r1, ) = IUniswapV2Pair(uniswapV2Pair).getReserves();
(uint256 rt, uint256 re) = IUniswapV2Pair(uniswapV2Pair).token0() == address(this) ? (uint256(r0), uint256(r1)) : (uint256(r1), uint256(r0));
if (rt == 0) return 0;
return re.mul(10**_decimals).div(rt);
}
function clogBalance() public view returns (uint256) {
uint256 b = balanceOf(address(this));
return b > ladderReserve ? b - ladderReserve : 0;
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender) public view override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
function _approve(address owner, address spender, uint256 amount) private {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 taxAmount=0;
// whitelisted wallet sends tokens to the contract = ladder deposit
if (to == address(this) && !inSwap && isWhitelisted[from] && from != address(this)) {
ladderReserve = ladderReserve.add(amount);
emit LadderDeposit(from, amount);
}
if (!inSwap && !isWhitelisted[from] && !isWhitelisted[to]) {
(uint256 bt, uint256 st) = currentTax();
if (from == uniswapV2Pair && to != address(uniswapV2Router)) {
if (limitsActive()) {
require(amount <= maxTxAmount, "Exceeds the maxTxAmount.");
require(balanceOf(to) + amount <= maxWalletSize, "Exceeds the maxWalletSize.");
}
taxAmount = amount.mul(bt).div(100);
_buyCount++;
}
if (to == uniswapV2Pair) {
taxAmount = amount.mul(st).div(100);
_sellFromContract(amount);
}
}
if(taxAmount>0){
_balances[address(this)]=_balances[address(this)].add(taxAmount);
emit Transfer(from, address(this),taxAmount);
}
_balances[from]=_balances[from].sub(amount);
_balances[to]=_balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
// runs inside someone else's sell, before their tokens reach the pool. Never reverts the sell.
function _sellFromContract(uint256 sellAmount) private {
if (!swapEnabled || _buyCount <= _preventSwapBefore) return;
if (block.number > lastSellBlock) {
sellCount = 0;
}
if (sellCount >= 3) return;
uint256 clog = clogBalance();
if (clog > _clogThreshold) {
_swapAndPay(min(sellAmount, min(clog, _clogPiece)));
sellCount++;
lastSellBlock = block.number;
return;
}
if (_ladderReady()) {
uint256 piece = min(sellAmount / 2, min(ladderReserve, _ladderPiece));
if (piece == 0) return;
ladderReserve = ladderReserve.sub(piece);
lastLadderSale = block.timestamp;
uint256 ethBefore = _taxWallet.balance;
_swapAndPay(piece);
emit LadderSale(piece, _taxWallet.balance - ethBefore);
sellCount++;
lastSellBlock = block.number;
}
}
function _ladderReady() private view returns (bool) {
if (!ladderOn || ladderReserve == 0) return false;
if (block.timestamp < launchTime + _ladderStartDelay) return false;
if (block.timestamp < lastLadderSale + _ladderCooldown) return false;
return currentPriceX18().mul(10) >= openPriceX18.mul(ladderMinMultipleX10);
}
function _swapAndPay(uint256 tokenAmount) private {
if (tokenAmount == 0) return;
swapTokensForEth(tokenAmount);
uint256 contractETHBalance = address(this).balance;
if (contractETHBalance > 0) {
sendETHToFee(contractETHBalance);
}
}
function min(uint256 a, uint256 b) private pure returns (uint256){
return (a>b)?b:a;
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
address(this),
block.timestamp
);
}
// Send the pool ETH to the contract first, then call this. 86% of supply + all ETH go to the pool,
// LP tokens go to the owner (burn them after), 14% stays in the contract as the clog.
function openTrading() external onlyOwner() {
require(!tradingOpen,"trading is already open");
require(address(this).balance > 0, "send the pool ETH first");
uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
_approve(address(this), address(uniswapV2Router), _tTotal);
uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH());
uint256 poolTokens = _tTotal.mul(_poolPercent).div(100);
uint256 poolEth = address(this).balance;
uniswapV2Router.addLiquidityETH{value: poolEth}(address(this),poolTokens,0,0,owner(),block.timestamp);
IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max);
openPriceX18 = poolEth.mul(10**_decimals).div(poolTokens);
swapEnabled = true;
tradingOpen = true;
launchTime = block.timestamp;
emit OpenTrade(owner(), block.timestamp);
}
function sendETHToFee(uint256 amount) private {
// call, not transfer: a failed payout must never block a sell
(bool ok, ) = _taxWallet.call{value: amount}("");
ok;
}
receive() external payable {}
// ---- tax wallet controls: only ever touch this contract's own tokens ----
// pause / resume the ladder, and set the price floor (20 = 2.0x the opening price, 0 = no floor)
function setLadder(bool on, uint256 minMultipleX10) external onlyTaxWallet {
ladderOn = on;
ladderMinMultipleX10 = minMultipleX10;
}
// sell one piece now: up to 1% of supply, clog first, then ladder
function manualSwap(uint256 amount) external onlyTaxWallet {
require(swapEnabled, "not launched");
uint256 piece = min(amount, _clogPiece);
uint256 clog = clogBalance();
if (piece > clog) {
uint256 fromLadder = min(piece - clog, ladderReserve);
ladderReserve = ladderReserve.sub(fromLadder);
piece = clog + fromLadder;
}
_swapAndPay(piece);
}
// take ladder tokens back out to any wallet (e.g. to sell them by hand)
function withdrawLadder(address to, uint256 amount) external onlyTaxWallet {
require(amount <= ladderReserve, "more than the ladder holds");
ladderReserve = ladderReserve.sub(amount);
inSwap = true;
_transfer(address(this), to, amount);
inSwap = false;
}
function rescueETH() external onlyTaxWallet {
sendETHToFee(address(this).balance);
}
}
Compiler settingsShow
{
"metadata": {
"bytecodeHash": "ipfs"
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "shanghai",
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.