This contract's source code is verified! Compiler
0.8.20+commit.a1b79de6
File 1 of 7: ERC20.sol
pragma solidity >=0.8.0;
abstract contract ERC20 {
event Transfer (address indexed from , address indexed to, uint256 amount ) ;
event Approval (address indexed owner, address indexed spender, uint256 amount ) ;
string public name;
string public symbol;
uint8 public immutable decimals;
uint256 public totalSupply;
mapping (address = > uint256 ) public balanceOf;
mapping (address = > mapping (address = > uint256 )) public allowance;
uint256 internal immutable INITIAL_CHAIN_ID;
bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;
mapping (address = > uint256 ) public nonces;
constructor (
string memory _name,
string memory _symbol,
uint8 _decimals
) {
name = _name;
symbol = _symbol;
decimals = _decimals;
INITIAL_CHAIN_ID = block .chainid ;
INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
}
function approve (address spender, uint256 amount ) public virtual returns (bool ) {
allowance[msg .sender ][spender] = amount;
emit Approval(msg .sender , spender, amount);
return true ;
}
function transfer (address to, uint256 amount ) public virtual returns (bool ) {
balanceOf[msg .sender ] - = amount;
unchecked {
balanceOf[to] + = amount;
}
emit Transfer(msg .sender , to, amount);
return true ;
}
function transferFrom (
address from ,
address to,
uint256 amount
) public virtual returns (bool ) {
uint256 allowed = allowance[from ][msg .sender ];
if (allowed ! = type (uint256 ).max ) allowance[from ][msg .sender ] = allowed - amount;
balanceOf[from ] - = amount;
unchecked {
balanceOf[to] + = amount;
}
emit Transfer(from , to, amount);
return true ;
}
function permit (
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual {
require (deadline > = block .timestamp , "PERMIT_DEADLINE_EXPIRED" );
unchecked {
address recoveredAddress = ecrecover (
keccak256 (
abi .encodePacked (
"\x19\x01" ,
DOMAIN_SEPARATOR(),
keccak256 (
abi .encode (
keccak256 (
"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
),
owner,
spender,
value,
nonces[owner]+ + ,
deadline
)
)
)
),
v,
r,
s
);
require (recoveredAddress ! = address (0 ) & & recoveredAddress = = owner, "INVALID_SIGNER" );
allowance[recoveredAddress][spender] = value;
}
emit Approval(owner, spender, value);
}
function DOMAIN_SEPARATOR ( ) public view virtual returns (bytes32 ) {
return block .chainid = = INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
}
function computeDomainSeparator ( ) internal view virtual returns (bytes32 ) {
return
keccak256 (
abi .encode (
keccak256 ("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ),
keccak256 (bytes (name)),
keccak256 ("1" ),
block .chainid ,
address (this )
)
);
}
function _mint (address to, uint256 amount ) internal virtual {
totalSupply + = amount;
unchecked {
balanceOf[to] + = amount;
}
emit Transfer(address (0 ), to, amount);
}
function _burn (address from , uint256 amount ) internal virtual {
balanceOf[from ] - = amount;
unchecked {
totalSupply - = amount;
}
emit Transfer(from , address (0 ), amount);
}
}
File 2 of 7: IUniswapV2Factory.sol
pragma solidity ^0.8.13;
interface IUniswapV2Factory {
function createPair (
address tokenA,
address tokenB
) external returns (address pair ) ;
}
File 3 of 7: IUniswapV2Router.sol
pragma solidity ^0.8.13;
interface IUniswapV2Router {
function factory ( ) external pure returns (address ) ;
function WETH ( ) external pure returns (address ) ;
function addLiquidity (
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity ) ;
function removeLiquidity (
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB ) ;
function addLiquidityETH (
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity ) ;
function swapExactTokensForTokensSupportingFeeOnTransferTokens (
uint256 amountIn,
uint256 amountOutMin,
address [] calldata path,
address to,
uint256 deadline
) external ;
function swapExactETHForTokensSupportingFeeOnTransferTokens (
uint256 amountOutMin,
address [] calldata path,
address to,
uint256 deadline
) external payable ;
function swapExactTokensForETHSupportingFeeOnTransferTokens (
uint256 amountIn,
uint256 amountOutMin,
address [] calldata path,
address to,
uint256 deadline
) external ;
}
File 4 of 7: Owned.sol
pragma solidity >=0.8.0;
abstract contract Owned {
event OwnershipTransferred (address indexed user, address indexed newOwner ) ;
address public owner;
modifier onlyOwner ( ) virtual {
require (msg .sender = = owner, "UNAUTHORIZED" );
_ ;
}
constructor (address _owner ) {
owner = _owner;
emit OwnershipTransferred(address (0 ), _owner);
}
function transferOwnership (address newOwner ) public virtual onlyOwner {
owner = newOwner;
emit OwnershipTransferred(msg .sender , newOwner);
}
}
File 5 of 7: SafeTransferLib.sol
pragma solidity >=0.8.0;
import {ERC20 } from "../tokens/ERC20.sol" ;
library SafeTransferLib {
function safeTransferETH (address to, uint256 amount ) internal {
bool success;
assembly {
success := call (gas (), to, amount, 0 , 0 , 0 , 0 )
}
require (success, "ETH_TRANSFER_FAILED" );
}
function safeTransferFrom (
ERC20 token,
address from ,
address to,
uint256 amount
) internal {
bool success;
assembly {
let freeMemoryPointer := mload (0x40 )
mstore (freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000 )
mstore (add (freeMemoryPointer, 4 ), and (from, 0xffffffffffffffffffffffffffffffffffffffff ))
mstore (add (freeMemoryPointer, 36 ), and (to, 0xffffffffffffffffffffffffffffffffffffffff ))
mstore (add (freeMemoryPointer, 68 ), amount)
success := and (
or (and (eq (mload (0 ), 1 ), gt (returndatasize (), 31 )), iszero (returndatasize ())),
call (gas (), token, 0 , freeMemoryPointer, 100 , 0 , 32 )
)
}
require (success, "TRANSFER_FROM_FAILED" );
}
function safeTransfer (
ERC20 token,
address to,
uint256 amount
) internal {
bool success;
assembly {
let freeMemoryPointer := mload (0x40 )
mstore (freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000 )
mstore (add (freeMemoryPointer, 4 ), and (to, 0xffffffffffffffffffffffffffffffffffffffff ))
mstore (add (freeMemoryPointer, 36 ), amount)
success := and (
or (and (eq (mload (0 ), 1 ), gt (returndatasize (), 31 )), iszero (returndatasize ())),
call (gas (), token, 0 , freeMemoryPointer, 68 , 0 , 32 )
)
}
require (success, "TRANSFER_FAILED" );
}
function safeApprove (
ERC20 token,
address to,
uint256 amount
) internal {
bool success;
assembly {
let freeMemoryPointer := mload (0x40 )
mstore (freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000 )
mstore (add (freeMemoryPointer, 4 ), and (to, 0xffffffffffffffffffffffffffffffffffffffff ))
mstore (add (freeMemoryPointer, 36 ), amount)
success := and (
or (and (eq (mload (0 ), 1 ), gt (returndatasize (), 31 )), iszero (returndatasize ())),
call (gas (), token, 0 , freeMemoryPointer, 68 , 0 , 32 )
)
}
require (success, "APPROVE_FAILED" );
}
}
File 6 of 7: Token.sol
pragma solidity ^0.8.19;
import {ERC20 } from "solmate/tokens/ERC20.sol" ;
import {WETH } from "solmate/tokens/WETH.sol" ;
import {Owned } from "solmate/auth/Owned.sol" ;
import {SafeTransferLib } from "solmate/utils/SafeTransferLib.sol" ;
import {IUniswapV2Factory } from "./interfaces/IUniswapV2Factory.sol" ;
import {IUniswapV2Router } from "./interfaces/IUniswapV2Router.sol" ;
contract Schizo is ERC20 , Owned {
using SafeTransferLib for ERC20 ;
struct User {
bool isBlacklisted;
bool isAutomatedMarketMaker;
bool isExcludedFromFees;
bool isExcludedFromMaxTransactionAmount;
}
struct Fees {
uint8 buy;
uint8 sell;
uint8 liquidity;
uint8 index;
uint8 development;
}
struct Settings {
bool limitsInEffect;
bool swapEnabled;
bool blacklistRenounced;
bool feeChangeRenounced;
bool tradingActive;
uint216 endBlock;
}
uint256 public constant MAX_SUPPLY = 1_000_000_000 * 1e18 ;
uint256 public constant MIN_SWAP_AMOUNT = MAX_SUPPLY / 100_000 ;
uint256 public constant MAX_SWAP_AMOUNT = (MAX_SUPPLY * 5 ) / 1_000 ;
IUniswapV2Router public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public immutable index;
address public immutable developmentWallet;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
uint256 public tokensForBotProtection;
Fees public feeAmounts;
bool private _swapping;
Settings private settings =
Settings({
limitsInEffect: true ,
swapEnabled: true ,
blacklistRenounced: false ,
feeChangeRenounced: false ,
tradingActive: false ,
endBlock: uint216 (0 )
});
mapping (address = > User) private _users;
address private wethAddress;
event ExcludeFromFees (address indexed account, bool isExcluded ) ;
event ExcludeFromMaxTransaction (address indexed account, bool isExcluded ) ;
event FailedSwapBackTransfer (address indexed destination, uint256 amount ) ;
event MaxTransactionAmountUpdated (uint256 newAmount, uint256 oldAmount ) ;
event SetAutomatedMarketMakerPair (address indexed pair, bool value ) ;
event SwapAndLiquify (uint256 tokensSwapped, uint256 ethReceived ) ;
event SwapTokensAtAmountUpdated (uint256 newAmount, uint256 oldAmount ) ;
error Index__BlacklistModificationDisabled ( ) ;
error Index__BuyAmountGreaterThanMax ( ) ;
error Index__CannotBlacklistLPPair ( ) ;
error Index__CannotBlacklistRouter ( ) ;
error Index__CannotRemovePairFromAMMs ( ) ;
error Index__CannotTransferFromAddressZero ( ) ;
error Index__CannotTransferToAddressZero ( ) ;
error Index__ErrorWithdrawingEth ( ) ;
error Index__FeeChangeRenounced ( ) ;
error Index__MaxFeeFivePercent ( ) ;
error Index__MaxTransactionTooLow ( ) ;
error Index__MaxWalletAmountExceeded ( ) ;
error Index__MaxWalletAmountTooLow ( ) ;
error Index__OnlyOwner ( ) ;
error Index__ReceiverBlacklisted ( ) ;
error Index__ReceiverCannotBeAddressZero ( ) ;
error Index__SellAmountGreaterThanMax ( ) ;
error Index__SenderBlacklisted ( ) ;
error Index__StuckEthWithdrawError ( ) ;
error Index__SwapAmountGreaterThanMaximum ( ) ;
error Index__SwapAmountLowerThanMinimum ( ) ;
error Index__TokenAddressCannotBeAddressZero ( ) ;
error Index__TradingNotActive ( ) ;
constructor ( ) ERC20 ("Schizo ETF" , "SCHIZO" , 18 ) Owned (msg .sender ) {
index = 0x57bA4b55E397FE3BB1a427f307791155A36798F6 ;
developmentWallet = 0x8d26323393BE2B05D37E60026931947C5A4f8374 ;
IUniswapV2Router _uniswapV2Router = IUniswapV2Router(
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
);
uniswapV2Router = _uniswapV2Router;
wethAddress = uniswapV2Router.WETH();
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address (this ), _uniswapV2Router.WETH());
maxTransactionAmount = MAX_SUPPLY / 200 ;
maxWallet = MAX_SUPPLY / 100 ;
swapTokensAtAmount = (MAX_SUPPLY * 5 ) / 10_000 ;
feeAmounts = Fees({
buy: 5 ,
sell: 5 ,
liquidity: 25 ,
index: 50 ,
development: 25
});
_users[msg .sender ] = User({
isExcludedFromFees: true ,
isExcludedFromMaxTransactionAmount: true ,
isAutomatedMarketMaker: false ,
isBlacklisted: false
});
_users[address (this )] = User({
isExcludedFromFees: true ,
isExcludedFromMaxTransactionAmount: true ,
isAutomatedMarketMaker: false ,
isBlacklisted: false
});
_users[address (uniswapV2Router)] = User({
isExcludedFromMaxTransactionAmount: true ,
isAutomatedMarketMaker: false ,
isExcludedFromFees: false ,
isBlacklisted: false
});
_users[address (uniswapV2Pair)] = User({
isExcludedFromMaxTransactionAmount: true ,
isAutomatedMarketMaker: true ,
isExcludedFromFees: false ,
isBlacklisted: false
});
_mint(msg .sender , MAX_SUPPLY);
_approve(address (uniswapV2Router), type (uint256 ).max );
}
receive ( ) external payable {}
function _requireIsOwner ( ) internal view {
require (msg .sender = = owner, "!owner" );
}
function burn (address from , uint256 amount ) external {
require (msg .sender = = index, "!index" );
_burn(from , amount);
}
function updateFees (Fees memory newFees ) external {
_requireIsOwner();
require (
newFees.development + newFees.index + newFees.liquidity = = 100 ,
"!valid"
);
feeAmounts = newFees;
}
function enableTrading ( ) external {
_requireIsOwner();
settings.endBlock = uint216 (block .number ) + 20 ;
settings.tradingActive = true ;
}
function removeLimits ( ) external {
_requireIsOwner();
settings.limitsInEffect = false ;
}
function updateSwapTokensAtAmount (uint256 newAmount ) external {
_requireIsOwner();
if (newAmount < MIN_SWAP_AMOUNT) {
revert Index__SwapAmountLowerThanMinimum();
}
if (newAmount > MAX_SWAP_AMOUNT) {
revert Index__SwapAmountGreaterThanMaximum();
}
uint256 oldSwapAmount = swapTokensAtAmount;
swapTokensAtAmount = newAmount;
emit SwapTokensAtAmountUpdated(newAmount, oldSwapAmount);
}
function updateMaxTransactionAmount (uint256 newAmount ) external {
_requireIsOwner();
if (newAmount < (MAX_SUPPLY * 5 ) / 1000 ) {
revert Index__MaxTransactionTooLow();
}
uint256 oldMaxTransactionAmount = maxTransactionAmount;
maxTransactionAmount = newAmount;
emit MaxTransactionAmountUpdated(newAmount, oldMaxTransactionAmount);
}
function excludeFromFees (address account, bool excluded ) external {
_requireIsOwner();
_users[account].isExcludedFromFees = excluded;
emit ExcludeFromFees(account, excluded);
}
function excludeFromMaxTransaction (
address account,
bool isExcluded
) external {
_requireIsOwner();
_users[account].isExcludedFromMaxTransactionAmount = isExcluded;
emit ExcludeFromMaxTransaction(account, isExcluded);
}
function setAutomatedMarketMakerPair (address pair, bool value ) external {
_requireIsOwner();
if (pair = = uniswapV2Pair) {
revert Index__CannotRemovePairFromAMMs();
}
_users[pair].isAutomatedMarketMaker = value;
emit SetAutomatedMarketMakerPair(pair, value);
}
function renounceBlacklist ( ) external {
_requireIsOwner();
settings.blacklistRenounced = true ;
}
function blacklist (address account ) external {
_requireIsOwner();
if (settings.blacklistRenounced) {
revert Index__BlacklistModificationDisabled();
}
if (account = = uniswapV2Pair) {
revert Index__CannotBlacklistLPPair();
}
if (account = = address (uniswapV2Router)) {
revert Index__CannotBlacklistRouter();
}
_users[account].isBlacklisted = true ;
}
function unblacklist (address account ) external {
_requireIsOwner();
_users[account].isBlacklisted = false ;
}
function isExcludedFromFees (address account ) external view returns (bool ) {
return _users[account].isExcludedFromFees;
}
function isExcludedFromMaxTransactionAmount (
address account
) external view returns (bool ) {
return _users[account].isExcludedFromMaxTransactionAmount;
}
function isAutomatedMarketMakerPair (
address pair
) external view returns (bool ) {
return _users[pair].isAutomatedMarketMaker;
}
function isBlacklisted (address account ) external view returns (bool ) {
return _users[account].isBlacklisted;
}
function isSwapEnabled ( ) external view returns (bool ) {
return settings.swapEnabled;
}
function isBlacklistRenounced ( ) external view returns (bool ) {
return settings.blacklistRenounced;
}
function isFeeChangeRenounced ( ) external view returns (bool ) {
return settings.feeChangeRenounced;
}
function isTradingActive ( ) external view returns (bool ) {
return settings.tradingActive;
}
function isLimitInEffect ( ) external view returns (bool ) {
return settings.limitsInEffect;
}
function transfer (
address to,
uint256 amount
) public override returns (bool ) {
_transfer(msg .sender , to, amount);
return true ;
}
function transferFrom (
address from ,
address to,
uint256 amount
) public override returns (bool ) {
uint256 allowed = allowance[from ][msg .sender ];
if (allowed ! = type (uint256 ).max ) {
allowance[from ][msg .sender ] = allowed - amount;
}
_transfer(from , to, amount);
return true ;
}
function _transfer (
address from ,
address to,
uint256 amount
) internal returns (bool ) {
User memory fromData = _users[from ];
User memory toData = _users[to];
Settings memory settingCache = settings;
if (! settingCache.tradingActive) {
if (! fromData.isExcludedFromFees) {
if (! toData.isExcludedFromFees) {
revert Index__TradingNotActive();
}
}
}
if (fromData.isBlacklisted) {
revert Index__SenderBlacklisted();
}
if (toData.isBlacklisted) {
revert Index__ReceiverBlacklisted();
}
if (amount = = 0 ) {
return true ;
}
bool excludedFromFees = fromData.isExcludedFromFees | |
toData.isExcludedFromFees;
uint8 txType = 3 ;
if (fromData.isAutomatedMarketMaker) {
txType = 1 ;
} else if (toData.isAutomatedMarketMaker) {
txType = 2 ;
}
if (! _swapping) {
if (settingCache.limitsInEffect) {
if (txType = = 1 & & ! toData.isExcludedFromMaxTransactionAmount) {
if (amount > maxTransactionAmount) {
revert Index__BuyAmountGreaterThanMax();
}
if (amount + this .balanceOf(to) > maxWallet) {
revert Index__MaxWalletAmountExceeded();
}
}
else if (
txType = = 2 & & ! fromData.isExcludedFromMaxTransactionAmount
) {
if (amount > maxTransactionAmount) {
revert Index__SellAmountGreaterThanMax();
}
} else if (! toData.isExcludedFromMaxTransactionAmount) {
if (amount + this .balanceOf(to) > maxWallet) {
revert Index__MaxWalletAmountExceeded();
}
}
}
if (settingCache.swapEnabled) {
if (txType = = 2 ) {
if (this .balanceOf(address (this )) > = swapTokensAtAmount) {
_swapping = true ;
_swapBack();
_swapping = false ;
}
}
}
}
if (txType < 3 ) {
bool takeFee = ! _swapping;
if (excludedFromFees) {
takeFee = false ;
}
uint256 fees = 0 ;
if (takeFee) {
Fees memory feeCache = feeAmounts;
if (txType = = 2 ) {
if (feeCache.sell > 0 ) {
fees = (amount * feeCache.sell) / 100 ;
}
}
else if (txType = = 1 ) {
if (feeCache.buy > 0 ) {
fees = (amount * feeCache.buy) / 100 ;
}
}
if (block .number < settingCache.endBlock) {
uint256 blocksLeft = settingCache.endBlock - block .number ;
uint256 botFeeMultiplier = 95 ;
if (blocksLeft < 19 ) {
botFeeMultiplier - = (5 * (19 - blocksLeft));
}
uint256 botFee = (amount * botFeeMultiplier) / 100 ;
_doTransfer(from , owner, fees);
amount - = botFee;
tokensForBotProtection + = botFee;
}
amount - = fees;
if (fees > 0 ) {
_doTransfer(from , address (this ), fees);
}
}
}
_doTransfer(from , to, amount);
return true ;
}
function _swapTokensForEth (uint256 tokenAmount ) internal {
address [] memory path = new address [](2 );
path[0 ] = address (this );
path[1 ] = uniswapV2Router.WETH();
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0 ,
path,
address (this ),
block .timestamp
);
}
function _addLiquidity (uint256 tokenAmount, uint256 ethAmount ) internal {
uniswapV2Router.addLiquidityETH{value : ethAmount}(
address (this ),
tokenAmount,
0 ,
0 ,
owner,
block .timestamp
);
}
function _doTransfer (
address from ,
address to,
uint256 amount
) internal returns (bool ) {
balanceOf[from ] - = amount;
unchecked {
balanceOf[to] + = amount;
}
emit Transfer(from , to, amount);
return true ;
}
function _swapBack ( ) internal {
uint256 contractBalance = this .balanceOf(address (this ));
Fees memory feeCache = feeAmounts;
if (contractBalance = = 0 ) {
return ;
}
uint256 maxAmount = swapTokensAtAmount * 20 ;
if (contractBalance > maxAmount) {
contractBalance = maxAmount;
}
uint256 liquidityAmount = (contractBalance * feeCache.liquidity) / 100 ;
uint256 liquidityTokens = liquidityAmount - (liquidityAmount / 2 );
uint256 initialETHBalance = address (this ).balance ;
_swapTokensForEth(liquidityTokens);
uint256 ethForLiquidity = address (this ).balance - initialETHBalance;
if (liquidityTokens > 0 & & ethForLiquidity > 0 ) {
_addLiquidity(liquidityTokens, ethForLiquidity);
emit SwapAndLiquify(liquidityTokens, ethForLiquidity);
}
uint256 amountToSwapForETH = contractBalance - liquidityAmount;
_swapTokensForEth(amountToSwapForETH);
uint256 contractEthAmount = address (this ).balance ;
uint256 initialTotalEth = contractEthAmount + (ethForLiquidity * 2 );
uint256 developmentEthAmount = (initialTotalEth *
feeCache.development) / 100 ;
(bool success, ) = address (developmentWallet).call {
value : developmentEthAmount
}("" );
require (success);
uint256 indexEthAmount = contractEthAmount - developmentEthAmount;
WETH(payable (wethAddress)).deposit{value : indexEthAmount}();
ERC20(wethAddress).safeTransfer(index, indexEthAmount);
}
function _approve (address spender, uint256 amount ) internal onlyOwner {
allowance[address (this )][spender] = amount;
emit Approval(address (this ), spender, amount);
}
}
File 7 of 7: WETH.sol
pragma solidity >=0.8.0;
import {ERC20 } from "./ERC20.sol" ;
import {SafeTransferLib } from "../utils/SafeTransferLib.sol" ;
contract WETH is ERC20 ("Wrapped Ether" , "WETH" , 18 ) {
using SafeTransferLib for address ;
event Deposit (address indexed from , uint256 amount ) ;
event Withdrawal (address indexed to, uint256 amount ) ;
function deposit ( ) public payable virtual {
_mint(msg .sender , msg .value );
emit Deposit(msg .sender , msg .value );
}
function withdraw (uint256 amount ) public virtual {
_burn(msg .sender , amount);
emit Withdrawal(msg .sender , amount);
msg .sender .safeTransferETH(amount);
}
receive ( ) external payable virtual {
deposit();
}
}
{
"compilationTarget" : {
"src/Token.sol" : "Schizo"
} ,
"evmVersion" : "paris" ,
"libraries" : { } ,
"metadata" : {
"bytecodeHash" : "ipfs"
} ,
"optimizer" : {
"enabled" : true ,
"runs" : 200
} ,
"remappings" : [
":ds-test/=lib/forge-std/lib/ds-test/src/" ,
":forge-std/=lib/forge-std/src/" ,
":solmate/=lib/solmate/src/"
]
} [{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Index__BlacklistModificationDisabled","type":"error"},{"inputs":[],"name":"Index__BuyAmountGreaterThanMax","type":"error"},{"inputs":[],"name":"Index__CannotBlacklistLPPair","type":"error"},{"inputs":[],"name":"Index__CannotBlacklistRouter","type":"error"},{"inputs":[],"name":"Index__CannotRemovePairFromAMMs","type":"error"},{"inputs":[],"name":"Index__CannotTransferFromAddressZero","type":"error"},{"inputs":[],"name":"Index__CannotTransferToAddressZero","type":"error"},{"inputs":[],"name":"Index__ErrorWithdrawingEth","type":"error"},{"inputs":[],"name":"Index__FeeChangeRenounced","type":"error"},{"inputs":[],"name":"Index__MaxFeeFivePercent","type":"error"},{"inputs":[],"name":"Index__MaxTransactionTooLow","type":"error"},{"inputs":[],"name":"Index__MaxWalletAmountExceeded","type":"error"},{"inputs":[],"name":"Index__MaxWalletAmountTooLow","type":"error"},{"inputs":[],"name":"Index__OnlyOwner","type":"error"},{"inputs":[],"name":"Index__ReceiverBlacklisted","type":"error"},{"inputs":[],"name":"Index__ReceiverCannotBeAddressZero","type":"error"},{"inputs":[],"name":"Index__SellAmountGreaterThanMax","type":"error"},{"inputs":[],"name":"Index__SenderBlacklisted","type":"error"},{"inputs":[],"name":"Index__StuckEthWithdrawError","type":"error"},{"inputs":[],"name":"Index__SwapAmountGreaterThanMaximum","type":"error"},{"inputs":[],"name":"Index__SwapAmountLowerThanMinimum","type":"error"},{"inputs":[],"name":"Index__TokenAddressCannotBeAddressZero","type":"error"},{"inputs":[],"name":"Index__TradingNotActive","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"ExcludeFromFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"ExcludeFromMaxTransaction","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"destination","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FailedSwapBackTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldAmount","type":"uint256"}],"name":"MaxTransactionAmountUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pair","type":"address"},{"indexed":false,"internalType":"bool","name":"value","type":"bool"}],"name":"SetAutomatedMarketMakerPair","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokensSwapped","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethReceived","type":"uint256"}],"name":"SwapAndLiquify","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldAmount","type":"uint256"}],"name":"SwapTokensAtAmountUpdated","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":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SWAP_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_SWAP_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","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":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"blacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"developmentWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeFromFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"excludeFromMaxTransaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAmounts","outputs":[{"internalType":"uint8","name":"buy","type":"uint8"},{"internalType":"uint8","name":"sell","type":"uint8"},{"internalType":"uint8","name":"liquidity","type":"uint8"},{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"uint8","name":"development","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"index","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"}],"name":"isAutomatedMarketMakerPair","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isBlacklistRenounced","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromMaxTransactionAmount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFeeChangeRenounced","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLimitInEffect","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSwapEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTradingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTransactionAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"removeLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setAutomatedMarketMakerPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapTokensAtAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensForBotProtection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"unblacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2Router","outputs":[{"internalType":"contract IUniswapV2Router","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint8","name":"buy","type":"uint8"},{"internalType":"uint8","name":"sell","type":"uint8"},{"internalType":"uint8","name":"liquidity","type":"uint8"},{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"uint8","name":"development","type":"uint8"}],"internalType":"struct Schizo.Fees","name":"newFees","type":"tuple"}],"name":"updateFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"updateMaxTransactionAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"updateSwapTokensAtAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]