Address Contract Verified
Address
0xf59Baa2a3D29c853236480C4fbB540D1c7c04277
Balance
0 ETH
Nonce
1
Code Size
5011 bytes
Creator
0x001eDA2B...f266 at tx 0xc9fbb5eb...d6528e
Indexed Transactions
0
Contract Bytecode
5011 bytes
0x608060405234801561001057600080fd5b506004361061016c5760003560e01c8063697cfc19116100cd578063a9059cbb11610081578063d8cdf48b11610066578063d8cdf48b1461030b578063dd62ed3e1461031d578063f2fde38b1461034857600080fd5b8063a9059cbb146102e5578063d505accf146102f857600080fd5b80637ecebe00116100b25780637ecebe00146102785780638da5cb5b1461029857806395d89b41146102dd57600080fd5b8063697cfc191461025057806370a082311461025857600080fd5b8063313ce567116101245780633c8463a1116101095780633c8463a1146102275780634febf53d146102345780635acb6bb51461024757600080fd5b8063313ce567146101e65780633644e5151461021f57600080fd5b80630a37dde7116101555780630a37dde7146101b257806318160ddd146101bc57806323b872dd146101d357600080fd5b806306fdde0314610171578063095ea7b31461018f575b600080fd5b61017961035b565b6040516101869190611023565b60405180910390f35b6101a261019d3660046110b8565b6103e9565b6040519015158152602001610186565b6101ba610463565b005b6101c560025481565b604051908152602001610186565b6101a26101e13660046110e2565b610513565b61020d7f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff9091168152602001610186565b6101c5610533565b600a546101a29060ff1681565b6101ba61024236600461111e565b61058e565b6101c560095481565b6101ba6106ee565b6101c561026636600461111e565b60036020526000908152604090205481565b6101c561028636600461111e565b60056020526000908152604090205481565b6006546102b89073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610186565b610179610799565b6101a26102f33660046110b8565b6107a6565b6101ba610306366004611139565b6107c4565b600a546101a290610100900460ff1681565b6101c561032b3660046111ac565b600460209081526000928352604080842090915290825290205481565b6101ba61035636600461111e565b610ae3565b60008054610368906111df565b80601f0160208091040260200160405190810160405280929190818152602001828054610394906111df565b80156103e15780601f106103b6576101008083540402835291602001916103e1565b820191906000526020600020905b8154815290600101906020018083116103c457829003601f168201915b505050505081565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906104519086815260200190565b60405180910390a35060015b92915050565b60065473ffffffffffffffffffffffffffffffffffffffff1633146104e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064015b60405180910390fd5b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055565b6000610520848484610bd5565b61052b848484610dc0565b949350505050565b60007f0000000000000000000000000000000000000000000000000000000000000001461461056957610564610f04565b905090565b507f25070d3eb0c18e57e4cb49aa41eecb9b82eed25e3054167294bb2b67e2c6c58190565b60065473ffffffffffffffffffffffffffffffffffffffff16331461060f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016104e0565b73ffffffffffffffffffffffffffffffffffffffff811660009081526007602052604090205460ff161561069f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f416c7265616479206578636c756465640000000000000000000000000000000060448201526064016104e0565b73ffffffffffffffffffffffffffffffffffffffff16600090815260076020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60065473ffffffffffffffffffffffffffffffffffffffff16331461076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016104e0565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b60018054610368906111df565b60006107b3338484610bd5565b6107bd8383610f9e565b9392505050565b4284101561082e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5045524d49545f444541444c494e455f4558504952454400000000000000000060448201526064016104e0565b6000600161083a610533565b73ffffffffffffffffffffffffffffffffffffffff8a811660008181526005602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e0830190915280519201919091207f190100000000000000000000000000000000000000000000000000000000000061010083015261010282019290925261012281019190915261014201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa15801561098c573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590610a0757508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f494e56414c49445f5349474e455200000000000000000000000000000000000060448201526064016104e0565b73ffffffffffffffffffffffffffffffffffffffff90811660009081526004602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314610b64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016104e0565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831690811790915560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350565b600a5460ff168015610c0d575073ffffffffffffffffffffffffffffffffffffffff821660009081526007602052604090205460ff16155b15610d1f5760065473ffffffffffffffffffffffffffffffffffffffff848116911614801590610c58575060065473ffffffffffffffffffffffffffffffffffffffff838116911614155b15610d1f5760095473ffffffffffffffffffffffffffffffffffffffff8316600090815260036020526040902054610c91908390611261565b1115610d1f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f544f4b454e3a20416d6f756e742065786365656473206d6178696d756d20776160448201527f6c6c65742073697a65000000000000000000000000000000000000000000000060648201526084016104e0565b600a54610100900460ff1615610dbb5732600090815260086020526040902054439003610da8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f45524332303a20424f540000000000000000000000000000000000000000000060448201526064016104e0565b3260009081526008602052604090204390555b505050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526004602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610e5457610e228382611274565b73ffffffffffffffffffffffffffffffffffffffff861660009081526004602090815260408083203384529091529020555b73ffffffffffffffffffffffffffffffffffffffff851660009081526003602052604081208054859290610e89908490611274565b909155505073ffffffffffffffffffffffffffffffffffffffff808516600081815260036020526040908190208054870190555190918716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610ef19087815260200190565b60405180910390a3506001949350505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051610f369190611287565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b33600090815260036020526040812080548391908390610fbf908490611274565b909155505073ffffffffffffffffffffffffffffffffffffffff8316600081815260036020526040908190208054850190555133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906104519086815260200190565b600060208083528351808285015260005b8181101561105057858101830151858201604001528201611034565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146110b357600080fd5b919050565b600080604083850312156110cb57600080fd5b6110d48361108f565b946020939093013593505050565b6000806000606084860312156110f757600080fd5b6111008461108f565b925061110e6020850161108f565b9150604084013590509250925092565b60006020828403121561113057600080fd5b6107bd8261108f565b600080600080600080600060e0888a03121561115457600080fd5b61115d8861108f565b965061116b6020890161108f565b95506040880135945060608801359350608088013560ff8116811461118f57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156111bf57600080fd5b6111c88361108f565b91506111d66020840161108f565b90509250929050565b600181811c908216806111f357607f821691505b60208210810361122c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561045d5761045d611232565b8181038181111561045d5761045d611232565b600080835481600182811c9150808316806112a357607f831692505b602080841082036112db577f4e487b710000000000000000000000000000000000000000000000000000000086526022600452602486fd5b8180156112ef57600181146113225761134f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008616895284151585028901965061134f565b60008a81526020902060005b868110156113475781548b82015290850190830161132e565b505084890196505b50949897505050505050505056fea264697066735822122048dbc20cf2b332518801caadc133615bd3793ac7991099c318c4d47a7d86f0b464736f6c63430008120033
Verified Source Code Full Match
Compiler: v0.8.18+commit.87f61d96
EVM: paris
Optimization: Yes (20000 runs)
Degen.sol 305 lines
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
/*//////////////////////////////////////////////////////////////
METADATA STORAGE
//////////////////////////////////////////////////////////////*/
string public name;
string public symbol;
uint8 public immutable decimals;
/*//////////////////////////////////////////////////////////////
ERC20 STORAGE
//////////////////////////////////////////////////////////////*/
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
/*//////////////////////////////////////////////////////////////
EIP-2612 STORAGE
//////////////////////////////////////////////////////////////*/
uint256 internal immutable INITIAL_CHAIN_ID;
bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;
mapping(address => uint256) public nonces;
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(
string memory _name,
string memory _symbol,
uint8 _decimals
) {
name = _name;
symbol = _symbol;
decimals = _decimals;
INITIAL_CHAIN_ID = block.chainid;
INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
}
/*//////////////////////////////////////////////////////////////
ERC20 LOGIC
//////////////////////////////////////////////////////////////*/
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;
// Cannot overflow because the sum of all user
// balances can't exceed the max uint256 value.
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]; // Saves gas for limited approvals.
if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;
balanceOf[from] -= amount;
// Cannot overflow because the sum of all user
// balances can't exceed the max uint256 value.
unchecked {
balanceOf[to] += amount;
}
emit Transfer(from, to, amount);
return true;
}
/*//////////////////////////////////////////////////////////////
EIP-2612 LOGIC
//////////////////////////////////////////////////////////////*/
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 because the only math done is incrementing
// the owner's nonce which cannot realistically overflow.
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)
)
);
}
/*//////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/
function _mint(address to, uint256 amount) internal virtual {
totalSupply += amount;
// Cannot overflow because the sum of all user
// balances can't exceed the max uint256 value.
unchecked {
balanceOf[to] += amount;
}
emit Transfer(address(0), to, amount);
}
function _burn(address from, uint256 amount) internal virtual {
balanceOf[from] -= amount;
// Cannot underflow because a user's balance
// will never be larger than the total supply.
unchecked {
totalSupply -= amount;
}
emit Transfer(from, address(0), amount);
}
}
pragma solidity >=0.8.0;
/// @notice Simple single owner authorization mixin.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)
abstract contract Owned {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event OwnershipTransferred(address indexed user, address indexed newOwner);
/*//////////////////////////////////////////////////////////////
OWNERSHIP STORAGE
//////////////////////////////////////////////////////////////*/
address public owner;
modifier onlyOwner() virtual {
require(msg.sender == owner, "UNAUTHORIZED");
_;
}
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(address _owner) {
owner = _owner;
emit OwnershipTransferred(address(0), _owner);
}
/*//////////////////////////////////////////////////////////////
OWNERSHIP LOGIC
//////////////////////////////////////////////////////////////*/
function transferOwnership(address newOwner) public virtual onlyOwner {
owner = newOwner;
emit OwnershipTransferred(msg.sender, newOwner);
}
}
pragma solidity >= 0.8.0 < 0.9.0;
contract Degen is ERC20, Owned {
mapping(address => bool) private _excludes;
// anti mev-bot
mapping(address => uint256) private _lastTime;
uint256 public mWalletSize;
bool public walletLimit = true;
bool public botPrevention = true;
constructor() ERC20("Degen", "$DEGEN", 18) Owned(msg.sender) {
_mint(msg.sender, 69_420_000_000_000 * 10 ** decimals);
mWalletSize = totalSupply / 100; // 1%
}
function exclude(address to) public onlyOwner {
require(!_excludes[to], "Already excluded");
_excludes[to] = true;
}
function disableWalletLimit() public onlyOwner {
walletLimit = false;
}
function disableBotPrevention() public onlyOwner {
botPrevention = false;
}
function _check(address from, address to, uint amount) private {
if (walletLimit && !_excludes[to]) {
if (from != owner && to != owner) {
require(balanceOf[to] + amount <= mWalletSize, "TOKEN: Amount exceeds maximum wallet size");
}
}
if (botPrevention) {
require(_lastTime[tx.origin] != block.number, "ERC20: BOT");
_lastTime[tx.origin] = block.number;
}
}
function transfer(address to, uint amount) public override returns (bool) {
_check(msg.sender, to, amount);
return super.transfer(to, amount);
}
function transferFrom(address from, address to, uint amount) public override returns (bool) {
_check(from, to, amount);
return super.transferFrom(from, to, amount);
}
}
Read Contract
DOMAIN_SEPARATOR 0x3644e515 → bytes32
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
botPrevention 0xd8cdf48b → bool
decimals 0x313ce567 → uint8
mWalletSize 0x5acb6bb5 → uint256
name 0x06fdde03 → string
nonces 0x7ecebe00 → uint256
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
walletLimit 0x3c8463a1 → bool
Write Contract 8 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
disableBotPrevention 0x0a37dde7
No parameters
disableWalletLimit 0x697cfc19
No parameters
exclude 0x4febf53d
address to
permit 0xd505accf
address owner
address spender
uint256 value
uint256 deadline
uint8 v
bytes32 r
bytes32 s
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address