Liljohn
0x3aaa76db7d4970f3b62ed9e2225c16460af3d56e
Verification
Verified
v0.8.20+commit.a1b79de6
Type
Contract
2,689 bytes
ABI entries
22
12 read · 7 write
License
mit
Contract information
- Address
- 0x3aaa76db7d4970f3b62ed9e2225c16460af3d56e
- Chain
- Robinhood Chain (4663)
- Compiler
- v0.8.20+commit.a1b79de6
- Optimization
- Enabled
- Creator
- 0x3EAD78C805…FA858b122D
- Creation tx
- 0xe74d9906bf…fffca61b1b
Token
- Name
- LILJOHN
- Symbol
- LILJOHN
- Decimals
- 18
- Holders
- 240
- Market
- View token page →
Read contract (12)
DEPLOYER() → address
allowance(address, address) → uint256
balanceOf(address) → uint256
decimals() → uint8
isExempt(address) → bool
maxTxBps() → uint16
maxWalletBps() → uint16
name() → string
owner() → address
pool() → address
symbol() → string
totalSupply() → uint256
Events (2)
ApprovalTransfer
ABI
[
{
"inputs": [
{
"internalType": "string",
"name": "name_",
"type": "string"
},
{
"internalType": "string",
"name": "symbol_",
"type": "string"
},
{
"internalType": "uint16",
"name": "maxWalletBps_",
"type": "uint16"
},
{
"internalType": "uint16",
"name": "maxTxBps_",
"type": "uint16"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"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": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [],
"name": "DEPLOYER",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner_",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"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": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "clearLimits",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "pool_",
"type": "address"
}
],
"name": "initPool",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "isExempt",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxTxBps",
"outputs": [
{
"internalType": "uint16",
"name": "",
"type": "uint16"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxWalletBps",
"outputs": [
{
"internalType": "uint16",
"name": "",
"type": "uint16"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "pool",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "a",
"type": "address"
},
{
"internalType": "bool",
"name": "v",
"type": "bool"
}
],
"name": "setExempt",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"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"
}
]Source code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, 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 from, address to, 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);
}
/// Fixed-supply launch token with optional wallet/tx limits. The deployer
/// receives the full supply and seeds the Uniswap V3 pool via
/// NonfungiblePositionManager; `initPool` registers the pool so the maxWallet
/// carve-out for the pool applies (deployer + contract are always exempt, so
/// the seed transfer is unrestricted). Limits default off (0). No trading tax:
/// a fee-on-transfer would revert V3 swaps, so fees live off-chain if at all.
contract Liljohn is IERC20 {
string private _name;
string private _symbol;
uint8 private constant _decimals = 18;
uint256 private constant _tTotal = 1_000_000_000 * 10 ** _decimals;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
address public owner;
address public constant DEPLOYER = 0x3EAD78C8054333e14B26dC3b8591AeFA858b122D;
address public pool;
uint16 public maxWalletBps;
uint16 public maxTxBps;
mapping(address => bool) public isExempt;
modifier onlyOwner() {
require(msg.sender == owner, "owner");
_;
}
constructor(
string memory name_,
string memory symbol_,
uint16 maxWalletBps_,
uint16 maxTxBps_
) {
_name = name_;
_symbol = symbol_;
owner = DEPLOYER;
maxWalletBps = maxWalletBps_;
maxTxBps = maxTxBps_;
isExempt[DEPLOYER] = true;
isExempt[address(this)] = true;
_balances[DEPLOYER] = _tTotal;
emit Transfer(address(0), DEPLOYER, _tTotal);
}
function initPool(address pool_) external onlyOwner {
require(pool == address(0), "set");
pool = pool_;
}
function setExempt(address a, bool v) external onlyOwner {
isExempt[a] = v;
}
function clearLimits() external onlyOwner {
maxWalletBps = 0;
maxTxBps = 0;
}
function renounceOwnership() external onlyOwner {
owner = address(0);
}
function name() external view returns (string memory) {
return _name;
}
function symbol() external view returns (string memory) {
return _symbol;
}
function decimals() external pure returns (uint8) {
return _decimals;
}
function totalSupply() external pure returns (uint256) {
return _tTotal;
}
function balanceOf(address account) external view returns (uint256) {
return _balances[account];
}
function transfer(address to, uint256 amount) external returns (bool) {
_transfer(msg.sender, to, amount);
return true;
}
function allowance(address owner_, address spender) external view returns (uint256) {
return _allowances[owner_][spender];
}
function approve(address spender, uint256 amount) external returns (bool) {
_allowances[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
function transferFrom(address from, address to, uint256 amount) external returns (bool) {
uint256 allowed = _allowances[from][msg.sender];
require(allowed >= amount, "allowance");
if (allowed != type(uint256).max) {
_allowances[from][msg.sender] = allowed - amount;
}
_transfer(from, to, amount);
return true;
}
function _transfer(address from, address to, uint256 amount) internal {
require(from != address(0) && to != address(0), "zero");
uint256 bal = _balances[from];
require(bal >= amount, "balance");
bool exempt = isExempt[from] || isExempt[to];
if (!exempt) {
if (maxTxBps > 0) {
require(amount <= (_tTotal * maxTxBps) / 10000, "maxTx");
}
if (maxWalletBps > 0 && to != pool) {
require(_balances[to] + amount <= (_tTotal * maxWalletBps) / 10000, "maxWallet");
}
}
unchecked {
_balances[from] = bal - amount;
_balances[to] += amount;
}
emit Transfer(from, to, amount);
}
}
Chain explorer3043msChain node88ms