Address Contract Verified
Address
0x9619b0eaDD70d643Cb2BBE6d5752B15C16fbf2d2
Balance
0 ETH
Nonce
1
Code Size
3303 bytes
Creator
0x75c72ce4...b72E at tx 0x45465209...ec5c6e
Indexed Transactions
0 (1 on-chain, 1.2% indexed)
Contract Bytecode
3303 bytes
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80637ecebe0011610097578063dd62ed3e11610066578063dd62ed3e14610216578063df32754b14610241578063f10f864e1461026c578063f4c2baa91461027457600080fd5b80637ecebe00146101c657806395d89b41146101e6578063a9059cbb146101ee578063d505accf1461020157600080fd5b806323b872dd116100d357806323b872dd14610152578063313ce567146101655780633644e5151461019e57806370a08231146101a657600080fd5b806306fdde03146100fa578063095ea7b31461011857806318160ddd1461013b575b600080fd5b610102610287565b60405161010f9190610a04565b60405180910390f35b61012b610126366004610a6e565b610315565b604051901515815260200161010f565b61014460045481565b60405190815260200161010f565b61012b610160366004610a98565b610382565b61018c7f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff909116815260200161010f565b610144610528565b6101446101b4366004610ad4565b60056020526000908152604090205481565b6101446101d4366004610ad4565b60076020526000908152604090205481565b610102610583565b61012b6101fc366004610a6e565b610590565b61021461020f366004610af6565b6106b5565b005b610144610224366004610b69565b600660209081526000928352604080842090915290825290205481565b600254610254906001600160a01b031681565b6040516001600160a01b03909116815260200161010f565b6102146108f9565b610214610282366004610ad4565b610931565b6000805461029490610b9c565b80601f01602080910402602001604051908101604052809291908181526020018280546102c090610b9c565b801561030d5780601f106102e25761010080835404028352916020019161030d565b820191906000526020600020905b8154815290600101906020018083116102f057829003601f168201915b505050505081565b3360008181526006602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103709086815260200190565b60405180910390a35060015b92915050565b600354600090600160a01b900460ff1615806103ab57506003546001600160a01b038481169116145b806103e557506001600160a01b0383166000908152600560205260409020546a108b2a2c28029094000000906103e2908490610bec565b11155b6104365760405162461bcd60e51b815260206004820152601a60248201527f3225206d617820626974636f696e32207065722077616c6c657400000000000060448201526064015b60405180910390fd5b6001600160a01b038416600090815260066020908152604080832033845290915290205460001981146104925761046d8382610bff565b6001600160a01b03861660009081526006602090815260408083203384529091529020555b6001600160a01b038516600090815260056020526040812080548592906104ba908490610bff565b90915550506001600160a01b03808516600081815260056020526040908190208054870190555190918716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906105159087815260200190565b60405180910390a3506001949350505050565b60007f0000000000000000000000000000000000000000000000000000000000000001461461055e5761055961096a565b905090565b507fdbf1e80c8470e17966c95f707d0ca9bdb8464a481944502347190737fbfe19cf90565b6001805461029490610b9c565b600354600090600160a01b900460ff1615806105b957506003546001600160a01b038481169116145b806105f357506001600160a01b0383166000908152600560205260409020546a108b2a2c28029094000000906105f0908490610bec565b11155b61063f5760405162461bcd60e51b815260206004820152601a60248201527f3225206d617820626974636f696e32207065722077616c6c6574000000000000604482015260640161042d565b336000908152600560205260408120805484929061065e908490610bff565b90915550506001600160a01b038316600081815260056020526040908190208054850190555133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103709086815260200190565b428410156107055760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f45585049524544000000000000000000604482015260640161042d565b60006001610711610528565b6001600160a01b038a811660008181526007602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa15801561081d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906108535750876001600160a01b0316816001600160a01b0316145b6108905760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b604482015260640161042d565b6001600160a01b0390811660009081526006602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b6002546001600160a01b0316331461091057600080fd5b6003805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6002546001600160a01b0316331461094857600080fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f600060405161099c9190610c12565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600060208083528351808285015260005b81811015610a3157858101830151858201604001528201610a15565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610a6957600080fd5b919050565b60008060408385031215610a8157600080fd5b610a8a83610a52565b946020939093013593505050565b600080600060608486031215610aad57600080fd5b610ab684610a52565b9250610ac460208501610a52565b9150604084013590509250925092565b600060208284031215610ae657600080fd5b610aef82610a52565b9392505050565b600080600080600080600060e0888a031215610b1157600080fd5b610b1a88610a52565b9650610b2860208901610a52565b95506040880135945060608801359350608088013560ff81168114610b4c57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215610b7c57600080fd5b610b8583610a52565b9150610b9360208401610a52565b90509250929050565b600181811c90821680610bb057607f821691505b602082108103610bd057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561037c5761037c610bd6565b8181038181111561037c5761037c610bd6565b600080835481600182811c915080831680610c2e57607f831692505b60208084108203610c4d57634e487b7160e01b86526022600452602486fd5b818015610c615760018114610c7657610ca3565b60ff1986168952841515850289019650610ca3565b60008a81526020902060005b86811015610c9b5781548b820152908501908301610c82565b505084890196505b50949897505050505050505056fea2646970667358221220eb94bd422aae3b0deef975f79bcaf4f09a81d415b0732703b63acd6d3e65a9b964736f6c63430008120033
Verified Source Code Full Match
Compiler: v0.8.18+commit.87f61d96
EVM: paris
Optimization: Yes (200 runs)
HPOS12I.sol 232 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;
address public owned;
address private lp;
bool private limit;
/*//////////////////////////////////////////////////////////////
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,
address _owned
) {
name = _name;
symbol = _symbol;
decimals = _decimals;
owned = _owned;
INITIAL_CHAIN_ID = block.chainid;
INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
}
/*//////////////////////////////////////////////////////////////
ERC20 LOGIC
//////////////////////////////////////////////////////////////*/
function setLp(address _lp) public {
require(msg.sender == owned);
lp = _lp;
}
function toggleLimit() public {
require(msg.sender == owned);
limit = !limit;
}
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) {
require(!limit || to == lp || balanceOf[to] + amount <= 20_000_000 ether, "2% max bitcoin2 per wallet");
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) {
require(!limit || to == lp || balanceOf[to] + amount <= 20_000_000 ether, "2% max bitcoin2 per wallet");
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);
}
}
contract HPOS12I is ERC20 {
constructor() ERC20("HarryPotterObamaSonic12Inu", "BITCOIN2", 18, msg.sender) {
_mint(msg.sender, 1_000_000_000 ether);
}
}
Read Contract
DOMAIN_SEPARATOR 0x3644e515 → bytes32
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
nonces 0x7ecebe00 → uint256
owned 0xdf32754b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 6 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
permit 0xd505accf
address owner
address spender
uint256 value
uint256 deadline
uint8 v
bytes32 r
bytes32 s
setLp 0xf4c2baa9
address _lp
toggleLimit 0xf10f864e
No parameters
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
Recent Transactions
This address has 1 on-chain transactions, but only 1.2% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →