Token
ERC-20✓ Verified (full match)via Sourcify- Native balance
- —
- Transactions
- 0 sent · 256 received
- Token transfers
- 682
- First seen
- · block 10,571,706
- Last seen
- · block 10,864,633
- Creator
- 0x6389…466cat tx0x18bbd9df…
- Total supply
- —
Counts and history cover indexed blocks 10,388,153 onward — earlier activity isn't indexed yet.
- Contract name
- GreenCash
- Compiler
- v0.8.24+commit.e11b9ed9
- Language
- solidity
- Optimizer
- enabled · 200 runs
- EVM version
- shanghai
- Verified
- 2026-07-15 21:46:38 UTC · via Sourcify · full match
Source code1 file
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
interface IUniswapV2Router {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
/// @title Green Cash ($GREEN) — a fee token that pays the dev in ETH, not tokens.
/// Supply: 1,000,000. Max tx/wallet: 1% of supply (raise-only, anti-honeypot).
/// Buy/sell fee (default 4%/4%, capped at 10% in code): collected as tokens in the
/// contract and auto-swapped to ETH, sent straight to the feeReceiver on sells.
/// The swap is wrapped in try/catch — if it ever fails, sells STILL go through
/// (no honeypot possible). No blacklist, no mint.
contract GreenCash {
string public constant name = "Green Cash";
string public constant symbol = "GREEN";
uint8 public constant decimals = 18;
uint256 public constant totalSupply = 1_000_000 * 1e18;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
address public owner;
address public pair;
address public feeReceiver; // receives the fee AS ETH
// Robinhood Chain V2 infra (same the launch script adds liquidity to)
address public constant ROUTER = 0x89e5DB8B5aA49aA85AC63f691524311AEB649eba;
address public constant WETH = 0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73;
bool public limitsActive = true;
uint256 public maxTx;
uint256 public maxWallet;
uint256 public constant LIMIT_FLOOR = totalSupply / 100; // 1%
uint256 public buyFeeBps = 400; // 4%
uint256 public sellFeeBps = 400; // 4%
uint256 public constant MAX_FEE_BPS = 1000; // 10% hard cap — fee can never exceed this
// fee -> ETH swapback
bool public swapEnabled = true;
uint256 public swapThreshold = totalSupply / 1000; // 0.1%: min collected tokens to trigger a swap
bool private inSwap;
mapping(address => bool) public excludedFromLimits;
mapping(address => bool) public excludedFromFees;
address private constant DEAD = 0x000000000000000000000000000000000000dEaD;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed holder, address indexed spender, uint256 value);
event OwnershipTransferred(address indexed prev, address indexed next);
event LimitsRaised(uint256 maxTx, uint256 maxWallet);
event LimitsRemoved();
event PairSet(address pair);
event FeesSet(uint256 buyFeeBps, uint256 sellFeeBps);
event FeeReceiverSet(address receiver);
event SwapSettings(bool enabled, uint256 threshold);
event ExcludedFromLimits(address indexed account, bool excluded);
event ExcludedFromFees(address indexed account, bool excluded);
modifier onlyOwner() {
require(msg.sender == owner, "not owner");
_;
}
modifier swapping() {
inSwap = true;
_;
inSwap = false;
}
constructor() {
owner = msg.sender;
feeReceiver = msg.sender;
maxTx = LIMIT_FLOOR;
maxWallet = LIMIT_FLOOR;
excludedFromLimits[msg.sender] = true;
excludedFromLimits[address(this)] = true;
excludedFromLimits[DEAD] = true;
excludedFromLimits[ROUTER] = true;
excludedFromFees[msg.sender] = true;
excludedFromFees[address(this)] = true;
excludedFromFees[DEAD] = true;
// pre-approve the router so the contract can swap its collected fees to ETH
allowance[address(this)][ROUTER] = type(uint256).max;
balanceOf[msg.sender] = totalSupply;
emit Transfer(address(0), msg.sender, totalSupply);
}
receive() external payable {}
// ------------------------------------------------------------------ admin
function setPair(address p) external onlyOwner {
require(pair == address(0), "pair already set");
require(p != address(0), "zero pair");
pair = p;
emit PairSet(p);
}
function setExcludedFromLimits(address a, bool e) external onlyOwner {
excludedFromLimits[a] = e;
emit ExcludedFromLimits(a, e);
}
function setExcludedFromFees(address a, bool e) external onlyOwner {
excludedFromFees[a] = e;
emit ExcludedFromFees(a, e);
}
function raiseLimits(uint256 newMaxTx, uint256 newMaxWallet) external onlyOwner {
require(newMaxTx >= maxTx && newMaxWallet >= maxWallet, "raise only");
maxTx = newMaxTx;
maxWallet = newMaxWallet;
emit LimitsRaised(newMaxTx, newMaxWallet);
}
function removeLimits() external onlyOwner {
limitsActive = false;
emit LimitsRemoved();
}
function setFees(uint256 newBuyBps, uint256 newSellBps) external onlyOwner {
require(newBuyBps <= MAX_FEE_BPS && newSellBps <= MAX_FEE_BPS, "fee > 10%");
buyFeeBps = newBuyBps;
sellFeeBps = newSellBps;
emit FeesSet(newBuyBps, newSellBps);
}
function setFeeReceiver(address r) external onlyOwner {
require(r != address(0), "zero receiver");
feeReceiver = r;
excludedFromLimits[r] = true;
excludedFromFees[r] = true;
emit FeeReceiverSet(r);
}
function setSwapSettings(bool enabled, uint256 threshold) external onlyOwner {
require(threshold > 0, "threshold 0");
swapEnabled = enabled;
swapThreshold = threshold;
emit SwapSettings(enabled, threshold);
}
/// Manually convert the fees sitting in the contract to ETH -> feeReceiver.
function manualSwap() external onlyOwner {
_swapBack();
}
/// Sweep any ETH that ends up in the contract to the feeReceiver.
function rescueETH() external onlyOwner {
(bool ok, ) = feeReceiver.call{value: address(this).balance}("");
require(ok, "eth send failed");
}
/// Last resort: if the auto-swap ever became permanently impossible, pull the
/// fee tokens sitting in the contract out to the feeReceiver to sell by hand.
/// Only ever touches the contract's own collected fees, never a holder's balance.
function rescueTokens() external onlyOwner {
uint256 amt = balanceOf[address(this)];
if (amt == 0) return;
balanceOf[address(this)] -= amt;
balanceOf[feeReceiver] += amt;
emit Transfer(address(this), feeReceiver, amt);
}
function renounceOwnership() external onlyOwner {
emit OwnershipTransferred(owner, address(0));
owner = address(0);
}
// ------------------------------------------------------------------ erc20
function transfer(address to, uint256 value) external returns (bool) {
_transfer(msg.sender, to, value);
return true;
}
function approve(address spender, uint256 value) external returns (bool) {
allowance[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
function transferFrom(address from, address to, uint256 value) external returns (bool) {
uint256 allowed = allowance[from][msg.sender];
require(allowed >= value, "insufficient allowance");
if (allowed != type(uint256).max) {
allowance[from][msg.sender] = allowed - value;
}
_transfer(from, to, value);
return true;
}
// ------------------------------------------------------------------ core
function _transfer(address from, address to, uint256 value) internal {
require(to != address(0), "transfer to zero");
require(balanceOf[from] >= value, "insufficient balance");
// during the contract's own fee->ETH swap, move tokens plainly (no fee/limits/recursion)
if (inSwap) {
_basic(from, to, value);
return;
}
if (limitsActive && !excludedFromLimits[from] && !excludedFromLimits[to]) {
require(value <= maxTx, "maxTx: 1% of supply");
if (to != pair && to != DEAD) {
require(balanceOf[to] + value <= maxWallet, "maxWallet: 1% of supply");
}
}
// on a sell, convert the fees collected so far into ETH for the dev
if (swapEnabled && pair != address(0) && to == pair && !excludedFromFees[from]
&& balanceOf[address(this)] >= swapThreshold) {
_swapBack();
}
uint256 fee = 0;
if (pair != address(0)) {
if (from == pair && !excludedFromFees[to]) {
fee = value * buyFeeBps / 10000;
} else if (to == pair && !excludedFromFees[from]) {
fee = value * sellFeeBps / 10000;
}
}
balanceOf[from] -= value;
if (fee > 0) {
balanceOf[address(this)] += fee; // fee held by the contract until swapped to ETH
emit Transfer(from, address(this), fee);
}
balanceOf[to] += value - fee;
emit Transfer(from, to, value - fee);
}
function _basic(address from, address to, uint256 value) private {
balanceOf[from] -= value;
balanceOf[to] += value;
emit Transfer(from, to, value);
}
/// Swaps up to a capped chunk of collected fee tokens to ETH, sent to feeReceiver.
/// try/catch: a failed swap never blocks the user's transfer (no honeypot).
function _swapBack() private swapping {
uint256 amt = balanceOf[address(this)];
uint256 cap = swapThreshold * 15;
if (amt > cap) amt = cap;
if (amt == 0) return;
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = WETH;
try IUniswapV2Router(ROUTER).swapExactTokensForETHSupportingFeeOnTransferTokens(
amt, 0, path, feeReceiver, block.timestamp
) {} catch {}
}
}
ABI
[
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "holder",
"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": "account",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "excluded",
"type": "bool"
}
],
"name": "ExcludedFromFees",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "excluded",
"type": "bool"
}
],
"name": "ExcludedFromLimits",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "FeeReceiverSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "buyFeeBps",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "sellFeeBps",
"type": "uint256"
}
],
"name": "FeesSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "maxTx",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "maxWallet",
"type": "uint256"
}
],
"name": "LimitsRaised",
"type": "event"
},
{
"anonymous": false,
"inputs": [],
"name": "LimitsRemoved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "prev",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "next",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "pair",
"type": "address"
}
],
"name": "PairSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bool",
"name": "enabled",
"type": "bool"
},
{
"indexed": false,
"internalType": "uint256",
"name": "threshold",
"type": "uint256"
}
],
"name": "SwapSettings",
"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": "LIMIT_FLOOR",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_FEE_BPS",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ROUTER",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "WETH",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"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": "value",
"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": [],
"name": "buyFeeBps",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "excludedFromFees",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "excludedFromLimits",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "feeReceiver",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "limitsActive",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "manualSwap",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "maxTx",
"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": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "pair",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newMaxTx",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "newMaxWallet",
"type": "uint256"
}
],
"name": "raiseLimits",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "removeLimits",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "rescueETH",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "rescueTokens",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "sellFeeBps",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "a",
"type": "address"
},
{
"internalType": "bool",
"name": "e",
"type": "bool"
}
],
"name": "setExcludedFromFees",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "a",
"type": "address"
},
{
"internalType": "bool",
"name": "e",
"type": "bool"
}
],
"name": "setExcludedFromLimits",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "r",
"type": "address"
}
],
"name": "setFeeReceiver",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newBuyBps",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "newSellBps",
"type": "uint256"
}
],
"name": "setFees",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "p",
"type": "address"
}
],
"name": "setPair",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bool",
"name": "enabled",
"type": "bool"
},
{
"internalType": "uint256",
"name": "threshold",
"type": "uint256"
}
],
"name": "setSwapSettings",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "swapEnabled",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "swapThreshold",
"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": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"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": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
]Bytecode hash 0xe141d24ece86237af37450a9b7df88e5a6f9514f5abb99282f593eb2abf788e0