// SPDX-License-Identifier: MIT pragma solidity >=0.8.4 <0.9.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/token/ERC20/ERC20.sol"; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.4.1/contracts/token/ERC20/utils/SafeERC20.sol"; interface ITaxDistributor { function distributeTax() external; } contract SongbirdToken is ERC20 { using SafeERC20 for IERC20; event Trade( address user, address pair, uint256 amount, uint256 side, uint256 circulatingSupply, uint256 timestamp ); address public constant DEAD = 0x000000000000000000000000000000000000dEaD; uint256 public cooldown = 3600; ITaxDistributor public taxDistributor; bool public inSwap; uint256 public launchedAt; address public swapVault; address private deployer; mapping(address => bool) public isFeeExempt; mapping(address => uint256) public lastSellAt; constructor( string memory _name, string memory _symbol, address _dexHolder, address _swapVault, address _taxDistributor, address _airdrop ) ERC20(_name, _symbol) { taxDistributor = ITaxDistributor(_taxDistributor); swapVault = _swapVault; deployer = msg.sender; _mint(msg.sender, 210_000_000_000 * 1e6); isFeeExempt[_dexHolder] = true; isFeeExempt[msg.sender] = true; isFeeExempt[address(this)] = true; isFeeExempt[_taxDistributor] = true; isFeeExempt[_airdrop] = true; } function decimals() public view virtual override returns (uint8) { return 6; } function getCirculatingSupply() public view returns (uint256) { return totalSupply() - balanceOf(DEAD) - balanceOf(address(0)); } function transferBatch( address[] calldata accounts, uint256[] calldata amounts ) external { require(msg.sender == deployer, "Not allowed"); require(accounts.length == amounts.length, "Length not equal"); for (uint256 i = 0; i < accounts.length; ++i) { _transfer(msg.sender, accounts[i], amounts[i]); } } function transfer( address to, uint256 amount ) public virtual override returns (bool) { return _medTransfer(_msgSender(), to, amount); } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { _spendAllowance(from, _msgSender(), amount); return _medTransfer(from, to, amount); } function _medTransfer( address from, address to, uint256 amount )
0.4.18