InfiniteStableRewards

0x3589e52591799a143ba463cbdbe01018346cc54a

Verification
Verified
v0.8.26+commit.8a97fa7a
Type
Contract
5,507 bytes
ABI entries
37
15 read · 12 write
License
none

Contract information

Address
0x3589e52591799a143ba463cbdbe01018346cc54a
Chain
Robinhood Chain (4663)
Compiler
v0.8.26+commit.8a97fa7a
Optimization
Enabled
Creation tx
0x2a654881b7…dda8155f37

Token

Name
InfiniteStableRewards
Symbol
ISR
Decimals
18
Holders
2

Read contract (15)

MAX_TAX()uint256
TAX_DENOMINATOR()uint256
allowance(address, address)uint256
balanceOf(address)uint256
buyTax()uint256
decimals()uint8
isAmmPair(address)bool
isExcludedFromFees(address)bool
name()string
owner()address
sellTax()uint256
symbol()string
taxWallet()address
totalSupply()uint256
tradingOpen()bool

Events (9)

AmmPairUpdatedApprovalFeeExclusionUpdatedOwnershipTransferredPairCreatedTaxWalletUpdatedTaxesUpdatedTradingOpenedTransfer

ABI

[
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "router_",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "taxWallet_",
        "type": "address"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "pair",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "bool",
        "name": "isPair",
        "type": "bool"
      }
    ],
    "name": "AmmPairUpdated",
    "type": "event"
  },
  {
    "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": "account",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "bool",
        "name": "excluded",
        "type": "bool"
      }
    ],
    "name": "FeeExclusionUpdated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "previousOwner",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "OwnershipTransferred",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "pair",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "router",
        "type": "address"
      }
    ],
    "name": "PairCreated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "newTaxWallet",
        "type": "address"
      }
    ],
    "name": "TaxWalletUpdated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "buyTax",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "sellTax",
        "type": "uint256"
      }
    ],
    "name": "TaxesUpdated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "blockNumber",
        "type": "uint256"
      }
    ],
    "name": "TradingOpened",
    "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": "MAX_TAX",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "TAX_DENOMINATOR",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "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": "buyTax",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "router_",
        "type": "address"
      }
    ],
    "name": "createPairWithRouter",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "decimals",
    "outputs": [
      {
        "internalType": "uint8",
        "name": "",
        "type": "uint8"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "name": "isAmmPair",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "name": "isExcludedFromFees",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "name",
    "outputs": [
      {
        "internalType": "string",
        "name": "",
        "type": "string"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "openTrading",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "owner",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "renounceOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "token",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "internalType": "address",
        "name": "to",
        "type": "address"
      }
    ],
    "name": "rescueTokens",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "sellTax",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "pair",
        "type": "address"
      },
      {
        "internalType": "bool",
        "name": "isPair",
        "type": "bool"
      }
    ],
    "name": "setAmmPair",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      },
      {
        "internalType": "bool",
        "name": "excluded",
        "type": "bool"
      }
    ],
    "name": "setExcludedFromFees",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newTaxWallet",
        "type": "address"
      }
    ],
    "name": "setTaxWallet",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "buyTax_",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "sellTax_",
        "type": "uint256"
      }
    ],
    "name": "setTaxes",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "symbol",
    "outputs": [
      {
        "internalType": "string",
        "name": "",
        "type": "string"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "taxWallet",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "totalSupply",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "tradingOpen",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "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"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "transferOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  }
]

Source code

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

/*
    ██╗███████╗██████╗      InfiniteStableRewards (ISR)
    ██║██╔════╝██╔══██╗     Meme token for Stable Mainnet (chainId 988)
    ██║███████╗██████╔╝     1% buy tax / 1% sell tax — HARD-CAPPED at 1%
    ██║╚════██║██╔══██╗     Taxes can be lowered or zeroed, NEVER raised.
    ██║███████║██║  ██║     No blacklist. No max-wallet traps. No mint.
    ╚═╝╚══════╝╚═╝  ╚═╝     Trading, once opened, can never be paused.

    ── DEPLOYMENT (Remix) ──────────────────────────────────────────────
    1. Add Stable Mainnet to MetaMask:
         RPC:      https://rpc.stable.xyz
         Chain ID: 988
         Symbol:   USDT0 (gas is paid in gUSDT)
         Explorer: https://stablescan.xyz
    2. In Remix: compiler 0.8.20+ , optimizer ON (200 runs).
    3. Deploy with constructor args:
         router_    = the Uniswap-V2-compatible router on Stable chain
                      (pass 0x0000000000000000000000000000000000000000 if
                       you don't know it yet — you can create the pair
                       later with createPairWithRouter).
         taxWallet_ = wallet that receives the 1% tax (in ISR tokens).
    4. If you passed a router: the WGAS/ISR pair is created automatically.
       Add liquidity on the DEX (you are fee-excluded, so this works
       before trading opens).
    5. Call openTrading() — this is ONE-WAY and enables everyone to trade.
    ────────────────────────────────────────────────────────────────────
*/

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);
}

interface IUniswapV2Factory {
    function createPair(address tokenA, address tokenB) external returns (address pair);
    function getPair(address tokenA, address tokenB) external view returns (address pair);
}

interface IUniswapV2Router02 {
    function factory() external view returns (address);
    function WETH() external view returns (address); // wrapped gas token on any V2 fork
}

abstract contract Ownable {
    address private _owner;
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    constructor() { _transferOwnership(msg.sender); }

    modifier onlyOwner() {
        require(_owner == msg.sender, "Ownable: caller is not the owner");
        _;
    }

    function owner() public view returns (address) { return _owner; }

    function renounceOwnership() external onlyOwner { _transferOwnership(address(0)); }

    function transferOwnership(address newOwner) external onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    function _transferOwnership(address newOwner) internal {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

contract InfiniteStableRewards is IERC20, Ownable {
    // ─── Token metadata ─────────────────────────────────────────────
    string  public constant name     = "InfiniteStableRewards";
    string  public constant symbol   = "ISR";
    uint8   public constant decimals = 18;
    uint256 public immutable override totalSupply;

    // ─── Tax config (basis points: 100 = 1%) ────────────────────────
    uint256 public constant TAX_DENOMINATOR = 10_000;
    uint256 public constant MAX_TAX = 100;   // 1% — hard ceiling, immutable
    uint256 public buyTax  = 100;            // 1%
    uint256 public sellTax = 100;            // 1%
    address public taxWallet;

    // ─── Trading state ──────────────────────────────────────────────
    bool public tradingOpen;                          // one-way switch
    mapping(address => bool) public isAmmPair;        // taxed pairs
    mapping(address => bool) public isExcludedFromFees;

    // ─── Balances ───────────────────────────────────────────────────
    mapping(address => uint256) private _balances;
    mapping(address => mapping(address => uint256)) private _allowances;

    // ─── Events ─────────────────────────────────────────────────────
    event TradingOpened(uint256 blockNumber);
    event TaxesUpdated(uint256 buyTax, uint256 sellTax);
    event TaxWalletUpdated(address indexed newTaxWallet);
    event AmmPairUpdated(address indexed pair, bool isPair);
    event FeeExclusionUpdated(address indexed account, bool excluded);
    event PairCreated(address indexed pair, address indexed router);

    constructor(address router_, address taxWallet_) {
        require(taxWallet_ != address(0), "ISR: tax wallet is zero address");
        taxWallet = taxWallet_;

        totalSupply = 1_000_000_000 * 10 ** decimals; // 1B ISR, fixed forever
        _balances[msg.sender] = totalSupply;
        emit Transfer(address(0), msg.sender, totalSupply);

        isExcludedFromFees[msg.sender]   = true;
        isExcludedFromFees[address(this)] = true;
        isExcludedFromFees[taxWallet_]   = true;

        if (router_ != address(0)) {
            _createPair(router_);
        }
    }

    // ─── ERC20 ──────────────────────────────────────────────────────
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    function transfer(address to, uint256 amount) external override returns (bool) {
        _transfer(msg.sender, to, amount);
        return true;
    }

    function allowance(address owner_, address spender) external view override returns (uint256) {
        return _allowances[owner_][spender];
    }

    function approve(address spender, uint256 amount) external override returns (bool) {
        _approve(msg.sender, spender, amount);
        return true;
    }

    function transferFrom(address from, address to, uint256 amount) external override returns (bool) {
        uint256 currentAllowance = _allowances[from][msg.sender];
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ISR: insufficient allowance");
            unchecked { _approve(from, msg.sender, currentAllowance - amount); }
        }
        _transfer(from, to, amount);
        return true;
    }

    function _approve(address owner_, address spender, uint256 amount) private {
        require(owner_ != address(0), "ISR: approve from zero");
        require(spender != address(0), "ISR: approve to zero");
        _allowances[owner_][spender] = amount;
        emit Approval(owner_, spender, amount);
    }

    // ─── Core transfer with 1% buy/sell tax ─────────────────────────
    function _transfer(address from, address to, uint256 amount) private {
        require(from != address(0), "ISR: transfer from zero");
        require(to != address(0), "ISR: transfer to zero");
        require(amount > 0, "ISR: amount must be > 0");
        require(_balances[from] >= amount, "ISR: insufficient balance");

        bool takeFee = true;

        if (isExcludedFromFees[from] || isExcludedFromFees[to]) {
            takeFee = false; // owner can add liquidity pre-launch
        } else {
            require(tradingOpen, "ISR: trading not open yet");
        }

        uint256 fee = 0;
        if (takeFee) {
            if (isAmmPair[from]) {
                fee = (amount * buyTax) / TAX_DENOMINATOR;   // buy
            } else if (isAmmPair[to]) {
                fee = (amount * sellTax) / TAX_DENOMINATOR;  // sell
            }
            // plain wallet-to-wallet transfers are never taxed
        }

        unchecked { _balances[from] -= amount; }

        if (fee > 0) {
            _balances[taxWallet] += fee;
            emit Transfer(from, taxWallet, fee);
        }

        uint256 sendAmount = amount - fee;
        _balances[to] += sendAmount;
        emit Transfer(from, to, sendAmount);
    }

    // ─── Owner controls (all transparency-safe) ─────────────────────

    /// @notice One-way switch. Once trading is open it can NEVER be closed.
    function openTrading() external onlyOwner {
        require(!tradingOpen, "ISR: already open");
        tradingOpen = true;
        emit TradingOpened(block.number);
    }

    /// @notice Create the WGAS/ISR pair on any Uniswap-V2-compatible DEX.
    function createPairWithRouter(address router_) external onlyOwner {
        require(router_ != address(0), "ISR: router is zero");
        _createPair(router_);
    }

    function _createPair(address router_) private {
        IUniswapV2Router02 router = IUniswapV2Router02(router_);
        address factory = router.factory();
        address wgas = router.WETH();
        address pair = IUniswapV2Factory(factory).getPair(address(this), wgas);
        if (pair == address(0)) {
            pair = IUniswapV2Factory(factory).createPair(address(this), wgas);
        }
        isAmmPair[pair] = true;
        emit PairCreated(pair, router_);
        emit AmmPairUpdated(pair, true);
    }

    /// @notice Mark/unmark any LP pair as taxed (e.g. an ISR/USDT0 pair).
    function setAmmPair(address pair, bool isPair) external onlyOwner {
        require(pair != address(0), "ISR: pair is zero");
        isAmmPair[pair] = isPair;
        emit AmmPairUpdated(pair, isPair);
    }

    /// @notice Lower (or restore up to 1%) the taxes. Can never exceed MAX_TAX (1%).
    function setTaxes(uint256 buyTax_, uint256 sellTax_) external onlyOwner {
        require(buyTax_ <= MAX_TAX && sellTax_ <= MAX_TAX, "ISR: tax above 1% cap");
        buyTax = buyTax_;
        sellTax = sellTax_;
        emit TaxesUpdated(buyTax_, sellTax_);
    }

    function setTaxWallet(address newTaxWallet) external onlyOwner {
        require(newTaxWallet != address(0), "ISR: tax wallet is zero");
        taxWallet = newTaxWallet;
        isExcludedFromFees[newTaxWallet] = true;
        emit TaxWalletUpdated(newTaxWallet);
    }

    function setExcludedFromFees(address account, bool excluded) external onlyOwner {
        isExcludedFromFees[account] = excluded;
        emit FeeExclusionUpdated(account, excluded);
    }

    /// @notice Rescue tokens accidentally sent to this contract.
    function rescueTokens(address token, uint256 amount, address to) external onlyOwner {
        require(to != address(0), "ISR: rescue to zero");
        IERC20(token).transfer(to, amount);
    }
}
Chain explorer2086msChain node89ms