Contract Source Code:
File 1 of 1 : RichApes
/*
Website: https://richapes.vip/
Telegram: https://t.me/richapesofficial
Twitter: https://x.com/richapes_ape
██████╗░██╗░█████╗░██╗░░██╗░█████╗░██████╗░███████╗░██████╗
██╔══██╗██║██╔══██╗██║░░██║██╔══██╗██╔══██╗██╔════╝██╔════╝
██████╔╝██║██║░░╚═╝███████║███████║██████╔╝█████╗░░╚█████╗░
██╔══██╗██║██║░░██╗██╔══██║██╔══██║██╔═══╝░██╔══╝░░░╚═══██╗
██║░░██║██║╚█████╔╝██║░░██║██║░░██║██║░░░░░███████╗██████╔╝
╚═╝░░╚═╝╚═╝░╚════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░░░░╚══════╝╚═════╝░
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
contract RichApes {
string public name = "Rich Apes";
string public symbol = "RICHAPES";
uint8 public decimals = 18;
uint256 public totalSupply;
address public owner;
mapping(address => uint256) private balances;
mapping(address => mapping(address => uint256)) private allowances;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
modifier onlyOwner() {
require(msg.sender == owner, "Caller is not the owner");
_;
}
constructor() {
owner = msg.sender;
totalSupply = 1000000000 * 10 ** uint256(decimals);
balances[owner] = totalSupply;
emit Transfer(address(0), owner, totalSupply);
}
function balanceOf(address account) public view returns (uint256) {
return balances[account];
}
function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
function approve(address spender, uint256 amount) public returns (bool) {
allowances[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
function allowance(address ownerOfTokens, address spender) public view returns (uint256) {
return allowances[ownerOfTokens][spender];
}
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
require(allowances[sender][msg.sender] >= amount, "ERC20: transfer amount exceeds allowance");
_transfer(sender, recipient, amount);
allowances[sender][msg.sender] -= amount;
return true;
}
function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
require(balances[sender] >= amount, "ERC20: transfer amount exceeds balance");
balances[sender] -= amount;
balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
}
function renounceOwnership() public onlyOwner {
emit OwnershipTransferred(owner, address(0));
owner = address(0);
}
receive() external payable {
revert("ETH deposits not supported");
}
}